massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-tsserver / node_modules / typescript / lib / tsc.js
index e9a949ee5455538c5260c0b4a1e13fca74e34e7c..b7520e8348d834b5d7b5c18c4fbfbecd4609d9bb 100644 (file)
@@ -15,10 +15,14 @@ and limitations under the License.
 
 
 "use strict";
-var __spreadArray = (this && this.__spreadArray) || function (to, from) {
-    for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
-        to[j] = from[i];
-    return to;
+var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
+    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
+        if (ar || !(i in from)) {
+            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
+            ar[i] = from[i];
+        }
+    }
+    return to.concat(ar || Array.prototype.slice.call(from));
 };
 var __assign = (this && this.__assign) || function () {
     __assign = Object.assign || function(t) {
@@ -64,8 +68,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
 };
 var ts;
 (function (ts) {
-    ts.versionMajorMinor = "4.2";
-    ts.version = "4.2.3";
+    ts.versionMajorMinor = "4.5";
+    ts.version = "4.5.2";
     var NativeCollections;
     (function (NativeCollections) {
         function tryGetNativeMap() {
@@ -76,19 +80,19 @@ var ts;
             return typeof Set !== "undefined" && "entries" in Set.prototype && new Set([0]).size === 1 ? Set : undefined;
         }
         NativeCollections.tryGetNativeSet = tryGetNativeSet;
-    })(NativeCollections = ts.NativeCollections || (ts.NativeCollections = {}));
-})(ts || (ts = {}));
-var ts;
-(function (ts) {
+    })(NativeCollections || (NativeCollections = {}));
+    ts.Map = getCollectionImplementation("Map", "tryGetNativeMap", "createMapShim");
+    ts.Set = getCollectionImplementation("Set", "tryGetNativeSet", "createSetShim");
     function getCollectionImplementation(name, nativeFactory, shimFactory) {
         var _a;
-        var constructor = (_a = ts.NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](getIterator);
+        var constructor = (_a = NativeCollections[nativeFactory]()) !== null && _a !== void 0 ? _a : ts.ShimCollections === null || ts.ShimCollections === void 0 ? void 0 : ts.ShimCollections[shimFactory](ts.getIterator);
         if (constructor)
             return constructor;
-        throw new Error("TypeScript requires an environment that provides a compatible native " + name + " implementation.");
+        throw new Error("TypeScript requires an environment that provides a compatible native ".concat(name, " implementation."));
     }
-    ts.Map = getCollectionImplementation("Map", "tryGetNativeMap", "createMapShim");
-    ts.Set = getCollectionImplementation("Set", "tryGetNativeSet", "createSetShim");
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
     function getIterator(iterable) {
         if (iterable) {
             if (isArray(iterable))
@@ -689,7 +693,7 @@ var ts;
             return array1;
         if (!some(array1))
             return array2;
-        return __spreadArray(__spreadArray([], array1), array2);
+        return __spreadArray(__spreadArray([], array1, true), array2, true);
     }
     ts.concatenate = concatenate;
     function selectIndex(_, i) {
@@ -1290,20 +1294,30 @@ var ts;
     function cast(value, test) {
         if (value !== undefined && test(value))
             return value;
-        return ts.Debug.fail("Invalid cast. The supplied value " + value + " did not pass the test '" + ts.Debug.getFunctionName(test) + "'.");
+        return ts.Debug.fail("Invalid cast. The supplied value ".concat(value, " did not pass the test '").concat(ts.Debug.getFunctionName(test), "'."));
     }
     ts.cast = cast;
     function noop(_) { }
     ts.noop = noop;
-    function returnFalse() { return false; }
+    function returnFalse() {
+        return false;
+    }
     ts.returnFalse = returnFalse;
-    function returnTrue() { return true; }
+    function returnTrue() {
+        return true;
+    }
     ts.returnTrue = returnTrue;
-    function returnUndefined() { return undefined; }
+    function returnUndefined() {
+        return undefined;
+    }
     ts.returnUndefined = returnUndefined;
-    function identity(x) { return x; }
+    function identity(x) {
+        return x;
+    }
     ts.identity = identity;
-    function toLowerCase(x) { return x.toLowerCase(); }
+    function toLowerCase(x) {
+        return x.toLowerCase();
+    }
     ts.toLowerCase = toLowerCase;
     var fileNameLowerCaseRegExp = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g;
     function toFileNameLowerCase(x) {
@@ -1330,7 +1344,7 @@ var ts;
     function memoizeOne(callback) {
         var map = new ts.Map();
         return function (arg) {
-            var key = typeof arg + ":" + arg;
+            var key = "".concat(typeof arg, ":").concat(arg);
             var value = map.get(key);
             if (value === undefined && !map.has(key)) {
                 value = callback(arg);
@@ -1590,8 +1604,38 @@ var ts;
     }
     ts.stringContains = stringContains;
     function removeMinAndVersionNumbers(fileName) {
-        var trailingMinOrVersion = /[.-]((min)|(\d+(\.\d+)*))$/;
-        return fileName.replace(trailingMinOrVersion, "").replace(trailingMinOrVersion, "");
+        var end = fileName.length;
+        for (var pos = end - 1; pos > 0; pos--) {
+            var ch = fileName.charCodeAt(pos);
+            if (ch >= 48 && ch <= 57) {
+                do {
+                    --pos;
+                    ch = fileName.charCodeAt(pos);
+                } while (pos > 0 && ch >= 48 && ch <= 57);
+            }
+            else if (pos > 4 && (ch === 110 || ch === 78)) {
+                --pos;
+                ch = fileName.charCodeAt(pos);
+                if (ch !== 105 && ch !== 73) {
+                    break;
+                }
+                --pos;
+                ch = fileName.charCodeAt(pos);
+                if (ch !== 109 && ch !== 77) {
+                    break;
+                }
+                --pos;
+                ch = fileName.charCodeAt(pos);
+            }
+            else {
+                break;
+            }
+            if (ch !== 45 && ch !== 46) {
+                break;
+            }
+            end = pos;
+        }
+        return end === fileName.length ? fileName : fileName.slice(0, end);
     }
     ts.removeMinAndVersionNumbers = removeMinAndVersionNumbers;
     function orderedRemoveItem(array, item) {
@@ -1635,7 +1679,7 @@ var ts;
     ts.createGetCanonicalFileName = createGetCanonicalFileName;
     function patternText(_a) {
         var prefix = _a.prefix, suffix = _a.suffix;
-        return prefix + "*" + suffix;
+        return "".concat(prefix, "*").concat(suffix);
     }
     ts.patternText = patternText;
     function matchedText(pattern, candidate) {
@@ -1806,6 +1850,18 @@ var ts;
         return array.slice(0, index);
     }
     ts.takeWhile = takeWhile;
+    ts.trimString = !!String.prototype.trim ? (function (s) { return s.trim(); }) : function (s) { return ts.trimStringEnd(ts.trimStringStart(s)); };
+    ts.trimStringEnd = !!String.prototype.trimEnd ? (function (s) { return s.trimEnd(); }) : trimEndImpl;
+    ts.trimStringStart = !!String.prototype.trimStart ? (function (s) { return s.trimStart(); }) : function (s) { return s.replace(/^\s+/g, ""); };
+    function trimEndImpl(s) {
+        var end = s.length - 1;
+        while (end >= 0) {
+            if (!ts.isWhiteSpaceLike(s.charCodeAt(end)))
+                break;
+            end--;
+        }
+        return s.slice(0, end + 1);
+    }
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -1892,7 +1948,7 @@ var ts;
         }
         function fail(message, stackCrawlMark) {
             debugger;
-            var e = new Error(message ? "Debug Failure. " + message : "Debug Failure.");
+            var e = new Error(message ? "Debug Failure. ".concat(message) : "Debug Failure.");
             if (Error.captureStackTrace) {
                 Error.captureStackTrace(e, stackCrawlMark || fail);
             }
@@ -1900,12 +1956,12 @@ var ts;
         }
         Debug.fail = fail;
         function failBadSyntaxKind(node, message, stackCrawlMark) {
-            return fail((message || "Unexpected node.") + "\r\nNode " + formatSyntaxKind(node.kind) + " was unexpected.", stackCrawlMark || failBadSyntaxKind);
+            return fail("".concat(message || "Unexpected node.", "\r\nNode ").concat(formatSyntaxKind(node.kind), " was unexpected."), stackCrawlMark || failBadSyntaxKind);
         }
         Debug.failBadSyntaxKind = failBadSyntaxKind;
         function assert(expression, message, verboseDebugInfo, stackCrawlMark) {
             if (!expression) {
-                message = message ? "False expression: " + message : "False expression.";
+                message = message ? "False expression: ".concat(message) : "False expression.";
                 if (verboseDebugInfo) {
                     message += "\r\nVerbose Debug Information: " + (typeof verboseDebugInfo === "string" ? verboseDebugInfo : verboseDebugInfo());
                 }
@@ -1915,26 +1971,26 @@ var ts;
         Debug.assert = assert;
         function assertEqual(a, b, msg, msg2, stackCrawlMark) {
             if (a !== b) {
-                var message = msg ? msg2 ? msg + " " + msg2 : msg : "";
-                fail("Expected " + a + " === " + b + ". " + message, stackCrawlMark || assertEqual);
+                var message = msg ? msg2 ? "".concat(msg, " ").concat(msg2) : msg : "";
+                fail("Expected ".concat(a, " === ").concat(b, ". ").concat(message), stackCrawlMark || assertEqual);
             }
         }
         Debug.assertEqual = assertEqual;
         function assertLessThan(a, b, msg, stackCrawlMark) {
             if (a >= b) {
-                fail("Expected " + a + " < " + b + ". " + (msg || ""), stackCrawlMark || assertLessThan);
+                fail("Expected ".concat(a, " < ").concat(b, ". ").concat(msg || ""), stackCrawlMark || assertLessThan);
             }
         }
         Debug.assertLessThan = assertLessThan;
         function assertLessThanOrEqual(a, b, stackCrawlMark) {
             if (a > b) {
-                fail("Expected " + a + " <= " + b, stackCrawlMark || assertLessThanOrEqual);
+                fail("Expected ".concat(a, " <= ").concat(b), stackCrawlMark || assertLessThanOrEqual);
             }
         }
         Debug.assertLessThanOrEqual = assertLessThanOrEqual;
         function assertGreaterThanOrEqual(a, b, stackCrawlMark) {
             if (a < b) {
-                fail("Expected " + a + " >= " + b, stackCrawlMark || assertGreaterThanOrEqual);
+                fail("Expected ".concat(a, " >= ").concat(b), stackCrawlMark || assertGreaterThanOrEqual);
             }
         }
         Debug.assertGreaterThanOrEqual = assertGreaterThanOrEqual;
@@ -1966,45 +2022,47 @@ var ts;
         function assertNever(member, message, stackCrawlMark) {
             if (message === void 0) { message = "Illegal value:"; }
             var detail = typeof member === "object" && ts.hasProperty(member, "kind") && ts.hasProperty(member, "pos") && formatSyntaxKind ? "SyntaxKind: " + formatSyntaxKind(member.kind) : JSON.stringify(member);
-            return fail(message + " " + detail, stackCrawlMark || assertNever);
+            return fail("".concat(message, " ").concat(detail), stackCrawlMark || assertNever);
         }
         Debug.assertNever = assertNever;
         function assertEachNode(nodes, test, message, stackCrawlMark) {
             if (shouldAssertFunction(1, "assertEachNode")) {
-                assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertEachNode);
+                assert(test === undefined || ts.every(nodes, test), message || "Unexpected node.", function () { return "Node array did not pass test '".concat(getFunctionName(test), "'."); }, stackCrawlMark || assertEachNode);
             }
         }
         Debug.assertEachNode = assertEachNode;
         function assertNode(node, test, message, stackCrawlMark) {
             if (shouldAssertFunction(1, "assertNode")) {
-                assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertNode);
+                assert(node !== undefined && (test === undefined || test(node)), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " did not pass test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertNode);
             }
         }
         Debug.assertNode = assertNode;
         function assertNotNode(node, test, message, stackCrawlMark) {
             if (shouldAssertFunction(1, "assertNotNode")) {
-                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);
+                assert(node === undefined || test === undefined || !test(node), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " should not have passed test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertNotNode);
             }
         }
         Debug.assertNotNode = assertNotNode;
         function assertOptionalNode(node, test, message, stackCrawlMark) {
             if (shouldAssertFunction(1, "assertOptionalNode")) {
-                assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " did not pass test '" + getFunctionName(test) + "'."; }, stackCrawlMark || assertOptionalNode);
+                assert(test === undefined || node === undefined || test(node), message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " did not pass test '").concat(getFunctionName(test), "'."); }, stackCrawlMark || assertOptionalNode);
             }
         }
         Debug.assertOptionalNode = assertOptionalNode;
         function assertOptionalToken(node, kind, message, stackCrawlMark) {
             if (shouldAssertFunction(1, "assertOptionalToken")) {
-                assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was not a '" + formatSyntaxKind(kind) + "' token."; }, stackCrawlMark || assertOptionalToken);
+                assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " was not a '").concat(formatSyntaxKind(kind), "' token."); }, stackCrawlMark || assertOptionalToken);
             }
         }
         Debug.assertOptionalToken = assertOptionalToken;
         function assertMissingNode(node, message, stackCrawlMark) {
             if (shouldAssertFunction(1, "assertMissingNode")) {
-                assert(node === undefined, message || "Unexpected node.", function () { return "Node " + formatSyntaxKind(node.kind) + " was unexpected'."; }, stackCrawlMark || assertMissingNode);
+                assert(node === undefined, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node.kind), " was unexpected'."); }, stackCrawlMark || assertMissingNode);
             }
         }
         Debug.assertMissingNode = assertMissingNode;
+        function type(_value) { }
+        Debug.type = type;
         function getFunctionName(func) {
             if (typeof func !== "function") {
                 return "";
@@ -2020,7 +2078,7 @@ var ts;
         }
         Debug.getFunctionName = getFunctionName;
         function formatSymbol(symbol) {
-            return "{ name: " + ts.unescapeLeadingUnderscores(symbol.escapedName) + "; flags: " + formatSymbolFlags(symbol.flags) + "; declarations: " + ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }) + " }";
+            return "{ name: ".concat(ts.unescapeLeadingUnderscores(symbol.escapedName), "; flags: ").concat(formatSymbolFlags(symbol.flags), "; declarations: ").concat(ts.map(symbol.declarations, function (node) { return formatSyntaxKind(node.kind); }), " }");
         }
         Debug.formatSymbol = formatSymbol;
         function formatEnum(value, enumObject, isFlags) {
@@ -2038,7 +2096,7 @@ var ts;
                         break;
                     }
                     if (enumValue !== 0 && enumValue & value) {
-                        result = "" + result + (result ? "|" : "") + enumName;
+                        result = "".concat(result).concat(result ? "|" : "").concat(enumName);
                         remainingFlags &= ~enumValue;
                     }
                 }
@@ -2071,6 +2129,10 @@ var ts;
             return formatEnum(kind, ts.SyntaxKind, false);
         }
         Debug.formatSyntaxKind = formatSyntaxKind;
+        function formatSnippetKind(kind) {
+            return formatEnum(kind, ts.SnippetKind, false);
+        }
+        Debug.formatSnippetKind = formatSnippetKind;
         function formatNodeFlags(flags) {
             return formatEnum(flags, ts.NodeFlags, true);
         }
@@ -2143,7 +2205,7 @@ var ts;
                                                                     this.flags & 1 ? "FlowUnreachable" :
                                                                         "UnknownFlow";
                             var remainingFlags = this.flags & ~(2048 - 1);
-                            return "" + flowHeader + (remainingFlags ? " (" + formatFlowFlags(remainingFlags) + ")" : "");
+                            return "".concat(flowHeader).concat(remainingFlags ? " (".concat(formatFlowFlags(remainingFlags), ")") : "");
                         }
                     },
                     __debugFlowFlags: { get: function () { return formatEnum(this.flags, ts.FlowFlags, true); } },
@@ -2173,7 +2235,7 @@ var ts;
                     __tsDebuggerDisplay: {
                         value: function (defaultValue) {
                             defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]");
-                            return "NodeArray " + defaultValue;
+                            return "NodeArray ".concat(defaultValue);
                         }
                     }
                 });
@@ -2219,7 +2281,7 @@ var ts;
                         var symbolHeader = this.flags & 33554432 ? "TransientSymbol" :
                             "Symbol";
                         var remainingSymbolFlags = this.flags & ~33554432;
-                        return symbolHeader + " '" + ts.symbolName(this) + "'" + (remainingSymbolFlags ? " (" + formatSymbolFlags(remainingSymbolFlags) + ")" : "");
+                        return "".concat(symbolHeader, " '").concat(ts.symbolName(this), "'").concat(remainingSymbolFlags ? " (".concat(formatSymbolFlags(remainingSymbolFlags), ")") : "");
                     }
                 },
                 __debugFlags: { get: function () { return formatSymbolFlags(this.flags); } }
@@ -2228,11 +2290,11 @@ var ts;
                 __tsDebuggerDisplay: {
                     value: function () {
                         var typeHeader = this.flags & 98304 ? "NullableType" :
-                            this.flags & 384 ? "LiteralType " + JSON.stringify(this.value) :
-                                this.flags & 2048 ? "LiteralType " + (this.value.negative ? "-" : "") + this.value.base10Value + "n" :
+                            this.flags & 384 ? "LiteralType ".concat(JSON.stringify(this.value)) :
+                                this.flags & 2048 ? "LiteralType ".concat(this.value.negative ? "-" : "").concat(this.value.base10Value, "n") :
                                     this.flags & 8192 ? "UniqueESSymbolType" :
                                         this.flags & 32 ? "EnumType" :
-                                            this.flags & 67359327 ? "IntrinsicType " + this.intrinsicName :
+                                            this.flags & 67359327 ? "IntrinsicType ".concat(this.intrinsicName) :
                                                 this.flags & 1048576 ? "UnionType" :
                                                     this.flags & 2097152 ? "IntersectionType" :
                                                         this.flags & 4194304 ? "IndexType" :
@@ -2246,12 +2308,12 @@ var ts;
                                                                                         this.objectFlags & 8 ? "TupleType" :
                                                                                             this.objectFlags & 16 ? "AnonymousType" :
                                                                                                 this.objectFlags & 32 ? "MappedType" :
-                                                                                                    this.objectFlags & 2048 ? "ReverseMappedType" :
+                                                                                                    this.objectFlags & 1024 ? "ReverseMappedType" :
                                                                                                         this.objectFlags & 256 ? "EvolvingArrayType" :
                                                                                                             "ObjectType" :
                                                                                 "Type";
-                        var remainingObjectFlags = this.flags & 524288 ? this.objectFlags & ~2367 : 0;
-                        return "" + typeHeader + (this.symbol ? " '" + ts.symbolName(this.symbol) + "'" : "") + (remainingObjectFlags ? " (" + formatObjectFlags(remainingObjectFlags) + ")" : "");
+                        var remainingObjectFlags = this.flags & 524288 ? this.objectFlags & ~1343 : 0;
+                        return "".concat(typeHeader).concat(this.symbol ? " '".concat(ts.symbolName(this.symbol), "'") : "").concat(remainingObjectFlags ? " (".concat(formatObjectFlags(remainingObjectFlags), ")") : "");
                     }
                 },
                 __debugFlags: { get: function () { return formatTypeFlags(this.flags); } },
@@ -2285,11 +2347,11 @@ var ts;
                         __tsDebuggerDisplay: {
                             value: function () {
                                 var nodeHeader = ts.isGeneratedIdentifier(this) ? "GeneratedIdentifier" :
-                                    ts.isIdentifier(this) ? "Identifier '" + ts.idText(this) + "'" :
-                                        ts.isPrivateIdentifier(this) ? "PrivateIdentifier '" + ts.idText(this) + "'" :
-                                            ts.isStringLiteral(this) ? "StringLiteral " + JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...") :
-                                                ts.isNumericLiteral(this) ? "NumericLiteral " + this.text :
-                                                    ts.isBigIntLiteral(this) ? "BigIntLiteral " + this.text + "n" :
+                                    ts.isIdentifier(this) ? "Identifier '".concat(ts.idText(this), "'") :
+                                        ts.isPrivateIdentifier(this) ? "PrivateIdentifier '".concat(ts.idText(this), "'") :
+                                            ts.isStringLiteral(this) ? "StringLiteral ".concat(JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")) :
+                                                ts.isNumericLiteral(this) ? "NumericLiteral ".concat(this.text) :
+                                                    ts.isBigIntLiteral(this) ? "BigIntLiteral ".concat(this.text, "n") :
                                                         ts.isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" :
                                                             ts.isParameter(this) ? "ParameterDeclaration" :
                                                                 ts.isConstructorDeclaration(this) ? "ConstructorDeclaration" :
@@ -2321,7 +2383,7 @@ var ts;
                                                                                                                                                                         ts.isNamedTupleMember(this) ? "NamedTupleMember" :
                                                                                                                                                                             ts.isImportTypeNode(this) ? "ImportTypeNode" :
                                                                                                                                                                                 formatSyntaxKind(this.kind);
-                                return "" + nodeHeader + (this.flags ? " (" + formatNodeFlags(this.flags) + ")" : "");
+                                return "".concat(nodeHeader).concat(this.flags ? " (".concat(formatNodeFlags(this.flags), ")") : "");
                             }
                         },
                         __debugKind: { get: function () { return formatSyntaxKind(this.kind); } },
@@ -2365,10 +2427,10 @@ var ts;
         Debug.enableDebugInfo = enableDebugInfo;
         function formatDeprecationMessage(name, error, errorAfter, since, message) {
             var deprecationMessage = error ? "DeprecationError: " : "DeprecationWarning: ";
-            deprecationMessage += "'" + name + "' ";
-            deprecationMessage += since ? "has been deprecated since v" + since : "is deprecated";
-            deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v" + errorAfter + "." : ".";
-            deprecationMessage += message ? " " + ts.formatStringFromArgs(message, [name], 0) : "";
+            deprecationMessage += "'".concat(name, "' ");
+            deprecationMessage += since ? "has been deprecated since v".concat(since) : "is deprecated";
+            deprecationMessage += error ? " and can no longer be used." : errorAfter ? " and will no longer be usable after v".concat(errorAfter, ".") : ".";
+            deprecationMessage += message ? " ".concat(ts.formatStringFromArgs(message, [name], 0)) : "";
             return deprecationMessage;
         }
         function createErrorDeprecation(name, errorAfter, since, message) {
@@ -2465,11 +2527,11 @@ var ts;
             }
         };
         Version.prototype.toString = function () {
-            var result = this.major + "." + this.minor + "." + this.patch;
+            var result = "".concat(this.major, ".").concat(this.minor, ".").concat(this.patch);
             if (ts.some(this.prerelease))
-                result += "-" + this.prerelease.join(".");
+                result += "-".concat(this.prerelease.join("."));
             if (ts.some(this.build))
-                result += "+" + this.build.join(".");
+                result += "+".concat(this.build.join("."));
             return result;
         };
         Version.zero = new Version(0, 0, 0);
@@ -2547,18 +2609,19 @@ var ts;
         return VersionRange;
     }());
     ts.VersionRange = VersionRange;
-    var logicalOrRegExp = /\s*\|\|\s*/g;
+    var logicalOrRegExp = /\|\|/g;
     var whitespaceRegExp = /\s+/g;
     var partialRegExp = /^([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:\.([xX*0]|[1-9]\d*)(?:-([a-z0-9-.]+))?(?:\+([a-z0-9-.]+))?)?)?$/i;
     var hyphenRegExp = /^\s*([a-z0-9-+.*]+)\s+-\s+([a-z0-9-+.*]+)\s*$/i;
-    var rangeRegExp = /^\s*(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;
+    var rangeRegExp = /^(~|\^|<|<=|>|>=|=)?\s*([a-z0-9-+.*]+)$/i;
     function parseRange(text) {
         var alternatives = [];
-        for (var _i = 0, _a = text.trim().split(logicalOrRegExp); _i < _a.length; _i++) {
+        for (var _i = 0, _a = ts.trimString(text).split(logicalOrRegExp); _i < _a.length; _i++) {
             var range = _a[_i];
             if (!range)
                 continue;
             var comparators = [];
+            range = ts.trimString(range);
             var match = hyphenRegExp.exec(range);
             if (match) {
                 if (!parseHyphen(match[1], match[2], comparators))
@@ -2567,7 +2630,7 @@ var ts;
             else {
                 for (var _b = 0, _c = range.split(whitespaceRegExp); _b < _c.length; _b++) {
                     var simple = _c[_b];
-                    var match_1 = rangeRegExp.exec(simple);
+                    var match_1 = rangeRegExp.exec(ts.trimString(simple));
                     if (!match_1 || !parseComparator(match_1[1], match_1[2], comparators))
                         return undefined;
                 }
@@ -2690,7 +2753,7 @@ var ts;
         return ts.map(comparators, formatComparator).join(" ");
     }
     function formatComparator(comparator) {
-        return "" + comparator.operator + comparator.operand;
+        return "".concat(comparator.operator).concat(comparator.operand);
     }
 })(ts || (ts = {}));
 var ts;
@@ -2901,8 +2964,6 @@ var ts;
     ts.perfLogger = etwModule && etwModule.logEvent ? etwModule : nullLogger;
 })(ts || (ts = {}));
 var ts;
-(function (ts) {
-})(ts || (ts = {}));
 (function (ts) {
     var tracingEnabled;
     (function (tracingEnabled) {
@@ -2910,6 +2971,7 @@ var ts;
         var traceCount = 0;
         var traceFd = 0;
         var mode;
+        var typeCatalog = [];
         var legendPath;
         var legend = [];
         ;
@@ -2920,21 +2982,22 @@ var ts;
                     fs = require("fs");
                 }
                 catch (e) {
-                    throw new Error("tracing requires having fs\n(original error: " + (e.message || e) + ")");
+                    throw new Error("tracing requires having fs\n(original error: ".concat(e.message || e, ")"));
                 }
             }
             mode = tracingMode;
+            typeCatalog.length = 0;
             if (legendPath === undefined) {
                 legendPath = ts.combinePaths(traceDir, "legend.json");
             }
             if (!fs.existsSync(traceDir)) {
                 fs.mkdirSync(traceDir, { recursive: true });
             }
-            var countPart = mode === 1 ? "." + process.pid + "-" + ++traceCount
-                : mode === 2 ? "." + process.pid
+            var countPart = mode === "build" ? ".".concat(process.pid, "-").concat(++traceCount)
+                : mode === "server" ? ".".concat(process.pid)
                     : "";
-            var tracePath = ts.combinePaths(traceDir, "trace" + countPart + ".json");
-            var typesPath = ts.combinePaths(traceDir, "types" + countPart + ".json");
+            var tracePath = ts.combinePaths(traceDir, "trace".concat(countPart, ".json"));
+            var typesPath = ts.combinePaths(traceDir, "types".concat(countPart, ".json"));
             legend.push({
                 configFilePath: configFilePath,
                 tracePath: tracePath,
@@ -2948,13 +3011,13 @@ var ts;
                     .map(function (v) { return JSON.stringify(v); }).join(",\n"));
         }
         tracingEnabled.startTracing = startTracing;
-        function stopTracing(typeCatalog) {
+        function stopTracing() {
             ts.Debug.assert(ts.tracing, "Tracing is not in progress");
-            ts.Debug.assert(!!typeCatalog === (mode !== 2));
+            ts.Debug.assert(!!typeCatalog.length === (mode !== "server"));
             fs.writeSync(traceFd, "\n]\n");
             fs.closeSync(traceFd);
             ts.tracing = undefined;
-            if (typeCatalog) {
+            if (typeCatalog.length) {
                 dumpTypes(typeCatalog);
             }
             else {
@@ -2962,6 +3025,12 @@ var ts;
             }
         }
         tracingEnabled.stopTracing = stopTracing;
+        function recordType(type) {
+            if (mode !== "server") {
+                typeCatalog.push(type);
+            }
+        }
+        tracingEnabled.recordType = recordType;
         function instant(phase, name, args) {
             writeEvent("I", phase, name, args, "\"s\":\"g\"");
         }
@@ -2996,31 +3065,41 @@ var ts;
                 writeEvent("E", phase, name, args, undefined, endTime);
             }
             else if (sampleInterval - (time % sampleInterval) <= endTime - time) {
-                writeEvent("X", phase, name, args, "\"dur\":" + (endTime - time), time);
+                writeEvent("X", phase, name, args, "\"dur\":".concat(endTime - time), time);
             }
         }
         function writeEvent(eventType, phase, name, args, extras, time) {
             if (time === void 0) { time = 1000 * ts.timestamp(); }
-            if (mode === 2 && phase === "checkTypes")
+            if (mode === "server" && phase === "checkTypes")
                 return;
             ts.performance.mark("beginTracing");
-            fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"" + eventType + "\",\"cat\":\"" + phase + "\",\"ts\":" + time + ",\"name\":\"" + name + "\"");
+            fs.writeSync(traceFd, ",\n{\"pid\":1,\"tid\":1,\"ph\":\"".concat(eventType, "\",\"cat\":\"").concat(phase, "\",\"ts\":").concat(time, ",\"name\":\"").concat(name, "\""));
             if (extras)
-                fs.writeSync(traceFd, "," + extras);
+                fs.writeSync(traceFd, ",".concat(extras));
             if (args)
-                fs.writeSync(traceFd, ",\"args\":" + JSON.stringify(args));
+                fs.writeSync(traceFd, ",\"args\":".concat(JSON.stringify(args)));
             fs.writeSync(traceFd, "}");
             ts.performance.mark("endTracing");
             ts.performance.measure("Tracing", "beginTracing", "endTracing");
         }
-        function indexFromOne(lc) {
-            return {
-                line: lc.line + 1,
-                character: lc.character + 1,
-            };
+        function getLocation(node) {
+            var file = ts.getSourceFileOfNode(node);
+            return !file
+                ? undefined
+                : {
+                    path: file.path,
+                    start: indexFromOne(ts.getLineAndCharacterOfPosition(file, node.pos)),
+                    end: indexFromOne(ts.getLineAndCharacterOfPosition(file, node.end)),
+                };
+            function indexFromOne(lc) {
+                return {
+                    line: lc.line + 1,
+                    character: lc.character + 1,
+                };
+            }
         }
         function dumpTypes(types) {
-            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
+            var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
             ts.performance.mark("beginDumpTypes");
             var typesPath = legend[legend.length - 1].typesPath;
             var typesFd = fs.openSync(typesPath, "w");
@@ -3031,14 +3110,12 @@ var ts;
                 var type = types[i];
                 var objectFlags = type.objectFlags;
                 var symbol = (_a = type.aliasSymbol) !== null && _a !== void 0 ? _a : type.symbol;
-                var firstDeclaration = (_b = symbol === null || symbol === void 0 ? void 0 : symbol.declarations) === null || _b === void 0 ? void 0 : _b[0];
-                var firstFile = firstDeclaration && ts.getSourceFileOfNode(firstDeclaration);
                 var display = void 0;
                 if ((objectFlags & 16) | (type.flags & 2944)) {
                     try {
-                        display = (_c = type.checker) === null || _c === void 0 ? void 0 : _c.typeToString(type);
+                        display = (_b = type.checker) === null || _b === void 0 ? void 0 : _b.typeToString(type);
                     }
-                    catch (_s) {
+                    catch (_y) {
                         display = undefined;
                     }
                 }
@@ -3046,26 +3123,52 @@ var ts;
                 if (type.flags & 8388608) {
                     var indexedAccessType = type;
                     indexedAccessProperties = {
-                        indexedAccessObjectType: (_d = indexedAccessType.objectType) === null || _d === void 0 ? void 0 : _d.id,
-                        indexedAccessIndexType: (_e = indexedAccessType.indexType) === null || _e === void 0 ? void 0 : _e.id,
+                        indexedAccessObjectType: (_c = indexedAccessType.objectType) === null || _c === void 0 ? void 0 : _c.id,
+                        indexedAccessIndexType: (_d = indexedAccessType.indexType) === null || _d === void 0 ? void 0 : _d.id,
                     };
                 }
                 var referenceProperties = {};
                 if (objectFlags & 4) {
                     var referenceType = type;
                     referenceProperties = {
-                        instantiatedType: (_f = referenceType.target) === null || _f === void 0 ? void 0 : _f.id,
-                        typeArguments: (_g = referenceType.resolvedTypeArguments) === null || _g === void 0 ? void 0 : _g.map(function (t) { return t.id; }),
+                        instantiatedType: (_e = referenceType.target) === null || _e === void 0 ? void 0 : _e.id,
+                        typeArguments: (_f = referenceType.resolvedTypeArguments) === null || _f === void 0 ? void 0 : _f.map(function (t) { return t.id; }),
+                        referenceLocation: getLocation(referenceType.node),
                     };
                 }
                 var conditionalProperties = {};
                 if (type.flags & 16777216) {
                     var conditionalType = type;
                     conditionalProperties = {
-                        conditionalCheckType: (_h = conditionalType.checkType) === null || _h === void 0 ? void 0 : _h.id,
-                        conditionalExtendsType: (_j = conditionalType.extendsType) === null || _j === void 0 ? void 0 : _j.id,
-                        conditionalTrueType: (_l = (_k = conditionalType.resolvedTrueType) === null || _k === void 0 ? void 0 : _k.id) !== null && _l !== void 0 ? _l : -1,
-                        conditionalFalseType: (_o = (_m = conditionalType.resolvedFalseType) === null || _m === void 0 ? void 0 : _m.id) !== null && _o !== void 0 ? _o : -1,
+                        conditionalCheckType: (_g = conditionalType.checkType) === null || _g === void 0 ? void 0 : _g.id,
+                        conditionalExtendsType: (_h = conditionalType.extendsType) === null || _h === void 0 ? void 0 : _h.id,
+                        conditionalTrueType: (_k = (_j = conditionalType.resolvedTrueType) === null || _j === void 0 ? void 0 : _j.id) !== null && _k !== void 0 ? _k : -1,
+                        conditionalFalseType: (_m = (_l = conditionalType.resolvedFalseType) === null || _l === void 0 ? void 0 : _l.id) !== null && _m !== void 0 ? _m : -1,
+                    };
+                }
+                var substitutionProperties = {};
+                if (type.flags & 33554432) {
+                    var substitutionType = type;
+                    substitutionProperties = {
+                        substitutionBaseType: (_o = substitutionType.baseType) === null || _o === void 0 ? void 0 : _o.id,
+                        substituteType: (_p = substitutionType.substitute) === null || _p === void 0 ? void 0 : _p.id,
+                    };
+                }
+                var reverseMappedProperties = {};
+                if (objectFlags & 1024) {
+                    var reverseMappedType = type;
+                    reverseMappedProperties = {
+                        reverseMappedSourceType: (_q = reverseMappedType.source) === null || _q === void 0 ? void 0 : _q.id,
+                        reverseMappedMappedType: (_r = reverseMappedType.mappedType) === null || _r === void 0 ? void 0 : _r.id,
+                        reverseMappedConstraintType: (_s = reverseMappedType.constraintType) === null || _s === void 0 ? void 0 : _s.id,
+                    };
+                }
+                var evolvingArrayProperties = {};
+                if (objectFlags & 256) {
+                    var evolvingArrayType = type;
+                    evolvingArrayProperties = {
+                        evolvingArrayElementType: evolvingArrayType.elementType.id,
+                        evolvingArrayFinalType: (_t = evolvingArrayType.finalArrayType) === null || _t === void 0 ? void 0 : _t.id,
                     };
                 }
                 var recursionToken = void 0;
@@ -3077,11 +3180,7 @@ var ts;
                         recursionIdentityMap.set(recursionIdentity, recursionToken);
                     }
                 }
-                var descriptor = __assign(__assign(__assign(__assign({ id: type.id, intrinsicName: type.intrinsicName, symbolName: (symbol === null || symbol === void 0 ? void 0 : symbol.escapedName) && ts.unescapeLeadingUnderscores(symbol.escapedName), recursionId: recursionToken, unionTypes: (type.flags & 1048576) ? (_p = type.types) === null || _p === void 0 ? void 0 : _p.map(function (t) { return t.id; }) : undefined, intersectionTypes: (type.flags & 2097152) ? type.types.map(function (t) { return t.id; }) : undefined, aliasTypeArguments: (_q = type.aliasTypeArguments) === null || _q === void 0 ? void 0 : _q.map(function (t) { return t.id; }), keyofType: (type.flags & 4194304) ? (_r = type.type) === null || _r === void 0 ? void 0 : _r.id : undefined }, indexedAccessProperties), referenceProperties), conditionalProperties), { firstDeclaration: firstDeclaration && {
-                        path: firstFile.path,
-                        start: indexFromOne(ts.getLineAndCharacterOfPosition(firstFile, firstDeclaration.pos)),
-                        end: indexFromOne(ts.getLineAndCharacterOfPosition(ts.getSourceFileOfNode(firstDeclaration), firstDeclaration.end)),
-                    }, flags: ts.Debug.formatTypeFlags(type.flags).split("|"), display: display });
+                var descriptor = __assign(__assign(__assign(__assign(__assign(__assign(__assign({ id: type.id, intrinsicName: type.intrinsicName, symbolName: (symbol === null || symbol === void 0 ? void 0 : symbol.escapedName) && ts.unescapeLeadingUnderscores(symbol.escapedName), recursionId: recursionToken, isTuple: objectFlags & 8 ? true : undefined, unionTypes: (type.flags & 1048576) ? (_u = type.types) === null || _u === void 0 ? void 0 : _u.map(function (t) { return t.id; }) : undefined, intersectionTypes: (type.flags & 2097152) ? type.types.map(function (t) { return t.id; }) : undefined, aliasTypeArguments: (_v = type.aliasTypeArguments) === null || _v === void 0 ? void 0 : _v.map(function (t) { return t.id; }), keyofType: (type.flags & 4194304) ? (_w = type.type) === null || _w === void 0 ? void 0 : _w.id : undefined }, indexedAccessProperties), referenceProperties), conditionalProperties), substitutionProperties), reverseMappedProperties), evolvingArrayProperties), { destructuringPattern: getLocation(type.pattern), firstDeclaration: getLocation((_x = symbol === null || symbol === void 0 ? void 0 : symbol.declarations) === null || _x === void 0 ? void 0 : _x[0]), flags: ts.Debug.formatTypeFlags(type.flags).split("|"), display: display });
                 fs.writeSync(typesFd, JSON.stringify(descriptor));
                 if (i < numTypes - 1) {
                     fs.writeSync(typesFd, ",\n");
@@ -3099,10 +3198,9 @@ var ts;
             fs.writeFileSync(legendPath, JSON.stringify(legend));
         }
         tracingEnabled.dumpLegend = dumpLegend;
-    })(tracingEnabled = ts.tracingEnabled || (ts.tracingEnabled = {}));
-})(ts || (ts = {}));
-(function (ts) {
-    ts.startTracing = ts.tracingEnabled.startTracing;
+    })(tracingEnabled || (tracingEnabled = {}));
+    ts.startTracing = tracingEnabled.startTracing;
+    ts.dumpTracingLegend = tracingEnabled.dumpLegend;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -3165,26 +3263,31 @@ var ts;
     (function (ModuleResolutionKind) {
         ModuleResolutionKind[ModuleResolutionKind["Classic"] = 1] = "Classic";
         ModuleResolutionKind[ModuleResolutionKind["NodeJs"] = 2] = "NodeJs";
+        ModuleResolutionKind[ModuleResolutionKind["Node12"] = 3] = "Node12";
+        ModuleResolutionKind[ModuleResolutionKind["NodeNext"] = 99] = "NodeNext";
     })(ModuleResolutionKind = ts.ModuleResolutionKind || (ts.ModuleResolutionKind = {}));
     var WatchFileKind;
     (function (WatchFileKind) {
         WatchFileKind[WatchFileKind["FixedPollingInterval"] = 0] = "FixedPollingInterval";
         WatchFileKind[WatchFileKind["PriorityPollingInterval"] = 1] = "PriorityPollingInterval";
         WatchFileKind[WatchFileKind["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling";
-        WatchFileKind[WatchFileKind["UseFsEvents"] = 3] = "UseFsEvents";
-        WatchFileKind[WatchFileKind["UseFsEventsOnParentDirectory"] = 4] = "UseFsEventsOnParentDirectory";
+        WatchFileKind[WatchFileKind["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling";
+        WatchFileKind[WatchFileKind["UseFsEvents"] = 4] = "UseFsEvents";
+        WatchFileKind[WatchFileKind["UseFsEventsOnParentDirectory"] = 5] = "UseFsEventsOnParentDirectory";
     })(WatchFileKind = ts.WatchFileKind || (ts.WatchFileKind = {}));
     var WatchDirectoryKind;
     (function (WatchDirectoryKind) {
         WatchDirectoryKind[WatchDirectoryKind["UseFsEvents"] = 0] = "UseFsEvents";
         WatchDirectoryKind[WatchDirectoryKind["FixedPollingInterval"] = 1] = "FixedPollingInterval";
         WatchDirectoryKind[WatchDirectoryKind["DynamicPriorityPolling"] = 2] = "DynamicPriorityPolling";
+        WatchDirectoryKind[WatchDirectoryKind["FixedChunkSizePolling"] = 3] = "FixedChunkSizePolling";
     })(WatchDirectoryKind = ts.WatchDirectoryKind || (ts.WatchDirectoryKind = {}));
     var PollingWatchKind;
     (function (PollingWatchKind) {
         PollingWatchKind[PollingWatchKind["FixedInterval"] = 0] = "FixedInterval";
         PollingWatchKind[PollingWatchKind["PriorityInterval"] = 1] = "PriorityInterval";
         PollingWatchKind[PollingWatchKind["DynamicPriority"] = 2] = "DynamicPriority";
+        PollingWatchKind[PollingWatchKind["FixedChunkSize"] = 3] = "FixedChunkSize";
     })(PollingWatchKind = ts.PollingWatchKind || (ts.PollingWatchKind = {}));
     var ModuleKind;
     (function (ModuleKind) {
@@ -3195,7 +3298,10 @@ var ts;
         ModuleKind[ModuleKind["System"] = 4] = "System";
         ModuleKind[ModuleKind["ES2015"] = 5] = "ES2015";
         ModuleKind[ModuleKind["ES2020"] = 6] = "ES2020";
+        ModuleKind[ModuleKind["ES2022"] = 7] = "ES2022";
         ModuleKind[ModuleKind["ESNext"] = 99] = "ESNext";
+        ModuleKind[ModuleKind["Node12"] = 100] = "Node12";
+        ModuleKind[ModuleKind["NodeNext"] = 199] = "NodeNext";
     })(ModuleKind = ts.ModuleKind || (ts.ModuleKind = {}));
     ts.commentPragmas = {
         "reference": {
@@ -3419,7 +3525,7 @@ var ts;
         var rest = path.substring(rootLength).split(ts.directorySeparator);
         if (rest.length && !ts.lastOrUndefined(rest))
             rest.pop();
-        return __spreadArray([root], rest);
+        return __spreadArray([root], rest, true);
     }
     function getPathComponents(path, currentDirectory) {
         if (currentDirectory === void 0) { currentDirectory = ""; }
@@ -3435,6 +3541,11 @@ var ts;
     }
     ts.getPathFromPathComponents = getPathFromPathComponents;
     function normalizeSlashes(path) {
+        var index = path.indexOf("\\");
+        if (index === -1) {
+            return path;
+        }
+        backslashRegExp.lastIndex = index;
         return path.replace(backslashRegExp, ts.directorySeparator);
     }
     ts.normalizeSlashes = normalizeSlashes;
@@ -3490,7 +3601,7 @@ var ts;
         for (var _i = 1; _i < arguments.length; _i++) {
             paths[_i - 1] = arguments[_i];
         }
-        return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArray([path], paths)) : normalizeSlashes(path));
+        return normalizePath(ts.some(paths) ? combinePaths.apply(void 0, __spreadArray([path], paths, false)) : normalizeSlashes(path));
     }
     ts.resolvePath = resolvePath;
     function getNormalizedPathComponents(path, currentDirectory) {
@@ -3503,6 +3614,16 @@ var ts;
     ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath;
     function normalizePath(path) {
         path = normalizeSlashes(path);
+        if (!relativePathSegmentRegExp.test(path)) {
+            return path;
+        }
+        var simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, "");
+        if (simplified !== path) {
+            path = simplified;
+            if (!relativePathSegmentRegExp.test(path)) {
+                return path;
+            }
+        }
         var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path)));
         return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized;
     }
@@ -3558,7 +3679,7 @@ var ts;
         return pathext ? path.slice(0, path.length - pathext.length) + (ts.startsWith(ext, ".") ? ext : "." + ext) : path;
     }
     ts.changeAnyExtension = changeAnyExtension;
-    var relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/;
+    var relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/;
     function comparePathsWorker(a, b, componentComparer) {
         if (a === b)
             return 0;
@@ -3659,7 +3780,7 @@ var ts;
         for (; start < fromComponents.length; start++) {
             relative.push("..");
         }
-        return __spreadArray(__spreadArray([""], relative), components);
+        return __spreadArray(__spreadArray([""], relative, true), components, true);
     }
     ts.getPathComponentsRelativeTo = getPathComponentsRelativeTo;
     function getRelativePathFromDirectory(fromDirectory, to, getCanonicalFileNameOrIgnoreCase) {
@@ -3738,6 +3859,10 @@ var ts;
         PollingInterval[PollingInterval["Low"] = 250] = "Low";
     })(PollingInterval = ts.PollingInterval || (ts.PollingInterval = {}));
     ts.missingFileModifiedTime = new Date(0);
+    function getModifiedTime(host, fileName) {
+        return host.getModifiedTime(fileName) || ts.missingFileModifiedTime;
+    }
+    ts.getModifiedTime = getModifiedTime;
     function createPollingIntervalBasedLevels(levels) {
         var _a;
         return _a = {},
@@ -3757,7 +3882,7 @@ var ts;
         pollingChunkSize = getCustomPollingBasedLevels("TSC_WATCH_POLLINGCHUNKSIZE", defaultChunkLevels) || pollingChunkSize;
         ts.unchangedPollThresholds = getCustomPollingBasedLevels("TSC_WATCH_UNCHANGEDPOLLTHRESHOLDS", defaultChunkLevels) || ts.unchangedPollThresholds;
         function getLevel(envVar, level) {
-            return system.getEnvironmentVariable(envVar + "_" + level.toUpperCase());
+            return system.getEnvironmentVariable("".concat(envVar, "_").concat(level.toUpperCase()));
         }
         function getCustomLevels(baseVariable) {
             var customLevels;
@@ -3792,6 +3917,44 @@ var ts;
         }
     }
     ts.setCustomPollingValues = setCustomPollingValues;
+    function pollWatchedFileQueue(host, queue, pollIndex, chunkSize, callbackOnWatchFileStat) {
+        var definedValueCopyToIndex = pollIndex;
+        for (var canVisit = queue.length; chunkSize && canVisit; nextPollIndex(), canVisit--) {
+            var watchedFile = queue[pollIndex];
+            if (!watchedFile) {
+                continue;
+            }
+            else if (watchedFile.isClosed) {
+                queue[pollIndex] = undefined;
+                continue;
+            }
+            chunkSize--;
+            var fileChanged = onWatchedFileStat(watchedFile, getModifiedTime(host, watchedFile.fileName));
+            if (watchedFile.isClosed) {
+                queue[pollIndex] = undefined;
+                continue;
+            }
+            callbackOnWatchFileStat === null || callbackOnWatchFileStat === void 0 ? void 0 : callbackOnWatchFileStat(watchedFile, pollIndex, fileChanged);
+            if (queue[pollIndex]) {
+                if (definedValueCopyToIndex < pollIndex) {
+                    queue[definedValueCopyToIndex] = watchedFile;
+                    queue[pollIndex] = undefined;
+                }
+                definedValueCopyToIndex++;
+            }
+        }
+        return pollIndex;
+        function nextPollIndex() {
+            pollIndex++;
+            if (pollIndex === queue.length) {
+                if (definedValueCopyToIndex < pollIndex) {
+                    queue.length = definedValueCopyToIndex;
+                }
+                pollIndex = 0;
+                definedValueCopyToIndex = 0;
+            }
+        }
+    }
     function createDynamicPriorityPollingWatchFile(host) {
         var watchedFiles = [];
         var changedFilesInLastPoll = [];
@@ -3804,7 +3967,7 @@ var ts;
                 fileName: fileName,
                 callback: callback,
                 unchangedPolls: 0,
-                mtime: getModifiedTime(fileName)
+                mtime: getModifiedTime(host, fileName)
             };
             watchedFiles.push(file);
             addToPollingIntervalQueue(file, defaultPollingInterval);
@@ -3840,23 +4003,9 @@ var ts;
             }
         }
         function pollQueue(queue, pollingInterval, pollIndex, chunkSize) {
-            var needsVisit = queue.length;
-            var definedValueCopyToIndex = pollIndex;
-            for (var polled = 0; polled < chunkSize && needsVisit > 0; nextPollIndex(), needsVisit--) {
-                var watchedFile = queue[pollIndex];
-                if (!watchedFile) {
-                    continue;
-                }
-                else if (watchedFile.isClosed) {
-                    queue[pollIndex] = undefined;
-                    continue;
-                }
-                polled++;
-                var fileChanged = onWatchedFileStat(watchedFile, getModifiedTime(watchedFile.fileName));
-                if (watchedFile.isClosed) {
-                    queue[pollIndex] = undefined;
-                }
-                else if (fileChanged) {
+            return pollWatchedFileQueue(host, queue, pollIndex, chunkSize, onWatchFileStat);
+            function onWatchFileStat(watchedFile, pollIndex, fileChanged) {
+                if (fileChanged) {
                     watchedFile.unchangedPolls = 0;
                     if (queue !== changedFilesInLastPoll) {
                         queue[pollIndex] = undefined;
@@ -3876,24 +4025,6 @@ var ts;
                     queue[pollIndex] = undefined;
                     addToPollingIntervalQueue(watchedFile, pollingInterval === PollingInterval.Low ? PollingInterval.Medium : PollingInterval.High);
                 }
-                if (queue[pollIndex]) {
-                    if (definedValueCopyToIndex < pollIndex) {
-                        queue[definedValueCopyToIndex] = watchedFile;
-                        queue[pollIndex] = undefined;
-                    }
-                    definedValueCopyToIndex++;
-                }
-            }
-            return pollIndex;
-            function nextPollIndex() {
-                pollIndex++;
-                if (pollIndex === queue.length) {
-                    if (definedValueCopyToIndex < pollIndex) {
-                        queue.length = definedValueCopyToIndex;
-                    }
-                    pollIndex = 0;
-                    definedValueCopyToIndex = 0;
-                }
             }
         }
         function pollingIntervalQueue(pollingInterval) {
@@ -3922,9 +4053,6 @@ var ts;
         function scheduleNextPoll(pollingInterval) {
             pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === PollingInterval.Low ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingIntervalQueue(pollingInterval));
         }
-        function getModifiedTime(fileName) {
-            return host.getModifiedTime(fileName) || ts.missingFileModifiedTime;
-        }
     }
     ts.createDynamicPriorityPollingWatchFile = createDynamicPriorityPollingWatchFile;
     function createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames) {
@@ -3954,9 +4082,8 @@ var ts;
         }
         function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
             var watcher = fsWatch(dirName, 1, function (_eventName, relativeFileName) {
-                if (!ts.isString(relativeFileName)) {
+                if (!ts.isString(relativeFileName))
                     return;
-                }
                 var fileName = ts.getNormalizedAbsolutePath(relativeFileName, dirName);
                 var callbacks = fileName && fileWatcherCallbacks.get(toCanonicalName(fileName));
                 if (callbacks) {
@@ -3971,6 +4098,37 @@ var ts;
             return watcher;
         }
     }
+    function createFixedChunkSizePollingWatchFile(host) {
+        var watchedFiles = [];
+        var pollIndex = 0;
+        var pollScheduled;
+        return watchFile;
+        function watchFile(fileName, callback) {
+            var file = {
+                fileName: fileName,
+                callback: callback,
+                mtime: getModifiedTime(host, fileName)
+            };
+            watchedFiles.push(file);
+            scheduleNextPoll();
+            return {
+                close: function () {
+                    file.isClosed = true;
+                    ts.unorderedRemoveItem(watchedFiles, file);
+                }
+            };
+        }
+        function pollQueue() {
+            pollScheduled = undefined;
+            pollIndex = pollWatchedFileQueue(host, watchedFiles, pollIndex, pollingChunkSize[PollingInterval.Low]);
+            scheduleNextPoll();
+        }
+        function scheduleNextPoll() {
+            if (!watchedFiles.length || pollScheduled)
+                return;
+            pollScheduled = host.setTimeout(pollQueue, PollingInterval.High);
+        }
+    }
     function createSingleFileWatcherPerName(watchFile, useCaseSensitiveFileNames) {
         var cache = new ts.Map();
         var callbacksCache = ts.createMultiMap();
@@ -4144,7 +4302,7 @@ var ts;
         }
         function onTimerToUpdateChildWatches() {
             timerToUpdateChildWatches = undefined;
-            ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size);
+            ts.sysLog("sysLog:: onTimerToUpdateChildWatches:: ".concat(cacheToUpdateChildWatches.size));
             var start = ts.timestamp();
             var invokeMap = new ts.Map();
             while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
@@ -4155,7 +4313,7 @@ var ts;
                 var hasChanges = updateChildWatches(dirName, dirPath, options);
                 invokeCallbacks(dirPath, invokeMap, hasChanges ? undefined : fileNames);
             }
-            ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: " + (ts.timestamp() - start) + "ms:: " + cacheToUpdateChildWatches.size);
+            ts.sysLog("sysLog:: invokingWatchers:: Elapsed:: ".concat(ts.timestamp() - start, "ms:: ").concat(cacheToUpdateChildWatches.size));
             callbackCache.forEach(function (callbacks, rootDirName) {
                 var existing = invokeMap.get(rootDirName);
                 if (existing) {
@@ -4171,7 +4329,7 @@ var ts;
                 }
             });
             var elapsed = ts.timestamp() - start;
-            ts.sysLog("sysLog:: Elapsed:: " + elapsed + "ms:: onTimerToUpdateChildWatches:: " + cacheToUpdateChildWatches.size + " " + timerToUpdateChildWatches);
+            ts.sysLog("sysLog:: Elapsed:: ".concat(elapsed, "ms:: onTimerToUpdateChildWatches:: ").concat(cacheToUpdateChildWatches.size, " ").concat(timerToUpdateChildWatches));
         }
         function removeChildWatches(parentWatcher) {
             if (!parentWatcher)
@@ -4245,8 +4403,9 @@ var ts;
         };
     }
     function createSystemWatchFunctions(_a) {
-        var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, fileExists = _a.fileExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory;
+        var pollingWatchFile = _a.pollingWatchFile, getModifiedTime = _a.getModifiedTime, setTimeout = _a.setTimeout, clearTimeout = _a.clearTimeout, fsWatch = _a.fsWatch, fileExists = _a.fileExists, useCaseSensitiveFileNames = _a.useCaseSensitiveFileNames, getCurrentDirectory = _a.getCurrentDirectory, fsSupportsRecursiveFsWatch = _a.fsSupportsRecursiveFsWatch, directoryExists = _a.directoryExists, getAccessibleSortedChildDirectories = _a.getAccessibleSortedChildDirectories, realpath = _a.realpath, tscWatchFile = _a.tscWatchFile, useNonPollingWatchers = _a.useNonPollingWatchers, tscWatchDirectory = _a.tscWatchDirectory, defaultWatchFileKind = _a.defaultWatchFileKind;
         var dynamicPollingWatchFile;
+        var fixedChunkSizePollingWatchFile;
         var nonPollingWatchFile;
         var hostRecursiveDirectoryWatcher;
         return {
@@ -4263,6 +4422,8 @@ var ts;
                     return pollingWatchFile(fileName, callback, pollingInterval, undefined);
                 case ts.WatchFileKind.DynamicPriorityPolling:
                     return ensureDynamicPollingWatchFile()(fileName, callback, pollingInterval, undefined);
+                case ts.WatchFileKind.FixedChunkSizePolling:
+                    return ensureFixedChunkSizePollingWatchFile()(fileName, callback, undefined, undefined);
                 case ts.WatchFileKind.UseFsEvents:
                     return fsWatch(fileName, 0, createFsWatchCallbackForFileWatcherCallback(fileName, callback, fileExists), false, pollingInterval, ts.getFallbackOptions(options));
                 case ts.WatchFileKind.UseFsEventsOnParentDirectory:
@@ -4275,8 +4436,10 @@ var ts;
             }
         }
         function ensureDynamicPollingWatchFile() {
-            return dynamicPollingWatchFile ||
-                (dynamicPollingWatchFile = createDynamicPriorityPollingWatchFile({ getModifiedTime: getModifiedTime, setTimeout: setTimeout }));
+            return dynamicPollingWatchFile || (dynamicPollingWatchFile = createDynamicPriorityPollingWatchFile({ getModifiedTime: getModifiedTime, setTimeout: setTimeout }));
+        }
+        function ensureFixedChunkSizePollingWatchFile() {
+            return fixedChunkSizePollingWatchFile || (fixedChunkSizePollingWatchFile = createFixedChunkSizePollingWatchFile({ getModifiedTime: getModifiedTime, setTimeout: setTimeout }));
         }
         function updateOptionsForWatchFile(options, useNonPollingWatchers) {
             if (options && options.watchFile !== undefined)
@@ -4295,7 +4458,7 @@ var ts;
                 default:
                     return useNonPollingWatchers ?
                         generateWatchFileOptions(ts.WatchFileKind.UseFsEventsOnParentDirectory, ts.PollingWatchKind.PriorityInterval, options) :
-                        { watchFile: ts.WatchFileKind.FixedPollingInterval };
+                        { watchFile: (defaultWatchFileKind === null || defaultWatchFileKind === void 0 ? void 0 : defaultWatchFileKind()) || ts.WatchFileKind.FixedPollingInterval };
             }
         }
         function generateWatchFileOptions(watchFile, fallbackPolling, options) {
@@ -4334,6 +4497,8 @@ var ts;
                     return pollingWatchFile(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, undefined);
                 case ts.WatchDirectoryKind.DynamicPriorityPolling:
                     return ensureDynamicPollingWatchFile()(directoryName, function () { return callback(directoryName); }, PollingInterval.Medium, undefined);
+                case ts.WatchDirectoryKind.FixedChunkSizePolling:
+                    return ensureFixedChunkSizePollingWatchFile()(directoryName, function () { return callback(directoryName); }, undefined, undefined);
                 case ts.WatchDirectoryKind.UseFsEvents:
                     return fsWatch(directoryName, 1, createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory), recursive, PollingInterval.Medium, ts.getFallbackOptions(watchDirectoryOptions));
                 default:
@@ -4399,13 +4564,14 @@ var ts;
             }
             var activeSession;
             var profilePath = "./profile.cpuprofile";
-            var realpathSync = (_a = _fs.realpathSync.native) !== null && _a !== void 0 ? _a : _fs.realpathSync;
+            var hitSystemWatcherLimit = false;
             var Buffer = require("buffer").Buffer;
             var nodeVersion = getNodeMajorVersion();
             var isNode4OrLater = nodeVersion >= 4;
             var isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin";
             var platform = _os.platform();
             var useCaseSensitiveFileNames = isFileSystemCaseSensitive();
+            var realpathSync = (_a = _fs.realpathSync.native) !== null && _a !== void 0 ? _a : _fs.realpathSync;
             var fsSupportsRecursiveFsWatch = isNode4OrLater && (process.platform === "win32" || process.platform === "darwin");
             var getCurrentDirectory = ts.memoize(function () { return process.cwd(); });
             var _c = createSystemWatchFunctions({
@@ -4424,6 +4590,7 @@ var ts;
                 tscWatchFile: process.env.TSC_WATCHFILE,
                 useNonPollingWatchers: process.env.TSC_NONPOLLING_WATCHER,
                 tscWatchDirectory: process.env.TSC_WATCHDIRECTORY,
+                defaultWatchFileKind: function () { var _a, _b; return (_b = (_a = sys).defaultWatchFileKind) === null || _b === void 0 ? void 0 : _b.call(_a); },
             }), watchFile = _c.watchFile, watchDirectory = _c.watchDirectory;
             var nodeSystem = {
                 args: process.argv.slice(2),
@@ -4432,6 +4599,9 @@ var ts;
                 write: function (s) {
                     process.stdout.write(s);
                 },
+                getWidthOfTerminal: function () {
+                    return process.stdout.columns;
+                },
                 writeOutputIsTTY: function () {
                     return process.stdout.isTTY;
                 },
@@ -4551,7 +4721,7 @@ var ts;
                 var externalFileCounter = 0;
                 var remappedPaths = new ts.Map();
                 var normalizedDir = ts.normalizeSlashes(__dirname);
-                var fileUrlRoot = "file://" + (ts.getRootLength(normalizedDir) === 1 ? "" : "/") + normalizedDir;
+                var fileUrlRoot = "file://".concat(ts.getRootLength(normalizedDir) === 1 ? "" : "/").concat(normalizedDir);
                 for (var _i = 0, _a = profile.nodes; _i < _a.length; _i++) {
                     var node = _a[_i];
                     if (node.callFrame.url) {
@@ -4560,7 +4730,7 @@ var ts;
                             node.callFrame.url = ts.getRelativePathToDirectoryOrUrl(fileUrlRoot, url, fileUrlRoot, ts.createGetCanonicalFileName(useCaseSensitiveFileNames), true);
                         }
                         else if (!nativePattern.test(url)) {
-                            node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external" + externalFileCounter + ".js")).get(url);
+                            node.callFrame.url = (remappedPaths.has(url) ? remappedPaths : remappedPaths.set(url, "external".concat(externalFileCounter, ".js"))).get(url);
                             externalFileCounter++;
                         }
                     }
@@ -4576,7 +4746,7 @@ var ts;
                         if (!err) {
                             try {
                                 if ((_b = statSync(profilePath)) === null || _b === void 0 ? void 0 : _b.isDirectory()) {
-                                    profilePath = _path.join(profilePath, (new Date()).toISOString().replace(/:/g, "-") + "+P" + process.pid + ".cpuprofile");
+                                    profilePath = _path.join(profilePath, "".concat((new Date()).toISOString().replace(/:/g, "-"), "+P").concat(process.pid, ".cpuprofile"));
                                 }
                             }
                             catch (_c) {
@@ -4661,7 +4831,7 @@ var ts;
                     }
                 };
                 function invokeCallbackAndUpdateWatcher(createWatcher) {
-                    ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing watcher to " + (createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing") + "FileSystemEntryWatcher");
+                    ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
                     callback("rename", "");
                     if (watcher) {
                         watcher.close();
@@ -4677,6 +4847,10 @@ var ts;
                             options = { persistent: true };
                         }
                     }
+                    if (hitSystemWatcherLimit) {
+                        ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Defaulting to fsWatchFile"));
+                        return watchPresentFileSystemEntryWithFsWatchFile();
+                    }
                     try {
                         var presentWatcher = _fs.watch(fileOrDirectory, options, isLinuxOrMacOs ?
                             callbackChangingToMissingFileSystemEntry :
@@ -4685,6 +4859,8 @@ var ts;
                         return presentWatcher;
                     }
                     catch (e) {
+                        hitSystemWatcherLimit || (hitSystemWatcherLimit = e.code === "ENOSPC");
+                        ts.sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing to fsWatchFile"));
                         return watchPresentFileSystemEntryWithFsWatchFile();
                     }
                 }
@@ -4698,7 +4874,6 @@ var ts;
                         callback(event, relativeName);
                 }
                 function watchPresentFileSystemEntryWithFsWatchFile() {
-                    ts.sysLog("sysLog:: " + fileOrDirectory + ":: Changing to fsWatchFile");
                     return watchFile(fileOrDirectory, createFileWatcherCallback(callback), fallbackPollingInterval, fallbackOptions);
                 }
                 function watchMissingFileSystemEntry() {
@@ -4881,6 +5056,10 @@ var ts;
         }
         return sys;
     })();
+    function setSys(s) {
+        ts.sys = s;
+    }
+    ts.setSys = setSys;
     if (ts.sys && ts.sys.getEnvironmentVariable) {
         setCustomPollingValues(ts.sys);
         ts.Debug.setAssertionLevel(/^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))
@@ -4916,7 +5095,6 @@ var ts;
         An_index_signature_parameter_cannot_have_an_initializer: diag(1020, ts.DiagnosticCategory.Error, "An_index_signature_parameter_cannot_have_an_initializer_1020", "An index signature parameter cannot have an initializer."),
         An_index_signature_must_have_a_type_annotation: diag(1021, ts.DiagnosticCategory.Error, "An_index_signature_must_have_a_type_annotation_1021", "An index signature must have a type annotation."),
         An_index_signature_parameter_must_have_a_type_annotation: diag(1022, ts.DiagnosticCategory.Error, "An_index_signature_parameter_must_have_a_type_annotation_1022", "An index signature parameter must have a type annotation."),
-        An_index_signature_parameter_type_must_be_either_string_or_number: diag(1023, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_either_string_or_number_1023", "An index signature parameter type must be either 'string' or 'number'."),
         readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature: diag(1024, ts.DiagnosticCategory.Error, "readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature_1024", "'readonly' modifier can only appear on a property declaration or index signature."),
         An_index_signature_cannot_have_a_trailing_comma: diag(1025, ts.DiagnosticCategory.Error, "An_index_signature_cannot_have_a_trailing_comma_1025", "An index signature cannot have a trailing comma."),
         Accessibility_modifier_already_seen: diag(1028, ts.DiagnosticCategory.Error, "Accessibility_modifier_already_seen_1028", "Accessibility modifier already seen."),
@@ -4929,11 +5107,8 @@ var ts;
         A_declare_modifier_cannot_be_used_in_an_already_ambient_context: diag(1038, ts.DiagnosticCategory.Error, "A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038", "A 'declare' modifier cannot be used in an already ambient context."),
         Initializers_are_not_allowed_in_ambient_contexts: diag(1039, ts.DiagnosticCategory.Error, "Initializers_are_not_allowed_in_ambient_contexts_1039", "Initializers are not allowed in ambient contexts."),
         _0_modifier_cannot_be_used_in_an_ambient_context: diag(1040, ts.DiagnosticCategory.Error, "_0_modifier_cannot_be_used_in_an_ambient_context_1040", "'{0}' modifier cannot be used in an ambient context."),
-        _0_modifier_cannot_be_used_with_a_class_declaration: diag(1041, ts.DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_class_declaration_1041", "'{0}' modifier cannot be used with a class declaration."),
         _0_modifier_cannot_be_used_here: diag(1042, ts.DiagnosticCategory.Error, "_0_modifier_cannot_be_used_here_1042", "'{0}' modifier cannot be used here."),
-        _0_modifier_cannot_appear_on_a_data_property: diag(1043, ts.DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_data_property_1043", "'{0}' modifier cannot appear on a data property."),
         _0_modifier_cannot_appear_on_a_module_or_namespace_element: diag(1044, ts.DiagnosticCategory.Error, "_0_modifier_cannot_appear_on_a_module_or_namespace_element_1044", "'{0}' modifier cannot appear on a module or namespace element."),
-        A_0_modifier_cannot_be_used_with_an_interface_declaration: diag(1045, ts.DiagnosticCategory.Error, "A_0_modifier_cannot_be_used_with_an_interface_declaration_1045", "A '{0}' modifier cannot be used with an interface declaration."),
         Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier: diag(1046, ts.DiagnosticCategory.Error, "Top_level_declarations_in_d_ts_files_must_start_with_either_a_declare_or_export_modifier_1046", "Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier."),
         A_rest_parameter_cannot_be_optional: diag(1047, ts.DiagnosticCategory.Error, "A_rest_parameter_cannot_be_optional_1047", "A rest parameter cannot be optional."),
         A_rest_parameter_cannot_have_an_initializer: diag(1048, ts.DiagnosticCategory.Error, "A_rest_parameter_cannot_have_an_initializer_1048", "A rest parameter cannot have an initializer."),
@@ -4944,7 +5119,6 @@ var ts;
         A_get_accessor_cannot_have_parameters: diag(1054, ts.DiagnosticCategory.Error, "A_get_accessor_cannot_have_parameters_1054", "A 'get' accessor cannot have parameters."),
         Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Promise_compatible_constructor_value: diag(1055, ts.DiagnosticCategory.Error, "Type_0_is_not_a_valid_async_function_return_type_in_ES5_SlashES3_because_it_does_not_refer_to_a_Prom_1055", "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value."),
         Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher: diag(1056, ts.DiagnosticCategory.Error, "Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056", "Accessors are only available when targeting ECMAScript 5 and higher."),
-        An_async_function_or_method_must_have_a_valid_awaitable_return_type: diag(1057, ts.DiagnosticCategory.Error, "An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057", "An async function or method must have a valid awaitable return type."),
         The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1058, ts.DiagnosticCategory.Error, "The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_t_1058", "The return type of an async function must either be a valid promise or must not contain a callable 'then' member."),
         A_promise_must_have_a_then_method: diag(1059, ts.DiagnosticCategory.Error, "A_promise_must_have_a_then_method_1059", "A promise must have a 'then' method."),
         The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback: diag(1060, ts.DiagnosticCategory.Error, "The_first_parameter_of_the_then_method_of_a_promise_must_be_a_callback_1060", "The first parameter of the 'then' method of a promise must be a callback."),
@@ -4977,6 +5151,7 @@ var ts;
         for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1103, ts.DiagnosticCategory.Error, "for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1103", "'for await' loops are only allowed within async functions and at the top levels of modules."),
         A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement: diag(1104, ts.DiagnosticCategory.Error, "A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104", "A 'continue' statement can only be used within an enclosing iteration statement."),
         A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement: diag(1105, ts.DiagnosticCategory.Error, "A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105", "A 'break' statement can only be used within an enclosing iteration or switch statement."),
+        The_left_hand_side_of_a_for_of_statement_may_not_be_async: diag(1106, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_may_not_be_async_1106", "The left-hand side of a 'for...of' statement may not be 'async'."),
         Jump_target_cannot_cross_function_boundary: diag(1107, ts.DiagnosticCategory.Error, "Jump_target_cannot_cross_function_boundary_1107", "Jump target cannot cross function boundary."),
         A_return_statement_can_only_be_used_within_a_function_body: diag(1108, ts.DiagnosticCategory.Error, "A_return_statement_can_only_be_used_within_a_function_body_1108", "A 'return' statement can only be used within a function body."),
         Expression_expected: diag(1109, ts.DiagnosticCategory.Error, "Expression_expected_1109", "Expression expected."),
@@ -5023,7 +5198,7 @@ var ts;
         A_yield_expression_is_only_allowed_in_a_generator_body: diag(1163, ts.DiagnosticCategory.Error, "A_yield_expression_is_only_allowed_in_a_generator_body_1163", "A 'yield' expression is only allowed in a generator body."),
         Computed_property_names_are_not_allowed_in_enums: diag(1164, ts.DiagnosticCategory.Error, "Computed_property_names_are_not_allowed_in_enums_1164", "Computed property names are not allowed in enums."),
         A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1165, ts.DiagnosticCategory.Error, "A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_t_1165", "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type."),
-        A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1166, ts.DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_1166", "A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type."),
+        A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type: diag(1166, ts.DiagnosticCategory.Error, "A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_1166", "A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type."),
         A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1168, ts.DiagnosticCategory.Error, "A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_ty_1168", "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type."),
         A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1169, ts.DiagnosticCategory.Error, "A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_1169", "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type."),
         A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type: diag(1170, ts.DiagnosticCategory.Error, "A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type__1170", "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type."),
@@ -5063,7 +5238,7 @@ var ts;
         Decorators_are_not_valid_here: diag(1206, ts.DiagnosticCategory.Error, "Decorators_are_not_valid_here_1206", "Decorators are not valid here."),
         Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name: diag(1207, ts.DiagnosticCategory.Error, "Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207", "Decorators cannot be applied to multiple get/set accessors of the same name."),
         _0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module: diag(1208, ts.DiagnosticCategory.Error, "_0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_imp_1208", "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module."),
-        Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode: diag(1210, ts.DiagnosticCategory.Error, "Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210", "Invalid use of '{0}'. Class definitions are automatically in strict mode."),
+        Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode: diag(1210, ts.DiagnosticCategory.Error, "Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of__1210", "Code contained in a class is evaluated in JavaScript's strict mode which does not allow this use of '{0}'. For more information, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode."),
         A_class_declaration_without_the_default_modifier_must_have_a_name: diag(1211, ts.DiagnosticCategory.Error, "A_class_declaration_without_the_default_modifier_must_have_a_name_1211", "A class declaration without the 'default' modifier must have a name."),
         Identifier_expected_0_is_a_reserved_word_in_strict_mode: diag(1212, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212", "Identifier expected. '{0}' is a reserved word in strict mode."),
         Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: diag(1213, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213", "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode."),
@@ -5072,7 +5247,6 @@ var ts;
         Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules: diag(1216, ts.DiagnosticCategory.Error, "Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules_1216", "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules."),
         Export_assignment_is_not_supported_when_module_flag_is_system: diag(1218, ts.DiagnosticCategory.Error, "Export_assignment_is_not_supported_when_module_flag_is_system_1218", "Export assignment is not supported when '--module' flag is 'system'."),
         Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning: diag(1219, ts.DiagnosticCategory.Error, "Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219", "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning."),
-        Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher: diag(1220, ts.DiagnosticCategory.Error, "Generators_are_only_available_when_targeting_ECMAScript_2015_or_higher_1220", "Generators are only available when targeting ECMAScript 2015 or higher."),
         Generators_are_not_allowed_in_an_ambient_context: diag(1221, ts.DiagnosticCategory.Error, "Generators_are_not_allowed_in_an_ambient_context_1221", "Generators are not allowed in an ambient context."),
         An_overload_signature_cannot_be_declared_as_a_generator: diag(1222, ts.DiagnosticCategory.Error, "An_overload_signature_cannot_be_declared_as_a_generator_1222", "An overload signature cannot be declared as a generator."),
         _0_tag_already_specified: diag(1223, ts.DiagnosticCategory.Error, "_0_tag_already_specified_1223", "'{0}' tag already specified."),
@@ -5083,7 +5257,7 @@ var ts;
         A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods: diag(1228, ts.DiagnosticCategory.Error, "A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228", "A type predicate is only allowed in return type position for functions and methods."),
         A_type_predicate_cannot_reference_a_rest_parameter: diag(1229, ts.DiagnosticCategory.Error, "A_type_predicate_cannot_reference_a_rest_parameter_1229", "A type predicate cannot reference a rest parameter."),
         A_type_predicate_cannot_reference_element_0_in_a_binding_pattern: diag(1230, ts.DiagnosticCategory.Error, "A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230", "A type predicate cannot reference element '{0}' in a binding pattern."),
-        An_export_assignment_can_only_be_used_in_a_module: diag(1231, ts.DiagnosticCategory.Error, "An_export_assignment_can_only_be_used_in_a_module_1231", "An export assignment can only be used in a module."),
+        An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1231, ts.DiagnosticCategory.Error, "An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration_1231", "An export assignment must be at the top level of a file or module declaration."),
         An_import_declaration_can_only_be_used_in_a_namespace_or_module: diag(1232, ts.DiagnosticCategory.Error, "An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232", "An import declaration can only be used in a namespace or module."),
         An_export_declaration_can_only_be_used_in_a_module: diag(1233, ts.DiagnosticCategory.Error, "An_export_declaration_can_only_be_used_in_a_module_1233", "An export declaration can only be used in a module."),
         An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file: diag(1234, ts.DiagnosticCategory.Error, "An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234", "An ambient module declaration is only allowed at the top level in a file."),
@@ -5105,10 +5279,10 @@ var ts;
         Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5: diag(1250, ts.DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_1250", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'."),
         Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_definitions_are_automatically_in_strict_mode: diag(1251, ts.DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Class_d_1251", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode."),
         Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_are_automatically_in_strict_mode: diag(1252, ts.DiagnosticCategory.Error, "Function_declarations_are_not_allowed_inside_blocks_in_strict_mode_when_targeting_ES3_or_ES5_Modules_1252", "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode."),
-        _0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag: diag(1253, ts.DiagnosticCategory.Error, "_0_tag_cannot_be_used_independently_as_a_top_level_JSDoc_tag_1253", "'{0}' tag cannot be used independently as a top level JSDoc tag."),
         A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_reference: diag(1254, ts.DiagnosticCategory.Error, "A_const_initializer_in_an_ambient_context_must_be_a_string_or_numeric_literal_or_literal_enum_refere_1254", "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference."),
         A_definite_assignment_assertion_is_not_permitted_in_this_context: diag(1255, ts.DiagnosticCategory.Error, "A_definite_assignment_assertion_is_not_permitted_in_this_context_1255", "A definite assignment assertion '!' is not permitted in this context."),
         A_required_element_cannot_follow_an_optional_element: diag(1257, ts.DiagnosticCategory.Error, "A_required_element_cannot_follow_an_optional_element_1257", "A required element cannot follow an optional element."),
+        A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration: diag(1258, ts.DiagnosticCategory.Error, "A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration_1258", "A default export must be at the top level of a file or module declaration."),
         Module_0_can_only_be_default_imported_using_the_1_flag: diag(1259, ts.DiagnosticCategory.Error, "Module_0_can_only_be_default_imported_using_the_1_flag_1259", "Module '{0}' can only be default-imported using the '{1}' flag"),
         Keywords_cannot_contain_escape_characters: diag(1260, ts.DiagnosticCategory.Error, "Keywords_cannot_contain_escape_characters_1260", "Keywords cannot contain escape characters."),
         Already_included_file_name_0_differs_from_file_name_1_only_in_casing: diag(1261, ts.DiagnosticCategory.Error, "Already_included_file_name_0_differs_from_file_name_1_only_in_casing_1261", "Already included file name '{0}' differs from file name '{1}' only in casing."),
@@ -5117,6 +5291,8 @@ var ts;
         Declarations_with_definite_assignment_assertions_must_also_have_type_annotations: diag(1264, ts.DiagnosticCategory.Error, "Declarations_with_definite_assignment_assertions_must_also_have_type_annotations_1264", "Declarations with definite assignment assertions must also have type annotations."),
         A_rest_element_cannot_follow_another_rest_element: diag(1265, ts.DiagnosticCategory.Error, "A_rest_element_cannot_follow_another_rest_element_1265", "A rest element cannot follow another rest element."),
         An_optional_element_cannot_follow_a_rest_element: diag(1266, ts.DiagnosticCategory.Error, "An_optional_element_cannot_follow_a_rest_element_1266", "An optional element cannot follow a rest element."),
+        Property_0_cannot_have_an_initializer_because_it_is_marked_abstract: diag(1267, ts.DiagnosticCategory.Error, "Property_0_cannot_have_an_initializer_because_it_is_marked_abstract_1267", "Property '{0}' cannot have an initializer because it is marked abstract."),
+        An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type: diag(1268, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type_1268", "An index signature parameter type must be 'string', 'number', 'symbol', or a template literal type."),
         with_statements_are_not_allowed_in_an_async_function_block: diag(1300, ts.DiagnosticCategory.Error, "with_statements_are_not_allowed_in_an_async_function_block_1300", "'with' statements are not allowed in an async function block."),
         await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules: diag(1308, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules_1308", "'await' expressions are only allowed within async functions and at the top levels of modules."),
         Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern: diag(1312, ts.DiagnosticCategory.Error, "Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_1312", "Did you mean to use a ':'? An '=' can only follow a property name when the containing object literal is part of a destructuring pattern."),
@@ -5130,9 +5306,9 @@ var ts;
         Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1320, ts.DiagnosticCategory.Error, "Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member_1320", "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member."),
         Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1321, ts.DiagnosticCategory.Error, "Type_of_yield_operand_in_an_async_generator_must_either_be_a_valid_promise_or_must_not_contain_a_cal_1321", "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member."),
         Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member: diag(1322, ts.DiagnosticCategory.Error, "Type_of_iterated_elements_of_a_yield_Asterisk_operand_must_either_be_a_valid_promise_or_must_not_con_1322", "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member."),
-        Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system_or_umd: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'esnext', 'commonjs', 'amd', 'system', or 'umd'."),
-        Dynamic_import_must_have_one_specifier_as_an_argument: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_import_must_have_one_specifier_as_an_argument_1324", "Dynamic import must have one specifier as an argument."),
-        Specifier_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Specifier_of_dynamic_import_cannot_be_spread_element_1325", "Specifier of dynamic import cannot be spread element."),
+        Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext: diag(1323, ts.DiagnosticCategory.Error, "Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd__1323", "Dynamic imports are only supported when the '--module' flag is set to 'es2020', 'es2022', 'esnext', 'commonjs', 'amd', 'system', 'umd', 'node12', or 'nodenext'."),
+        Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext: diag(1324, ts.DiagnosticCategory.Error, "Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext_1324", "Dynamic imports only support a second argument when the '--module' option is set to 'esnext'."),
+        Argument_of_dynamic_import_cannot_be_spread_element: diag(1325, ts.DiagnosticCategory.Error, "Argument_of_dynamic_import_cannot_be_spread_element_1325", "Argument of dynamic import cannot be spread element."),
         Dynamic_import_cannot_have_type_arguments: diag(1326, ts.DiagnosticCategory.Error, "Dynamic_import_cannot_have_type_arguments_1326", "Dynamic import cannot have type arguments."),
         String_literal_with_double_quotes_expected: diag(1327, ts.DiagnosticCategory.Error, "String_literal_with_double_quotes_expected_1327", "String literal with double quotes expected."),
         Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_literal: diag(1328, ts.DiagnosticCategory.Error, "Property_value_can_only_be_string_literal_numeric_literal_true_false_null_object_literal_or_array_li_1328", "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal."),
@@ -5143,13 +5319,12 @@ var ts;
         unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name: diag(1333, ts.DiagnosticCategory.Error, "unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name_1333", "'unique symbol' types may not be used on a variable declaration with a binding name."),
         unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement: diag(1334, ts.DiagnosticCategory.Error, "unique_symbol_types_are_only_allowed_on_variables_in_a_variable_statement_1334", "'unique symbol' types are only allowed on variables in a variable statement."),
         unique_symbol_types_are_not_allowed_here: diag(1335, ts.DiagnosticCategory.Error, "unique_symbol_types_are_not_allowed_here_1335", "'unique symbol' types are not allowed here."),
-        An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead: diag(1336, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead_1336", "An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead."),
-        An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead: diag(1337, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead_1337", "An index signature parameter type cannot be a union type. Consider using a mapped object type instead."),
+        An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead: diag(1337, ts.DiagnosticCategory.Error, "An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_o_1337", "An index signature parameter type cannot be a literal type or generic type. Consider using a mapped object type instead."),
         infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type: diag(1338, ts.DiagnosticCategory.Error, "infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type_1338", "'infer' declarations are only permitted in the 'extends' clause of a conditional type."),
         Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here: diag(1339, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_value_but_is_used_as_a_value_here_1339", "Module '{0}' does not refer to a value, but is used as a value here."),
         Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0: diag(1340, ts.DiagnosticCategory.Error, "Module_0_does_not_refer_to_a_type_but_is_used_as_a_type_here_Did_you_mean_typeof_import_0_1340", "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?"),
         Type_arguments_cannot_be_used_here: diag(1342, ts.DiagnosticCategory.Error, "Type_arguments_cannot_be_used_here_1342", "Type arguments cannot be used here."),
-        The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system_1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'esnext', or 'system'."),
+        The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext: diag(1343, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system__1343", "The 'import.meta' meta-property is only allowed when the '--module' option is 'es2020', 'es2022', 'esnext', 'system', 'node12', or 'nodenext'."),
         A_label_is_not_allowed_here: diag(1344, ts.DiagnosticCategory.Error, "A_label_is_not_allowed_here_1344", "'A label is not allowed here."),
         An_expression_of_type_void_cannot_be_tested_for_truthiness: diag(1345, ts.DiagnosticCategory.Error, "An_expression_of_type_void_cannot_be_tested_for_truthiness_1345", "An expression of type 'void' cannot be tested for truthiness."),
         This_parameter_is_not_allowed_with_use_strict_directive: diag(1346, ts.DiagnosticCategory.Error, "This_parameter_is_not_allowed_with_use_strict_directive_1346", "This parameter is not allowed with 'use strict' directive."),
@@ -5166,7 +5341,6 @@ var ts;
         An_enum_member_name_must_be_followed_by_a_or: diag(1357, ts.DiagnosticCategory.Error, "An_enum_member_name_must_be_followed_by_a_or_1357", "An enum member name must be followed by a ',', '=', or '}'."),
         Tagged_template_expressions_are_not_permitted_in_an_optional_chain: diag(1358, ts.DiagnosticCategory.Error, "Tagged_template_expressions_are_not_permitted_in_an_optional_chain_1358", "Tagged template expressions are not permitted in an optional chain."),
         Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here: diag(1359, ts.DiagnosticCategory.Error, "Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here_1359", "Identifier expected. '{0}' is a reserved word that cannot be used here."),
-        Did_you_mean_to_parenthesize_this_function_type: diag(1360, ts.DiagnosticCategory.Error, "Did_you_mean_to_parenthesize_this_function_type_1360", "Did you mean to parenthesize this function type?"),
         _0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type: diag(1361, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type_1361", "'{0}' cannot be used as a value because it was imported using 'import type'."),
         _0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type: diag(1362, ts.DiagnosticCategory.Error, "_0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type_1362", "'{0}' cannot be used as a value because it was exported using 'export type'."),
         A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both: diag(1363, ts.DiagnosticCategory.Error, "A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both_1363", "A type-only import can specify a default import or named bindings, but not both."),
@@ -5174,7 +5348,6 @@ var ts;
         Convert_all_re_exported_types_to_type_only_exports: diag(1365, ts.DiagnosticCategory.Message, "Convert_all_re_exported_types_to_type_only_exports_1365", "Convert all re-exported types to type-only exports"),
         Split_into_two_separate_import_declarations: diag(1366, ts.DiagnosticCategory.Message, "Split_into_two_separate_import_declarations_1366", "Split into two separate import declarations"),
         Split_all_invalid_type_only_imports: diag(1367, ts.DiagnosticCategory.Message, "Split_all_invalid_type_only_imports_1367", "Split all invalid type-only imports"),
-        Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(1368, ts.DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_1368", "Specify emit/checking behavior for imports that are only used for types"),
         Did_you_mean_0: diag(1369, ts.DiagnosticCategory.Message, "Did_you_mean_0_1369", "Did you mean '{0}'?"),
         This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set_to_error: diag(1371, ts.DiagnosticCategory.Error, "This_import_is_never_used_as_a_value_and_must_use_import_type_because_importsNotUsedAsValues_is_set__1371", "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'."),
         Convert_to_type_only_import: diag(1373, ts.DiagnosticCategory.Message, "Convert_to_type_only_import_1373", "Convert to type-only import"),
@@ -5182,7 +5355,7 @@ var ts;
         await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1375, ts.DiagnosticCategory.Error, "await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_fi_1375", "'await' expressions are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
         _0_was_imported_here: diag(1376, ts.DiagnosticCategory.Message, "_0_was_imported_here_1376", "'{0}' was imported here."),
         _0_was_exported_here: diag(1377, ts.DiagnosticCategory.Message, "_0_was_exported_here_1377", "'{0}' was exported here."),
-        Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_t_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."),
+        Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1378, ts.DiagnosticCategory.Error, "Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_o_1378", "Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
         An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type: diag(1379, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type_1379", "An import alias cannot reference a declaration that was exported using 'export type'."),
         An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type: diag(1380, ts.DiagnosticCategory.Error, "An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type_1380", "An import alias cannot reference a declaration that was imported using 'import type'."),
         Unexpected_token_Did_you_mean_or_rbrace: diag(1381, ts.DiagnosticCategory.Error, "Unexpected_token_Did_you_mean_or_rbrace_1381", "Unexpected token. Did you mean `{'}'}` or `&rbrace;`?"),
@@ -5194,8 +5367,7 @@ var ts;
         Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1387, ts.DiagnosticCategory.Error, "Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1387", "Function type notation must be parenthesized when used in an intersection type."),
         Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type: diag(1388, ts.DiagnosticCategory.Error, "Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type_1388", "Constructor type notation must be parenthesized when used in an intersection type."),
         _0_is_not_allowed_as_a_variable_declaration_name: diag(1389, ts.DiagnosticCategory.Error, "_0_is_not_allowed_as_a_variable_declaration_name_1389", "'{0}' is not allowed as a variable declaration name."),
-        Provides_a_root_package_name_when_using_outFile_with_declarations: diag(1390, ts.DiagnosticCategory.Message, "Provides_a_root_package_name_when_using_outFile_with_declarations_1390", "Provides a root package name when using outFile with declarations."),
-        The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit: diag(1391, ts.DiagnosticCategory.Error, "The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_de_1391", "The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit."),
+        _0_is_not_allowed_as_a_parameter_name: diag(1390, ts.DiagnosticCategory.Error, "_0_is_not_allowed_as_a_parameter_name_1390", "'{0}' is not allowed as a parameter name."),
         An_import_alias_cannot_use_import_type: diag(1392, ts.DiagnosticCategory.Error, "An_import_alias_cannot_use_import_type_1392", "An import alias cannot use 'import type'"),
         Imported_via_0_from_file_1: diag(1393, ts.DiagnosticCategory.Message, "Imported_via_0_from_file_1_1393", "Imported via {0} from file '{1}'"),
         Imported_via_0_from_file_1_with_packageId_2: diag(1394, ts.DiagnosticCategory.Message, "Imported_via_0_from_file_1_with_packageId_2_1394", "Imported via {0} from file '{1}' with packageId '{2}'"),
@@ -5236,13 +5408,34 @@ var ts;
         File_redirects_to_file_0: diag(1429, ts.DiagnosticCategory.Message, "File_redirects_to_file_0_1429", "File redirects to file '{0}'"),
         The_file_is_in_the_program_because_Colon: diag(1430, ts.DiagnosticCategory.Message, "The_file_is_in_the_program_because_Colon_1430", "The file is in the program because:"),
         for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module: diag(1431, ts.DiagnosticCategory.Error, "for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_1431", "'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module."),
-        Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'esnext' or 'system', and the 'target' option is set to 'es2017' or higher."),
+        Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher: diag(1432, ts.DiagnosticCategory.Error, "Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or__1432", "Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher."),
+        Decorators_may_not_be_applied_to_this_parameters: diag(1433, ts.DiagnosticCategory.Error, "Decorators_may_not_be_applied_to_this_parameters_1433", "Decorators may not be applied to 'this' parameters."),
+        Unexpected_keyword_or_identifier: diag(1434, ts.DiagnosticCategory.Error, "Unexpected_keyword_or_identifier_1434", "Unexpected keyword or identifier."),
+        Unknown_keyword_or_identifier_Did_you_mean_0: diag(1435, ts.DiagnosticCategory.Error, "Unknown_keyword_or_identifier_Did_you_mean_0_1435", "Unknown keyword or identifier. Did you mean '{0}'?"),
+        Decorators_must_precede_the_name_and_all_keywords_of_property_declarations: diag(1436, ts.DiagnosticCategory.Error, "Decorators_must_precede_the_name_and_all_keywords_of_property_declarations_1436", "Decorators must precede the name and all keywords of property declarations."),
+        Namespace_must_be_given_a_name: diag(1437, ts.DiagnosticCategory.Error, "Namespace_must_be_given_a_name_1437", "Namespace must be given a name."),
+        Interface_must_be_given_a_name: diag(1438, ts.DiagnosticCategory.Error, "Interface_must_be_given_a_name_1438", "Interface must be given a name."),
+        Type_alias_must_be_given_a_name: diag(1439, ts.DiagnosticCategory.Error, "Type_alias_must_be_given_a_name_1439", "Type alias must be given a name."),
+        Variable_declaration_not_allowed_at_this_location: diag(1440, ts.DiagnosticCategory.Error, "Variable_declaration_not_allowed_at_this_location_1440", "Variable declaration not allowed at this location."),
+        Cannot_start_a_function_call_in_a_type_annotation: diag(1441, ts.DiagnosticCategory.Error, "Cannot_start_a_function_call_in_a_type_annotation_1441", "Cannot start a function call in a type annotation."),
+        Expected_for_property_initializer: diag(1442, ts.DiagnosticCategory.Error, "Expected_for_property_initializer_1442", "Expected '=' for property initializer."),
+        Module_declaration_names_may_only_use_or_quoted_strings: diag(1443, ts.DiagnosticCategory.Error, "Module_declaration_names_may_only_use_or_quoted_strings_1443", "Module declaration names may only use ' or \" quoted strings."),
+        _0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1444, ts.DiagnosticCategory.Error, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedMod_1444", "'{0}' is a type and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),
+        _0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled: diag(1446, ts.DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveVa_1446", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'preserveValueImports' and 'isolatedModules' are both enabled."),
+        _0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled: diag(1448, ts.DiagnosticCategory.Error, "_0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isol_1448", "'{0}' resolves to a type-only declaration and must be re-exported using a type-only re-export when 'isolatedModules' is enabled."),
+        Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed: diag(1449, ts.DiagnosticCategory.Message, "Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed_1449", "Preserve unused imported values in the JavaScript output that would otherwise be removed."),
+        Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments: diag(1450, ts.DiagnosticCategory.Message, "Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments_1450", "Dynamic imports can only accept a module specifier and an optional assertion as arguments"),
+        Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression: diag(1451, ts.DiagnosticCategory.Error, "Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member__1451", "Private identifiers are only allowed in class bodies and may only be used as part of a class member declaration, property access, or on the left-hand-side of an 'in' expression"),
+        The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output: diag(1470, ts.DiagnosticCategory.Error, "The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output_1470", "The 'import.meta' meta-property is not allowed in files which will build into CommonJS output."),
+        Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead: diag(1471, ts.DiagnosticCategory.Error, "Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_c_1471", "Module '{0}' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead."),
         The_types_of_0_are_incompatible_between_these_types: diag(2200, ts.DiagnosticCategory.Error, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
         The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, ts.DiagnosticCategory.Error, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
         Call_signature_return_types_0_and_1_are_incompatible: diag(2202, ts.DiagnosticCategory.Error, "Call_signature_return_types_0_and_1_are_incompatible_2202", "Call signature return types '{0}' and '{1}' are incompatible.", undefined, true),
         Construct_signature_return_types_0_and_1_are_incompatible: diag(2203, ts.DiagnosticCategory.Error, "Construct_signature_return_types_0_and_1_are_incompatible_2203", "Construct signature return types '{0}' and '{1}' are incompatible.", undefined, true),
         Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2204, ts.DiagnosticCategory.Error, "Call_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2204", "Call signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
         Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1: diag(2205, ts.DiagnosticCategory.Error, "Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1_2205", "Construct signatures with no arguments have incompatible return types '{0}' and '{1}'.", undefined, true),
+        The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement: diag(2206, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement_2206", "The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement."),
+        The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement: diag(2207, ts.DiagnosticCategory.Error, "The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement_2207", "The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement."),
         Duplicate_identifier_0: diag(2300, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_2300", "Duplicate identifier '{0}'."),
         Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2301, ts.DiagnosticCategory.Error, "Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301", "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
         Static_members_cannot_reference_class_type_parameters: diag(2302, ts.DiagnosticCategory.Error, "Static_members_cannot_reference_class_type_parameters_2302", "Static members cannot reference class type parameters."),
@@ -5254,7 +5447,6 @@ var ts;
         Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity: diag(2308, ts.DiagnosticCategory.Error, "Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308", "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity."),
         An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements: diag(2309, ts.DiagnosticCategory.Error, "An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309", "An export assignment cannot be used in a module with other exported elements."),
         Type_0_recursively_references_itself_as_a_base_type: diag(2310, ts.DiagnosticCategory.Error, "Type_0_recursively_references_itself_as_a_base_type_2310", "Type '{0}' recursively references itself as a base type."),
-        A_class_may_only_extend_another_class: diag(2311, ts.DiagnosticCategory.Error, "A_class_may_only_extend_another_class_2311", "A class may only extend another class."),
         An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members: diag(2312, ts.DiagnosticCategory.Error, "An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_me_2312", "An interface can only extend an object type or intersection of object types with statically known members."),
         Type_parameter_0_has_a_circular_constraint: diag(2313, ts.DiagnosticCategory.Error, "Type_parameter_0_has_a_circular_constraint_2313", "Type parameter '{0}' has a circular constraint."),
         Generic_type_0_requires_1_type_argument_s: diag(2314, ts.DiagnosticCategory.Error, "Generic_type_0_requires_1_type_argument_s_2314", "Generic type '{0}' requires {1} type argument(s)."),
@@ -5272,8 +5464,8 @@ var ts;
         Types_of_property_0_are_incompatible: diag(2326, ts.DiagnosticCategory.Error, "Types_of_property_0_are_incompatible_2326", "Types of property '{0}' are incompatible."),
         Property_0_is_optional_in_type_1_but_required_in_type_2: diag(2327, ts.DiagnosticCategory.Error, "Property_0_is_optional_in_type_1_but_required_in_type_2_2327", "Property '{0}' is optional in type '{1}' but required in type '{2}'."),
         Types_of_parameters_0_and_1_are_incompatible: diag(2328, ts.DiagnosticCategory.Error, "Types_of_parameters_0_and_1_are_incompatible_2328", "Types of parameters '{0}' and '{1}' are incompatible."),
-        Index_signature_is_missing_in_type_0: diag(2329, ts.DiagnosticCategory.Error, "Index_signature_is_missing_in_type_0_2329", "Index signature is missing in type '{0}'."),
-        Index_signatures_are_incompatible: diag(2330, ts.DiagnosticCategory.Error, "Index_signatures_are_incompatible_2330", "Index signatures are incompatible."),
+        Index_signature_for_type_0_is_missing_in_type_1: diag(2329, ts.DiagnosticCategory.Error, "Index_signature_for_type_0_is_missing_in_type_1_2329", "Index signature for type '{0}' is missing in type '{1}'."),
+        _0_and_1_index_signatures_are_incompatible: diag(2330, ts.DiagnosticCategory.Error, "_0_and_1_index_signatures_are_incompatible_2330", "'{0}' and '{1}' index signatures are incompatible."),
         this_cannot_be_referenced_in_a_module_or_namespace_body: diag(2331, ts.DiagnosticCategory.Error, "this_cannot_be_referenced_in_a_module_or_namespace_body_2331", "'this' cannot be referenced in a module or namespace body."),
         this_cannot_be_referenced_in_current_location: diag(2332, ts.DiagnosticCategory.Error, "this_cannot_be_referenced_in_current_location_2332", "'this' cannot be referenced in current location."),
         this_cannot_be_referenced_in_constructor_arguments: diag(2333, ts.DiagnosticCategory.Error, "this_cannot_be_referenced_in_constructor_arguments_2333", "'this' cannot be referenced in constructor arguments."),
@@ -5285,7 +5477,6 @@ var ts;
         Property_0_does_not_exist_on_type_1: diag(2339, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_2339", "Property '{0}' does not exist on type '{1}'."),
         Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword: diag(2340, ts.DiagnosticCategory.Error, "Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340", "Only public and protected methods of the base class are accessible via the 'super' keyword."),
         Property_0_is_private_and_only_accessible_within_class_1: diag(2341, ts.DiagnosticCategory.Error, "Property_0_is_private_and_only_accessible_within_class_1_2341", "Property '{0}' is private and only accessible within class '{1}'."),
-        An_index_expression_argument_must_be_of_type_string_number_symbol_or_any: diag(2342, ts.DiagnosticCategory.Error, "An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342", "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'."),
         This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0: diag(2343, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_ve_2343", "This syntax requires an imported helper named '{1}' which does not exist in '{0}'. Consider upgrading your version of '{0}'."),
         Type_0_does_not_satisfy_the_constraint_1: diag(2344, ts.DiagnosticCategory.Error, "Type_0_does_not_satisfy_the_constraint_1_2344", "Type '{0}' does not satisfy the constraint '{1}'."),
         Argument_of_type_0_is_not_assignable_to_parameter_of_type_1: diag(2345, ts.DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345", "Argument of type '{0}' is not assignable to parameter of type '{1}'."),
@@ -5303,7 +5494,7 @@ var ts;
         The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, ts.DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."),
         The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),
         The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, ts.DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),
-        The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol: diag(2360, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360", "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'."),
+        The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or_symbol: diag(2360, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or__2360", "The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'."),
         The_right_hand_side_of_an_in_expression_must_not_be_a_primitive: diag(2361, ts.DiagnosticCategory.Error, "The_right_hand_side_of_an_in_expression_must_not_be_a_primitive_2361", "The right-hand side of an 'in' expression must not be a primitive."),
         The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
         The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, ts.DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
@@ -5317,15 +5508,13 @@ var ts;
         A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation: diag(2371, ts.DiagnosticCategory.Error, "A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371", "A parameter initializer is only allowed in a function or constructor implementation."),
         Parameter_0_cannot_reference_itself: diag(2372, ts.DiagnosticCategory.Error, "Parameter_0_cannot_reference_itself_2372", "Parameter '{0}' cannot reference itself."),
         Parameter_0_cannot_reference_identifier_1_declared_after_it: diag(2373, ts.DiagnosticCategory.Error, "Parameter_0_cannot_reference_identifier_1_declared_after_it_2373", "Parameter '{0}' cannot reference identifier '{1}' declared after it."),
-        Duplicate_string_index_signature: diag(2374, ts.DiagnosticCategory.Error, "Duplicate_string_index_signature_2374", "Duplicate string index signature."),
-        Duplicate_number_index_signature: diag(2375, ts.DiagnosticCategory.Error, "Duplicate_number_index_signature_2375", "Duplicate number index signature."),
+        Duplicate_index_signature_for_type_0: diag(2374, ts.DiagnosticCategory.Error, "Duplicate_index_signature_for_type_0_2374", "Duplicate index signature for type '{0}'."),
+        Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2375, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2375", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),
         A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_parameter_properties_or_private_identifiers: diag(2376, ts.DiagnosticCategory.Error, "A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376", "A 'super' call must be the first statement in the constructor when a class contains initialized properties, parameter properties, or private identifiers."),
         Constructors_for_derived_classes_must_contain_a_super_call: diag(2377, ts.DiagnosticCategory.Error, "Constructors_for_derived_classes_must_contain_a_super_call_2377", "Constructors for derived classes must contain a 'super' call."),
         A_get_accessor_must_return_a_value: diag(2378, ts.DiagnosticCategory.Error, "A_get_accessor_must_return_a_value_2378", "A 'get' accessor must return a value."),
-        Getter_and_setter_accessors_do_not_agree_in_visibility: diag(2379, ts.DiagnosticCategory.Error, "Getter_and_setter_accessors_do_not_agree_in_visibility_2379", "Getter and setter accessors do not agree in visibility."),
-        get_and_set_accessor_must_have_the_same_type: diag(2380, ts.DiagnosticCategory.Error, "get_and_set_accessor_must_have_the_same_type_2380", "'get' and 'set' accessor must have the same type."),
-        A_signature_with_an_implementation_cannot_use_a_string_literal_type: diag(2381, ts.DiagnosticCategory.Error, "A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381", "A signature with an implementation cannot use a string literal type."),
-        Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature: diag(2382, ts.DiagnosticCategory.Error, "Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382", "Specialized overload signature is not assignable to any non-specialized signature."),
+        Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties: diag(2379, ts.DiagnosticCategory.Error, "Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_tr_2379", "Argument of type '{0}' is not assignable to parameter of type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties."),
+        The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type: diag(2380, ts.DiagnosticCategory.Error, "The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type_2380", "The return type of a 'get' accessor must be assignable to its 'set' accessor type"),
         Overload_signatures_must_all_be_exported_or_non_exported: diag(2383, ts.DiagnosticCategory.Error, "Overload_signatures_must_all_be_exported_or_non_exported_2383", "Overload signatures must all be exported or non-exported."),
         Overload_signatures_must_all_be_ambient_or_non_ambient: diag(2384, ts.DiagnosticCategory.Error, "Overload_signatures_must_all_be_ambient_or_non_ambient_2384", "Overload signatures must all be ambient or non-ambient."),
         Overload_signatures_must_all_be_public_private_or_protected: diag(2385, ts.DiagnosticCategory.Error, "Overload_signatures_must_all_be_public_private_or_protected_2385", "Overload signatures must all be public, private or protected."),
@@ -5344,7 +5533,6 @@ var ts;
         constructor_cannot_be_used_as_a_parameter_property_name: diag(2398, ts.DiagnosticCategory.Error, "constructor_cannot_be_used_as_a_parameter_property_name_2398", "'constructor' cannot be used as a parameter property name."),
         Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference: diag(2399, ts.DiagnosticCategory.Error, "Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399", "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference."),
         Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference: diag(2400, ts.DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400", "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference."),
-        Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference: diag(2401, ts.DiagnosticCategory.Error, "Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401", "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference."),
         Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference: diag(2402, ts.DiagnosticCategory.Error, "Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402", "Expression resolves to '_super' that compiler uses to capture base class reference."),
         Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2: diag(2403, ts.DiagnosticCategory.Error, "Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403", "Subsequent variable declarations must have the same type.  Variable '{0}' must be of type '{1}', but here has type '{2}'."),
         The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation: diag(2404, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404", "The left-hand side of a 'for...in' statement cannot use a type annotation."),
@@ -5354,9 +5542,9 @@ var ts;
         Setters_cannot_return_a_value: diag(2408, ts.DiagnosticCategory.Error, "Setters_cannot_return_a_value_2408", "Setters cannot return a value."),
         Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class: diag(2409, ts.DiagnosticCategory.Error, "Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409", "Return type of constructor signature must be assignable to the instance type of the class."),
         The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any: diag(2410, ts.DiagnosticCategory.Error, "The_with_statement_is_not_supported_All_symbols_in_a_with_block_will_have_type_any_2410", "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'."),
-        Property_0_of_type_1_is_not_assignable_to_string_index_type_2: diag(2411, ts.DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411", "Property '{0}' of type '{1}' is not assignable to string index type '{2}'."),
-        Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2: diag(2412, ts.DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412", "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'."),
-        Numeric_index_type_0_is_not_assignable_to_string_index_type_1: diag(2413, ts.DiagnosticCategory.Error, "Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413", "Numeric index type '{0}' is not assignable to string index type '{1}'."),
+        Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target: diag(2412, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefi_2412", "Type '{0}' is not assignable to type '{1}' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the type of the target."),
+        Property_0_of_type_1_is_not_assignable_to_2_index_type_3: diag(2411, ts.DiagnosticCategory.Error, "Property_0_of_type_1_is_not_assignable_to_2_index_type_3_2411", "Property '{0}' of type '{1}' is not assignable to '{2}' index type '{3}'."),
+        _0_index_type_1_is_not_assignable_to_2_index_type_3: diag(2413, ts.DiagnosticCategory.Error, "_0_index_type_1_is_not_assignable_to_2_index_type_3_2413", "'{0}' index type '{1}' is not assignable to '{2}' index type '{3}'."),
         Class_name_cannot_be_0: diag(2414, ts.DiagnosticCategory.Error, "Class_name_cannot_be_0_2414", "Class name cannot be '{0}'."),
         Class_0_incorrectly_extends_base_class_1: diag(2415, ts.DiagnosticCategory.Error, "Class_0_incorrectly_extends_base_class_1_2415", "Class '{0}' incorrectly extends base class '{1}'."),
         Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2: diag(2416, ts.DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_the_same_property_in_base_type_2_2416", "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'."),
@@ -5386,16 +5574,14 @@ var ts;
         Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2: diag(2443, ts.DiagnosticCategory.Error, "Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443", "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'."),
         Property_0_is_protected_in_type_1_but_public_in_type_2: diag(2444, ts.DiagnosticCategory.Error, "Property_0_is_protected_in_type_1_but_public_in_type_2_2444", "Property '{0}' is protected in type '{1}' but public in type '{2}'."),
         Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses: diag(2445, ts.DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445", "Property '{0}' is protected and only accessible within class '{1}' and its subclasses."),
-        Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1: diag(2446, ts.DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'."),
+        Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2: diag(2446, ts.DiagnosticCategory.Error, "Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_cl_2446", "Property '{0}' is protected and only accessible through an instance of class '{1}'. This is an instance of class '{2}'."),
         The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead: diag(2447, ts.DiagnosticCategory.Error, "The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447", "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead."),
         Block_scoped_variable_0_used_before_its_declaration: diag(2448, ts.DiagnosticCategory.Error, "Block_scoped_variable_0_used_before_its_declaration_2448", "Block-scoped variable '{0}' used before its declaration."),
         Class_0_used_before_its_declaration: diag(2449, ts.DiagnosticCategory.Error, "Class_0_used_before_its_declaration_2449", "Class '{0}' used before its declaration."),
         Enum_0_used_before_its_declaration: diag(2450, ts.DiagnosticCategory.Error, "Enum_0_used_before_its_declaration_2450", "Enum '{0}' used before its declaration."),
         Cannot_redeclare_block_scoped_variable_0: diag(2451, ts.DiagnosticCategory.Error, "Cannot_redeclare_block_scoped_variable_0_2451", "Cannot redeclare block-scoped variable '{0}'."),
         An_enum_member_cannot_have_a_numeric_name: diag(2452, ts.DiagnosticCategory.Error, "An_enum_member_cannot_have_a_numeric_name_2452", "An enum member cannot have a numeric name."),
-        The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly: diag(2453, ts.DiagnosticCategory.Error, "The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453", "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly."),
         Variable_0_is_used_before_being_assigned: diag(2454, ts.DiagnosticCategory.Error, "Variable_0_is_used_before_being_assigned_2454", "Variable '{0}' is used before being assigned."),
-        Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0: diag(2455, ts.DiagnosticCategory.Error, "Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455", "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'."),
         Type_alias_0_circularly_references_itself: diag(2456, ts.DiagnosticCategory.Error, "Type_alias_0_circularly_references_itself_2456", "Type alias '{0}' circularly references itself."),
         Type_alias_name_cannot_be_0: diag(2457, ts.DiagnosticCategory.Error, "Type_alias_name_cannot_be_0_2457", "Type alias name cannot be '{0}'."),
         An_AMD_module_cannot_have_multiple_name_assignments: diag(2458, ts.DiagnosticCategory.Error, "An_AMD_module_cannot_have_multiple_name_assignments_2458", "An AMD module cannot have multiple name assignments."),
@@ -5410,8 +5596,6 @@ var ts;
         A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: diag(2467, ts.DiagnosticCategory.Error, "A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467", "A computed property name cannot reference a type parameter from its containing type."),
         Cannot_find_global_value_0: diag(2468, ts.DiagnosticCategory.Error, "Cannot_find_global_value_0_2468", "Cannot find global value '{0}'."),
         The_0_operator_cannot_be_applied_to_type_symbol: diag(2469, ts.DiagnosticCategory.Error, "The_0_operator_cannot_be_applied_to_type_symbol_2469", "The '{0}' operator cannot be applied to type 'symbol'."),
-        Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object: diag(2470, ts.DiagnosticCategory.Error, "Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470", "'Symbol' reference does not refer to the global Symbol constructor object."),
-        A_computed_property_name_of_the_form_0_must_be_of_type_symbol: diag(2471, ts.DiagnosticCategory.Error, "A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471", "A computed property name of the form '{0}' must be of type 'symbol'."),
         Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher: diag(2472, ts.DiagnosticCategory.Error, "Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472", "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher."),
         Enum_declarations_must_all_be_const_or_non_const: diag(2473, ts.DiagnosticCategory.Error, "Enum_declarations_must_all_be_const_or_non_const_2473", "Enum declarations must all be const or non-const."),
         const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values: diag(2474, ts.DiagnosticCategory.Error, "const_enum_member_initializers_can_only_contain_literal_values_and_other_computed_enum_values_2474", "const enum member initializers can only contain literal values and other computed enum values."),
@@ -5419,7 +5603,6 @@ var ts;
         A_const_enum_member_can_only_be_accessed_using_a_string_literal: diag(2476, ts.DiagnosticCategory.Error, "A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476", "A const enum member can only be accessed using a string literal."),
         const_enum_member_initializer_was_evaluated_to_a_non_finite_value: diag(2477, ts.DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477", "'const' enum member initializer was evaluated to a non-finite value."),
         const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN: diag(2478, ts.DiagnosticCategory.Error, "const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478", "'const' enum member initializer was evaluated to disallowed value 'NaN'."),
-        Property_0_does_not_exist_on_const_enum_1: diag(2479, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_const_enum_1_2479", "Property '{0}' does not exist on 'const' enum '{1}'."),
         let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations: diag(2480, ts.DiagnosticCategory.Error, "let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480", "'let' is not allowed to be used as a name in 'let' or 'const' declarations."),
         Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1: diag(2481, ts.DiagnosticCategory.Error, "Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481", "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'."),
         The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation: diag(2483, ts.DiagnosticCategory.Error, "The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483", "The left-hand side of a 'for...of' statement cannot use a type annotation."),
@@ -5451,14 +5634,12 @@ var ts;
         Cannot_create_an_instance_of_an_abstract_class: diag(2511, ts.DiagnosticCategory.Error, "Cannot_create_an_instance_of_an_abstract_class_2511", "Cannot create an instance of an abstract class."),
         Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, ts.DiagnosticCategory.Error, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."),
         Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, ts.DiagnosticCategory.Error, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),
-        Classes_containing_abstract_methods_must_be_marked_abstract: diag(2514, ts.DiagnosticCategory.Error, "Classes_containing_abstract_methods_must_be_marked_abstract_2514", "Classes containing abstract methods must be marked abstract."),
         Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, ts.DiagnosticCategory.Error, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),
         All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, ts.DiagnosticCategory.Error, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."),
         Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, ts.DiagnosticCategory.Error, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."),
         A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, ts.DiagnosticCategory.Error, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."),
         An_async_iterator_must_have_a_next_method: diag(2519, ts.DiagnosticCategory.Error, "An_async_iterator_must_have_a_next_method_2519", "An async iterator must have a 'next()' method."),
         Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: diag(2520, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520", "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions."),
-        Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: diag(2521, ts.DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521", "Expression resolves to variable declaration '{0}' that compiler uses to support async functions."),
         The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_using_a_standard_function_or_method: diag(2522, ts.DiagnosticCategory.Error, "The_arguments_object_cannot_be_referenced_in_an_async_function_or_method_in_ES3_and_ES5_Consider_usi_2522", "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method."),
         yield_expressions_cannot_be_used_in_a_parameter_initializer: diag(2523, ts.DiagnosticCategory.Error, "yield_expressions_cannot_be_used_in_a_parameter_initializer_2523", "'yield' expressions cannot be used in a parameter initializer."),
         await_expressions_cannot_be_used_in_a_parameter_initializer: diag(2524, ts.DiagnosticCategory.Error, "await_expressions_cannot_be_used_in_a_parameter_initializer_2524", "'await' expressions cannot be used in a parameter initializer."),
@@ -5478,7 +5659,6 @@ var ts;
         Type_0_cannot_be_used_as_an_index_type: diag(2538, ts.DiagnosticCategory.Error, "Type_0_cannot_be_used_as_an_index_type_2538", "Type '{0}' cannot be used as an index type."),
         Cannot_assign_to_0_because_it_is_not_a_variable: diag(2539, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_not_a_variable_2539", "Cannot assign to '{0}' because it is not a variable."),
         Cannot_assign_to_0_because_it_is_a_read_only_property: diag(2540, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_read_only_property_2540", "Cannot assign to '{0}' because it is a read-only property."),
-        The_target_of_an_assignment_must_be_a_variable_or_a_property_access: diag(2541, ts.DiagnosticCategory.Error, "The_target_of_an_assignment_must_be_a_variable_or_a_property_access_2541", "The target of an assignment must be a variable or a property access."),
         Index_signature_in_type_0_only_permits_reading: diag(2542, ts.DiagnosticCategory.Error, "Index_signature_in_type_0_only_permits_reading_2542", "Index signature in type '{0}' only permits reading."),
         Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference: diag(2543, ts.DiagnosticCategory.Error, "Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_me_2543", "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference."),
         Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta_property_reference: diag(2544, ts.DiagnosticCategory.Error, "Expression_resolves_to_variable_declaration_newTarget_that_compiler_uses_to_capture_new_target_meta__2544", "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference."),
@@ -5486,14 +5666,13 @@ var ts;
         The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_property: diag(2547, ts.DiagnosticCategory.Error, "The_type_returned_by_the_0_method_of_an_async_iterator_must_be_a_promise_for_a_type_with_a_value_pro_2547", "The type returned by the '{0}()' method of an async iterator must be a promise for a type with a 'value' property."),
         Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2548, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator_2548", "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator."),
         Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator: diag(2549, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns__2549", "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator."),
-        Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the `lib` compiler option to '{2}' or later."),
+        Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2_or_later: diag(2550, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Do_you_need_to_change_your_target_library_Try_changing_the_lib_c_2550", "Property '{0}' does not exist on type '{1}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{2}' or later."),
         Property_0_does_not_exist_on_type_1_Did_you_mean_2: diag(2551, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_2_2551", "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?"),
         Cannot_find_name_0_Did_you_mean_1: diag(2552, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Did_you_mean_1_2552", "Cannot find name '{0}'. Did you mean '{1}'?"),
         Computed_values_are_not_permitted_in_an_enum_with_string_valued_members: diag(2553, ts.DiagnosticCategory.Error, "Computed_values_are_not_permitted_in_an_enum_with_string_valued_members_2553", "Computed values are not permitted in an enum with string valued members."),
         Expected_0_arguments_but_got_1: diag(2554, ts.DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_2554", "Expected {0} arguments, but got {1}."),
         Expected_at_least_0_arguments_but_got_1: diag(2555, ts.DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_2555", "Expected at least {0} arguments, but got {1}."),
-        Expected_0_arguments_but_got_1_or_more: diag(2556, ts.DiagnosticCategory.Error, "Expected_0_arguments_but_got_1_or_more_2556", "Expected {0} arguments, but got {1} or more."),
-        Expected_at_least_0_arguments_but_got_1_or_more: diag(2557, ts.DiagnosticCategory.Error, "Expected_at_least_0_arguments_but_got_1_or_more_2557", "Expected at least {0} arguments, but got {1} or more."),
+        A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter: diag(2556, ts.DiagnosticCategory.Error, "A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter_2556", "A spread argument must either have a tuple type or be passed to a rest parameter."),
         Expected_0_type_arguments_but_got_1: diag(2558, ts.DiagnosticCategory.Error, "Expected_0_type_arguments_but_got_1_2558", "Expected {0} type arguments, but got {1}."),
         Type_0_has_no_properties_in_common_with_type_1: diag(2559, ts.DiagnosticCategory.Error, "Type_0_has_no_properties_in_common_with_type_1_2559", "Type '{0}' has no properties in common with type '{1}'."),
         Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it: diag(2560, ts.DiagnosticCategory.Error, "Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it_2560", "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?"),
@@ -5504,10 +5683,10 @@ var ts;
         Property_0_is_used_before_being_assigned: diag(2565, ts.DiagnosticCategory.Error, "Property_0_is_used_before_being_assigned_2565", "Property '{0}' is used before being assigned."),
         A_rest_element_cannot_have_a_property_name: diag(2566, ts.DiagnosticCategory.Error, "A_rest_element_cannot_have_a_property_name_2566", "A rest element cannot have a property name."),
         Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations: diag(2567, ts.DiagnosticCategory.Error, "Enum_declarations_can_only_merge_with_namespace_or_other_enum_declarations_2567", "Enum declarations can only merge with namespace or other enum declarations."),
+        Property_0_may_not_exist_on_type_1_Did_you_mean_2: diag(2568, ts.DiagnosticCategory.Error, "Property_0_may_not_exist_on_type_1_Did_you_mean_2_2568", "Property '{0}' may not exist on type '{1}'. Did you mean '{2}'?"),
         Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators: diag(2569, ts.DiagnosticCategory.Error, "Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterati_2569", "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators."),
+        Could_not_find_name_0_Did_you_mean_1: diag(2570, ts.DiagnosticCategory.Error, "Could_not_find_name_0_Did_you_mean_1_2570", "Could not find name '{0}'. Did you mean '{1}'?"),
         Object_is_of_type_unknown: diag(2571, ts.DiagnosticCategory.Error, "Object_is_of_type_unknown_2571", "Object is of type 'unknown'."),
-        Rest_signatures_are_incompatible: diag(2572, ts.DiagnosticCategory.Error, "Rest_signatures_are_incompatible_2572", "Rest signatures are incompatible."),
-        Property_0_is_incompatible_with_rest_element_type: diag(2573, ts.DiagnosticCategory.Error, "Property_0_is_incompatible_with_rest_element_type_2573", "Property '{0}' is incompatible with rest element type."),
         A_rest_element_type_must_be_an_array_type: diag(2574, ts.DiagnosticCategory.Error, "A_rest_element_type_must_be_an_array_type_2574", "A rest element type must be an array type."),
         No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments: diag(2575, ts.DiagnosticCategory.Error, "No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments_2575", "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments."),
         Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead: diag(2576, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead_2576", "Property '{0}' does not exist on type '{1}'. Did you mean to access the static member '{2}' instead?"),
@@ -5516,28 +5695,23 @@ var ts;
         Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode: diag(2580, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2580", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`."),
         Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery: diag(2581, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2581", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`."),
         Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha: diag(2582, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2582", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`."),
-        Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to '{1}' or later."),
-        Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'."),
-        _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, ts.DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later."),
-        Enum_type_0_circularly_references_itself: diag(2586, ts.DiagnosticCategory.Error, "Enum_type_0_circularly_references_itself_2586", "Enum type '{0}' circularly references itself."),
-        JSDoc_type_0_circularly_references_itself: diag(2587, ts.DiagnosticCategory.Error, "JSDoc_type_0_circularly_references_itself_2587", "JSDoc type '{0}' circularly references itself."),
+        Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later: diag(2583, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2583", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to '{1}' or later."),
+        Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom: diag(2584, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_2584", "Cannot find name '{0}'. Do you need to change your target library? Try changing the 'lib' compiler option to include 'dom'."),
+        _0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later: diag(2585, ts.DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_2585", "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later."),
         Cannot_assign_to_0_because_it_is_a_constant: diag(2588, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_constant_2588", "Cannot assign to '{0}' because it is a constant."),
         Type_instantiation_is_excessively_deep_and_possibly_infinite: diag(2589, ts.DiagnosticCategory.Error, "Type_instantiation_is_excessively_deep_and_possibly_infinite_2589", "Type instantiation is excessively deep and possibly infinite."),
         Expression_produces_a_union_type_that_is_too_complex_to_represent: diag(2590, ts.DiagnosticCategory.Error, "Expression_produces_a_union_type_that_is_too_complex_to_represent_2590", "Expression produces a union type that is too complex to represent."),
-        Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add `node` to the types field in your tsconfig."),
-        Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add `jquery` to the types field in your tsconfig."),
-        Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig."),
+        Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig: diag(2591, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashno_2591", "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig."),
+        Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig: diag(2592, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slash_2592", "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add 'jquery' to the types field in your tsconfig."),
+        Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig: diag(2593, ts.DiagnosticCategory.Error, "Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_type_2593", "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig."),
         This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag: diag(2594, ts.DiagnosticCategory.Error, "This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the__2594", "This module is declared with using 'export =', and can only be used with a default import when using the '{0}' flag."),
         _0_can_only_be_imported_by_using_a_default_import: diag(2595, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_default_import_2595", "'{0}' can only be imported by using a default import."),
         _0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2596, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import_2596", "'{0}' can only be imported by turning on the 'esModuleInterop' flag and using a default import."),
         _0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import: diag(2597, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import_2597", "'{0}' can only be imported by using a 'require' call or by using a default import."),
         _0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2598, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using__2598", "'{0}' can only be imported by using a 'require' call or by turning on the 'esModuleInterop' flag and using a default import."),
-        JSX_element_attributes_type_0_may_not_be_a_union_type: diag(2600, ts.DiagnosticCategory.Error, "JSX_element_attributes_type_0_may_not_be_a_union_type_2600", "JSX element attributes type '{0}' may not be a union type."),
-        The_return_type_of_a_JSX_element_constructor_must_return_an_object_type: diag(2601, ts.DiagnosticCategory.Error, "The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601", "The return type of a JSX element constructor must return an object type."),
         JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist: diag(2602, ts.DiagnosticCategory.Error, "JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602", "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist."),
         Property_0_in_type_1_is_not_assignable_to_type_2: diag(2603, ts.DiagnosticCategory.Error, "Property_0_in_type_1_is_not_assignable_to_type_2_2603", "Property '{0}' in type '{1}' is not assignable to type '{2}'."),
         JSX_element_type_0_does_not_have_any_construct_or_call_signatures: diag(2604, ts.DiagnosticCategory.Error, "JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604", "JSX element type '{0}' does not have any construct or call signatures."),
-        JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements: diag(2605, ts.DiagnosticCategory.Error, "JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605", "JSX element type '{0}' is not a constructor function for JSX elements."),
         Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property: diag(2606, ts.DiagnosticCategory.Error, "Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606", "Property '{0}' of JSX spread attribute is not assignable to target property."),
         JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property: diag(2607, ts.DiagnosticCategory.Error, "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607", "JSX element class does not support attributes because it does not have a '{0}' property."),
         The_global_type_JSX_0_may_not_have_more_than_one_property: diag(2608, ts.DiagnosticCategory.Error, "The_global_type_JSX_0_may_not_have_more_than_one_property_2608", "The global type 'JSX.{0}' may not have more than one property."),
@@ -5559,12 +5733,17 @@ var ts;
         Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target: diag(2625, ts.DiagnosticCategory.Error, "Variadic_element_at_position_0_in_source_does_not_match_element_at_position_1_in_target_2625", "Variadic element at position {0} in source does not match element at position {1} in target."),
         Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target: diag(2626, ts.DiagnosticCategory.Error, "Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target_2626", "Type at position {0} in source is not compatible with type at position {1} in target."),
         Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target: diag(2627, ts.DiagnosticCategory.Error, "Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target_2627", "Type at positions {0} through {1} in source is not compatible with type at position {2} in target."),
+        Cannot_assign_to_0_because_it_is_an_enum: diag(2628, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_enum_2628", "Cannot assign to '{0}' because it is an enum."),
+        Cannot_assign_to_0_because_it_is_a_class: diag(2629, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_class_2629", "Cannot assign to '{0}' because it is a class."),
+        Cannot_assign_to_0_because_it_is_a_function: diag(2630, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_function_2630", "Cannot assign to '{0}' because it is a function."),
+        Cannot_assign_to_0_because_it_is_a_namespace: diag(2631, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_a_namespace_2631", "Cannot assign to '{0}' because it is a namespace."),
+        Cannot_assign_to_0_because_it_is_an_import: diag(2632, ts.DiagnosticCategory.Error, "Cannot_assign_to_0_because_it_is_an_import_2632", "Cannot assign to '{0}' because it is an import."),
+        JSX_property_access_expressions_cannot_include_JSX_namespace_names: diag(2633, ts.DiagnosticCategory.Error, "JSX_property_access_expressions_cannot_include_JSX_namespace_names_2633", "JSX property access expressions cannot include JSX namespace names"),
+        _0_index_signatures_are_incompatible: diag(2634, ts.DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."),
         Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, ts.DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
         A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, ts.DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
         Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, ts.DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
         Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, ts.DiagnosticCategory.Error, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),
-        Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition: diag(2654, ts.DiagnosticCategory.Error, "Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654", "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition."),
-        Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition: diag(2656, ts.DiagnosticCategory.Error, "Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656", "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition."),
         JSX_expressions_must_have_one_parent_element: diag(2657, ts.DiagnosticCategory.Error, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."),
         Type_0_provides_no_match_for_the_signature_1: diag(2658, ts.DiagnosticCategory.Error, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."),
         super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, ts.DiagnosticCategory.Error, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),
@@ -5590,7 +5769,6 @@ var ts;
         A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void: diag(2679, ts.DiagnosticCategory.Error, "A_function_that_is_called_with_the_new_keyword_cannot_have_a_this_type_that_is_void_2679", "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'."),
         A_0_parameter_must_be_the_first_parameter: diag(2680, ts.DiagnosticCategory.Error, "A_0_parameter_must_be_the_first_parameter_2680", "A '{0}' parameter must be the first parameter."),
         A_constructor_cannot_have_a_this_parameter: diag(2681, ts.DiagnosticCategory.Error, "A_constructor_cannot_have_a_this_parameter_2681", "A constructor cannot have a 'this' parameter."),
-        get_and_set_accessor_must_have_the_same_this_type: diag(2682, ts.DiagnosticCategory.Error, "get_and_set_accessor_must_have_the_same_this_type_2682", "'get' and 'set' accessor must have the same 'this' type."),
         this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation: diag(2683, ts.DiagnosticCategory.Error, "this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_2683", "'this' implicitly has type 'any' because it does not have a type annotation."),
         The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1: diag(2684, ts.DiagnosticCategory.Error, "The_this_context_of_type_0_is_not_assignable_to_method_s_this_of_type_1_2684", "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'."),
         The_this_types_of_each_signature_are_incompatible: diag(2685, ts.DiagnosticCategory.Error, "The_this_types_of_each_signature_are_incompatible_2685", "The 'this' types of each signature are incompatible."),
@@ -5605,7 +5783,7 @@ var ts;
         Namespace_0_has_no_exported_member_1: diag(2694, ts.DiagnosticCategory.Error, "Namespace_0_has_no_exported_member_1_2694", "Namespace '{0}' has no exported member '{1}'."),
         Left_side_of_comma_operator_is_unused_and_has_no_side_effects: diag(2695, ts.DiagnosticCategory.Error, "Left_side_of_comma_operator_is_unused_and_has_no_side_effects_2695", "Left side of comma operator is unused and has no side effects.", true),
         The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead: diag(2696, ts.DiagnosticCategory.Error, "The_Object_type_is_assignable_to_very_few_other_types_Did_you_mean_to_use_the_any_type_instead_2696", "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?"),
-        An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, ts.DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),
+        An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2697, ts.DiagnosticCategory.Error, "An_async_function_or_method_must_return_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_in_2697", "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),
         Spread_types_may_only_be_created_from_object_types: diag(2698, ts.DiagnosticCategory.Error, "Spread_types_may_only_be_created_from_object_types_2698", "Spread types may only be created from object types."),
         Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1: diag(2699, ts.DiagnosticCategory.Error, "Static_property_0_conflicts_with_built_in_property_Function_0_of_constructor_function_1_2699", "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'."),
         Rest_types_may_only_be_created_from_object_types: diag(2700, ts.DiagnosticCategory.Error, "Rest_types_may_only_be_created_from_object_types_2700", "Rest types may only be created from object types."),
@@ -5613,14 +5791,14 @@ var ts;
         _0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here: diag(2702, ts.DiagnosticCategory.Error, "_0_only_refers_to_a_type_but_is_being_used_as_a_namespace_here_2702", "'{0}' only refers to a type, but is being used as a namespace here."),
         The_operand_of_a_delete_operator_must_be_a_property_reference: diag(2703, ts.DiagnosticCategory.Error, "The_operand_of_a_delete_operator_must_be_a_property_reference_2703", "The operand of a 'delete' operator must be a property reference."),
         The_operand_of_a_delete_operator_cannot_be_a_read_only_property: diag(2704, ts.DiagnosticCategory.Error, "The_operand_of_a_delete_operator_cannot_be_a_read_only_property_2704", "The operand of a 'delete' operator cannot be a read-only property."),
-        An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, ts.DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),
+        An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2705, ts.DiagnosticCategory.Error, "An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_de_2705", "An async function or method in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),
         Required_type_parameters_may_not_follow_optional_type_parameters: diag(2706, ts.DiagnosticCategory.Error, "Required_type_parameters_may_not_follow_optional_type_parameters_2706", "Required type parameters may not follow optional type parameters."),
         Generic_type_0_requires_between_1_and_2_type_arguments: diag(2707, ts.DiagnosticCategory.Error, "Generic_type_0_requires_between_1_and_2_type_arguments_2707", "Generic type '{0}' requires between {1} and {2} type arguments."),
         Cannot_use_namespace_0_as_a_value: diag(2708, ts.DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_value_2708", "Cannot use namespace '{0}' as a value."),
         Cannot_use_namespace_0_as_a_type: diag(2709, ts.DiagnosticCategory.Error, "Cannot_use_namespace_0_as_a_type_2709", "Cannot use namespace '{0}' as a type."),
         _0_are_specified_twice_The_attribute_named_0_will_be_overwritten: diag(2710, ts.DiagnosticCategory.Error, "_0_are_specified_twice_The_attribute_named_0_will_be_overwritten_2710", "'{0}' are specified twice. The attribute named '{0}' will be overwritten."),
-        A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, ts.DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option."),
-        A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, ts.DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "A dynamic import call in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option."),
+        A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES2015_in_your_lib_option: diag(2711, ts.DiagnosticCategory.Error, "A_dynamic_import_call_returns_a_Promise_Make_sure_you_have_a_declaration_for_Promise_or_include_ES20_2711", "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your '--lib' option."),
+        A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option: diag(2712, ts.DiagnosticCategory.Error, "A_dynamic_import_call_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declarat_2712", "A dynamic import call in ES5/ES3 requires the 'Promise' constructor.  Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your '--lib' option."),
         Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1: diag(2713, ts.DiagnosticCategory.Error, "Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_p_2713", "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?"),
         The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context: diag(2714, ts.DiagnosticCategory.Error, "The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context_2714", "The expression of an export assignment must be an identifier or qualified name in an ambient context."),
         Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor: diag(2715, ts.DiagnosticCategory.Error, "Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor_2715", "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor."),
@@ -5682,7 +5860,7 @@ var ts;
         The_last_overload_is_declared_here: diag(2771, ts.DiagnosticCategory.Error, "The_last_overload_is_declared_here_2771", "The last overload is declared here."),
         Overload_0_of_1_2_gave_the_following_error: diag(2772, ts.DiagnosticCategory.Error, "Overload_0_of_1_2_gave_the_following_error_2772", "Overload {0} of {1}, '{2}', gave the following error."),
         Did_you_forget_to_use_await: diag(2773, ts.DiagnosticCategory.Error, "Did_you_forget_to_use_await_2773", "Did you forget to use 'await'?"),
-        This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, ts.DiagnosticCategory.Error, "This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it__2774", "This condition will always return true since the function is always defined. Did you mean to call it instead?"),
+        This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead: diag(2774, ts.DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_2774", "This condition will always return true since this function is always defined. Did you mean to call it instead?"),
         Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation: diag(2775, ts.DiagnosticCategory.Error, "Assertions_require_every_name_in_the_call_target_to_be_declared_with_an_explicit_type_annotation_2775", "Assertions require every name in the call target to be declared with an explicit type annotation."),
         Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name: diag(2776, ts.DiagnosticCategory.Error, "Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name_2776", "Assertions require the call target to be an identifier or qualified name."),
         The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access: diag(2777, ts.DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access_2777", "The operand of an increment or decrement operator may not be an optional property access."),
@@ -5709,6 +5887,31 @@ var ts;
         The_declaration_was_marked_as_deprecated_here: diag(2798, ts.DiagnosticCategory.Error, "The_declaration_was_marked_as_deprecated_here_2798", "The declaration was marked as deprecated here."),
         Type_produces_a_tuple_type_that_is_too_large_to_represent: diag(2799, ts.DiagnosticCategory.Error, "Type_produces_a_tuple_type_that_is_too_large_to_represent_2799", "Type produces a tuple type that is too large to represent."),
         Expression_produces_a_tuple_type_that_is_too_large_to_represent: diag(2800, ts.DiagnosticCategory.Error, "Expression_produces_a_tuple_type_that_is_too_large_to_represent_2800", "Expression produces a tuple type that is too large to represent."),
+        This_condition_will_always_return_true_since_this_0_is_always_defined: diag(2801, ts.DiagnosticCategory.Error, "This_condition_will_always_return_true_since_this_0_is_always_defined_2801", "This condition will always return true since this '{0}' is always defined."),
+        Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher: diag(2802, ts.DiagnosticCategory.Error, "Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es201_2802", "Type '{0}' can only be iterated through when using the '--downlevelIteration' flag or with a '--target' of 'es2015' or higher."),
+        Cannot_assign_to_private_method_0_Private_methods_are_not_writable: diag(2803, ts.DiagnosticCategory.Error, "Cannot_assign_to_private_method_0_Private_methods_are_not_writable_2803", "Cannot assign to private method '{0}'. Private methods are not writable."),
+        Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name: diag(2804, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name_2804", "Duplicate identifier '{0}'. Static and instance elements cannot share the same private name."),
+        Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_not_specified_with_a_target_of_esnext_Consider_adding_the_useDefineForClassFields_flag: diag(2805, ts.DiagnosticCategory.Error, "Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_no_2805", "Static fields with private names can't have initializers when the '--useDefineForClassFields' flag is not specified with a '--target' of 'esnext'. Consider adding the '--useDefineForClassFields' flag."),
+        Private_accessor_was_defined_without_a_getter: diag(2806, ts.DiagnosticCategory.Error, "Private_accessor_was_defined_without_a_getter_2806", "Private accessor was defined without a getter."),
+        This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0: diag(2807, ts.DiagnosticCategory.Error, "This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_o_2807", "This syntax requires an imported helper named '{1}' with {2} parameters, which is not compatible with the one in '{0}'. Consider upgrading your version of '{0}'."),
+        A_get_accessor_must_be_at_least_as_accessible_as_the_setter: diag(2808, ts.DiagnosticCategory.Error, "A_get_accessor_must_be_at_least_as_accessible_as_the_setter_2808", "A get accessor must be at least as accessible as the setter"),
+        Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses: diag(2809, ts.DiagnosticCategory.Error, "Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_d_2809", "Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the the whole assignment in parentheses."),
+        Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnext_and_useDefineForClassFields_is_false: diag(2810, ts.DiagnosticCategory.Error, "Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnex_2810", "Property '{0}' may not be used in a static property's initializer in the same class when 'target' is 'esnext' and 'useDefineForClassFields' is 'false'."),
+        Initializer_for_property_0: diag(2811, ts.DiagnosticCategory.Error, "Initializer_for_property_0_2811", "Initializer for property '{0}'"),
+        Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom: diag(2812, ts.DiagnosticCategory.Error, "Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom_2812", "Property '{0}' does not exist on type '{1}'. Try changing the 'lib' compiler option to include 'dom'."),
+        Class_declaration_cannot_implement_overload_list_for_0: diag(2813, ts.DiagnosticCategory.Error, "Class_declaration_cannot_implement_overload_list_for_0_2813", "Class declaration cannot implement overload list for '{0}'."),
+        Function_with_bodies_can_only_merge_with_classes_that_are_ambient: diag(2814, ts.DiagnosticCategory.Error, "Function_with_bodies_can_only_merge_with_classes_that_are_ambient_2814", "Function with bodies can only merge with classes that are ambient."),
+        arguments_cannot_be_referenced_in_property_initializers: diag(2815, ts.DiagnosticCategory.Error, "arguments_cannot_be_referenced_in_property_initializers_2815", "'arguments' cannot be referenced in property initializers."),
+        Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class: diag(2816, ts.DiagnosticCategory.Error, "Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class_2816", "Cannot use 'this' in a static property initializer of a decorated class."),
+        Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block: diag(2817, ts.DiagnosticCategory.Error, "Property_0_has_no_initializer_and_is_not_definitely_assigned_in_a_class_static_block_2817", "Property '{0}' has no initializer and is not definitely assigned in a class static block."),
+        Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers: diag(2818, ts.DiagnosticCategory.Error, "Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializer_2818", "Duplicate identifier '{0}'. Compiler reserves name '{1}' when emitting 'super' references in static initializers."),
+        Namespace_name_cannot_be_0: diag(2819, ts.DiagnosticCategory.Error, "Namespace_name_cannot_be_0_2819", "Namespace name cannot be '{0}'."),
+        Type_0_is_not_assignable_to_type_1_Did_you_mean_2: diag(2820, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_Did_you_mean_2_2820", "Type '{0}' is not assignable to type '{1}'. Did you mean '{2}'?"),
+        Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext: diag(2821, ts.DiagnosticCategory.Error, "Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext_2821", "Import assertions are only supported when the '--module' option is set to 'esnext'."),
+        Import_assertions_cannot_be_used_with_type_only_imports_or_exports: diag(2822, ts.DiagnosticCategory.Error, "Import_assertions_cannot_be_used_with_type_only_imports_or_exports_2822", "Import assertions cannot be used with type-only imports or exports."),
+        Cannot_find_namespace_0_Did_you_mean_1: diag(2833, ts.DiagnosticCategory.Error, "Cannot_find_namespace_0_Did_you_mean_1_2833", "Cannot find namespace '{0}'. Did you mean '{1}'?"),
+        Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path: diag(2834, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2834", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path."),
+        Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0: diag(2835, ts.DiagnosticCategory.Error, "Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_n_2835", "Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean '{0}'?"),
         Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
         Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
         Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -5803,6 +6006,19 @@ var ts;
         Type_arguments_for_0_circularly_reference_themselves: diag(4109, ts.DiagnosticCategory.Error, "Type_arguments_for_0_circularly_reference_themselves_4109", "Type arguments for '{0}' circularly reference themselves."),
         Tuple_type_arguments_circularly_reference_themselves: diag(4110, ts.DiagnosticCategory.Error, "Tuple_type_arguments_circularly_reference_themselves_4110", "Tuple type arguments circularly reference themselves."),
         Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0: diag(4111, ts.DiagnosticCategory.Error, "Property_0_comes_from_an_index_signature_so_it_must_be_accessed_with_0_4111", "Property '{0}' comes from an index signature, so it must be accessed with ['{0}']."),
+        This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class: diag(4112, ts.DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another__4112", "This member cannot have an 'override' modifier because its containing class '{0}' does not extend another class."),
+        This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0: diag(4113, ts.DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_4113", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'."),
+        This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0: diag(4114, ts.DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0_4114", "This member must have an 'override' modifier because it overrides a member in the base class '{0}'."),
+        This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0: diag(4115, ts.DiagnosticCategory.Error, "This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0_4115", "This parameter property must have an 'override' modifier because it overrides a member in base class '{0}'."),
+        This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0: diag(4116, ts.DiagnosticCategory.Error, "This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared__4116", "This member must have an 'override' modifier because it overrides an abstract method that is declared in the base class '{0}'."),
+        This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4117, ts.DiagnosticCategory.Error, "This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you__4117", "This member cannot have an 'override' modifier because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
+        The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized: diag(4118, ts.DiagnosticCategory.Error, "The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized_4118", "The type of this node cannot be serialized because its property '{0}' cannot be serialized."),
+        This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4119, ts.DiagnosticCategory.Error, "This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_4119", "This member must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),
+        This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0: diag(4120, ts.DiagnosticCategory.Error, "This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_4120", "This parameter property must have a JSDoc comment with an '@override' tag because it overrides a member in the base class '{0}'."),
+        This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class: diag(4121, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_4121", "This member cannot have a JSDoc comment with an '@override' tag because its containing class '{0}' does not extend another class."),
+        This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
+        This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, ts.DiagnosticCategory.Error, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
+        Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, ts.DiagnosticCategory.Error, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
         The_current_host_does_not_support_the_0_option: diag(5001, ts.DiagnosticCategory.Error, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
         Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, ts.DiagnosticCategory.Error, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
         File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, ts.DiagnosticCategory.Error, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
@@ -5837,7 +6053,7 @@ var ts;
         Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_esNext: diag(5071, ts.DiagnosticCategory.Error, "Option_resolveJsonModule_can_only_be_specified_when_module_code_generation_is_commonjs_amd_es2015_or_5071", "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'."),
         Unknown_build_option_0: diag(5072, ts.DiagnosticCategory.Error, "Unknown_build_option_0_5072", "Unknown build option '{0}'."),
         Build_option_0_requires_a_value_of_type_1: diag(5073, ts.DiagnosticCategory.Error, "Build_option_0_requires_a_value_of_type_1_5073", "Build option '{0}' requires a value of type {1}."),
-        Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option `--tsBuildInfoFile` is specified."),
+        Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified: diag(5074, ts.DiagnosticCategory.Error, "Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBui_5074", "Option '--incremental' can only be specified using tsconfig, emitting to single file or when option '--tsBuildInfoFile' is specified."),
         _0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2: diag(5075, ts.DiagnosticCategory.Error, "_0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_5075", "'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different subtype of constraint '{2}'."),
         _0_and_1_operations_cannot_be_mixed_without_parentheses: diag(5076, ts.DiagnosticCategory.Error, "_0_and_1_operations_cannot_be_mixed_without_parentheses_5076", "'{0}' and '{1}' operations cannot be mixed without parentheses."),
         Unknown_build_option_0_Did_you_mean_1: diag(5077, ts.DiagnosticCategory.Error, "Unknown_build_option_0_Did_you_mean_1_5077", "Unknown build option '{0}'. Did you mean '{1}'?"),
@@ -5850,15 +6066,18 @@ var ts;
         Tuple_members_must_all_have_names_or_all_not_have_names: diag(5084, ts.DiagnosticCategory.Error, "Tuple_members_must_all_have_names_or_all_not_have_names_5084", "Tuple members must all have names or all not have names."),
         A_tuple_member_cannot_be_both_optional_and_rest: diag(5085, ts.DiagnosticCategory.Error, "A_tuple_member_cannot_be_both_optional_and_rest_5085", "A tuple member cannot be both optional and rest."),
         A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type: diag(5086, ts.DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_c_5086", "A labeled tuple element is declared as optional with a question mark after the name and before the colon, rather than after the type."),
-        A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, ts.DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a `...` before the name, rather than before the type."),
+        A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type: diag(5087, ts.DiagnosticCategory.Error, "A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type_5087", "A labeled tuple element is declared as rest with a '...' before the name, rather than before the type."),
         The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary: diag(5088, ts.DiagnosticCategory.Error, "The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialize_5088", "The inferred type of '{0}' references a type with a cyclic structure which cannot be trivially serialized. A type annotation is necessary."),
         Option_0_cannot_be_specified_when_option_jsx_is_1: diag(5089, ts.DiagnosticCategory.Error, "Option_0_cannot_be_specified_when_option_jsx_is_1_5089", "Option '{0}' cannot be specified when option 'jsx' is '{1}'."),
         Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash: diag(5090, ts.DiagnosticCategory.Error, "Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash_5090", "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?"),
         Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled: diag(5091, ts.DiagnosticCategory.Error, "Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled_5091", "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled."),
+        The_root_value_of_a_0_file_must_be_an_object: diag(5092, ts.DiagnosticCategory.Error, "The_root_value_of_a_0_file_must_be_an_object_5092", "The root value of a '{0}' file must be an object."),
+        Compiler_option_0_may_only_be_used_with_build: diag(5093, ts.DiagnosticCategory.Error, "Compiler_option_0_may_only_be_used_with_build_5093", "Compiler option '--{0}' may only be used with '--build'."),
+        Compiler_option_0_may_not_be_used_with_build: diag(5094, ts.DiagnosticCategory.Error, "Compiler_option_0_may_not_be_used_with_build_5094", "Compiler option '--{0}' may not be used with '--build'."),
+        Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later: diag(5095, ts.DiagnosticCategory.Error, "Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later_5095", "Option 'preserveValueImports' can only be used when 'module' is set to 'es2015' or later."),
         Generates_a_sourcemap_for_each_corresponding_d_ts_file: diag(6000, ts.DiagnosticCategory.Message, "Generates_a_sourcemap_for_each_corresponding_d_ts_file_6000", "Generates a sourcemap for each corresponding '.d.ts' file."),
         Concatenate_and_emit_output_to_single_file: diag(6001, ts.DiagnosticCategory.Message, "Concatenate_and_emit_output_to_single_file_6001", "Concatenate and emit output to single file."),
         Generates_corresponding_d_ts_file: diag(6002, ts.DiagnosticCategory.Message, "Generates_corresponding_d_ts_file_6002", "Generates corresponding '.d.ts' file."),
-        Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6003, ts.DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003", "Specify the location where debugger should locate map files instead of generated locations."),
         Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations: diag(6004, ts.DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004", "Specify the location where debugger should locate TypeScript files instead of source locations."),
         Watch_input_files: diag(6005, ts.DiagnosticCategory.Message, "Watch_input_files_6005", "Watch input files."),
         Redirect_output_structure_to_the_directory: diag(6006, ts.DiagnosticCategory.Message, "Redirect_output_structure_to_the_directory_6006", "Redirect output structure to the directory."),
@@ -5870,8 +6089,8 @@ var ts;
         Skip_type_checking_of_declaration_files: diag(6012, ts.DiagnosticCategory.Message, "Skip_type_checking_of_declaration_files_6012", "Skip type checking of declaration files."),
         Do_not_resolve_the_real_path_of_symlinks: diag(6013, ts.DiagnosticCategory.Message, "Do_not_resolve_the_real_path_of_symlinks_6013", "Do not resolve the real path of symlinks."),
         Only_emit_d_ts_declaration_files: diag(6014, ts.DiagnosticCategory.Message, "Only_emit_d_ts_declaration_files_6014", "Only emit '.d.ts' declaration files."),
-        Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_ESNEXT: diag(6015, ts.DiagnosticCategory.Message, "Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_6015", "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'."),
-        Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext: diag(6016, ts.DiagnosticCategory.Message, "Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext_6016", "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'."),
+        Specify_ECMAScript_target_version: diag(6015, ts.DiagnosticCategory.Message, "Specify_ECMAScript_target_version_6015", "Specify ECMAScript target version."),
+        Specify_module_code_generation: diag(6016, ts.DiagnosticCategory.Message, "Specify_module_code_generation_6016", "Specify module code generation."),
         Print_this_message: diag(6017, ts.DiagnosticCategory.Message, "Print_this_message_6017", "Print this message."),
         Print_the_compiler_s_version: diag(6019, ts.DiagnosticCategory.Message, "Print_the_compiler_s_version_6019", "Print the compiler's version."),
         Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json: diag(6020, ts.DiagnosticCategory.Message, "Compile_the_project_given_the_path_to_its_configuration_file_or_to_a_folder_with_a_tsconfig_json_6020", "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'."),
@@ -5896,7 +6115,6 @@ var ts;
         Unterminated_quoted_string_in_response_file_0: diag(6045, ts.DiagnosticCategory.Error, "Unterminated_quoted_string_in_response_file_0_6045", "Unterminated quoted string in response file '{0}'."),
         Argument_for_0_option_must_be_Colon_1: diag(6046, ts.DiagnosticCategory.Error, "Argument_for_0_option_must_be_Colon_1_6046", "Argument for '{0}' option must be: {1}."),
         Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1: diag(6048, ts.DiagnosticCategory.Error, "Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048", "Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'."),
-        Unsupported_locale_0: diag(6049, ts.DiagnosticCategory.Error, "Unsupported_locale_0_6049", "Unsupported locale '{0}'."),
         Unable_to_open_file_0: diag(6050, ts.DiagnosticCategory.Error, "Unable_to_open_file_0_6050", "Unable to open file '{0}'."),
         Corrupted_locale_file_0: diag(6051, ts.DiagnosticCategory.Error, "Corrupted_locale_file_0_6051", "Corrupted locale file {0}."),
         Raise_error_on_expressions_and_declarations_with_an_implied_any_type: diag(6052, ts.DiagnosticCategory.Message, "Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052", "Raise error on expressions and declarations with an implied 'any' type."),
@@ -5911,7 +6129,6 @@ var ts;
         Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line: diag(6064, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_null_on_command_line_6064", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'null' on command line."),
         Enables_experimental_support_for_ES7_decorators: diag(6065, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_decorators_6065", "Enables experimental support for ES7 decorators."),
         Enables_experimental_support_for_emitting_type_metadata_for_decorators: diag(6066, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066", "Enables experimental support for emitting type metadata for decorators."),
-        Enables_experimental_support_for_ES7_async_functions: diag(6068, ts.DiagnosticCategory.Message, "Enables_experimental_support_for_ES7_async_functions_6068", "Enables experimental support for ES7 async functions."),
         Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6: diag(6069, ts.DiagnosticCategory.Message, "Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069", "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6)."),
         Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file: diag(6070, ts.DiagnosticCategory.Message, "Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070", "Initializes a TypeScript project and creates a tsconfig.json file."),
         Successfully_created_a_tsconfig_json_file: diag(6071, ts.DiagnosticCategory.Message, "Successfully_created_a_tsconfig_json_file_6071", "Successfully created a tsconfig.json file."),
@@ -5923,7 +6140,7 @@ var ts;
         Do_not_report_errors_on_unreachable_code: diag(6077, ts.DiagnosticCategory.Message, "Do_not_report_errors_on_unreachable_code_6077", "Do not report errors on unreachable code."),
         Disallow_inconsistently_cased_references_to_the_same_file: diag(6078, ts.DiagnosticCategory.Message, "Disallow_inconsistently_cased_references_to_the_same_file_6078", "Disallow inconsistently-cased references to the same file."),
         Specify_library_files_to_be_included_in_the_compilation: diag(6079, ts.DiagnosticCategory.Message, "Specify_library_files_to_be_included_in_the_compilation_6079", "Specify library files to be included in the compilation."),
-        Specify_JSX_code_generation_Colon_preserve_react_native_react_react_jsx_or_react_jsxdev: diag(6080, ts.DiagnosticCategory.Message, "Specify_JSX_code_generation_Colon_preserve_react_native_react_react_jsx_or_react_jsxdev_6080", "Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'."),
+        Specify_JSX_code_generation: diag(6080, ts.DiagnosticCategory.Message, "Specify_JSX_code_generation_6080", "Specify JSX code generation."),
         File_0_has_an_unsupported_extension_so_skipping_it: diag(6081, ts.DiagnosticCategory.Message, "File_0_has_an_unsupported_extension_so_skipping_it_6081", "File '{0}' has an unsupported extension, so skipping it."),
         Only_amd_and_system_modules_are_supported_alongside_0: diag(6082, ts.DiagnosticCategory.Error, "Only_amd_and_system_modules_are_supported_alongside_0_6082", "Only 'amd' and 'system' modules are supported alongside --{0}."),
         Base_directory_to_resolve_non_absolute_module_names: diag(6083, ts.DiagnosticCategory.Message, "Base_directory_to_resolve_non_absolute_module_names_6083", "Base directory to resolve non-absolute module names."),
@@ -5946,7 +6163,6 @@ var ts;
         package_json_does_not_have_a_0_field: diag(6100, ts.DiagnosticCategory.Message, "package_json_does_not_have_a_0_field_6100", "'package.json' does not have a '{0}' field."),
         package_json_has_0_field_1_that_references_2: diag(6101, ts.DiagnosticCategory.Message, "package_json_has_0_field_1_that_references_2_6101", "'package.json' has '{0}' field '{1}' that references '{2}'."),
         Allow_javascript_files_to_be_compiled: diag(6102, ts.DiagnosticCategory.Message, "Allow_javascript_files_to_be_compiled_6102", "Allow javascript files to be compiled."),
-        Option_0_should_have_array_of_strings_as_a_value: diag(6103, ts.DiagnosticCategory.Error, "Option_0_should_have_array_of_strings_as_a_value_6103", "Option '{0}' should have array of strings as a value."),
         Checking_if_0_is_the_longest_matching_prefix_for_1_2: diag(6104, ts.DiagnosticCategory.Message, "Checking_if_0_is_the_longest_matching_prefix_for_1_2_6104", "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'."),
         Expected_type_of_0_field_in_package_json_to_be_1_got_2: diag(6105, ts.DiagnosticCategory.Message, "Expected_type_of_0_field_in_package_json_to_be_1_got_2_6105", "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'."),
         baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1: diag(6106, ts.DiagnosticCategory.Message, "baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1_6106", "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'."),
@@ -5960,8 +6176,6 @@ var ts;
         Unknown_option_excludes_Did_you_mean_exclude: diag(6114, ts.DiagnosticCategory.Error, "Unknown_option_excludes_Did_you_mean_exclude_6114", "Unknown option 'excludes'. Did you mean 'exclude'?"),
         Raise_error_on_this_expressions_with_an_implied_any_type: diag(6115, ts.DiagnosticCategory.Message, "Raise_error_on_this_expressions_with_an_implied_any_type_6115", "Raise error on 'this' expressions with an implied 'any' type."),
         Resolving_type_reference_directive_0_containing_file_1_root_directory_2: diag(6116, ts.DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_root_directory_2_6116", "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========"),
-        Resolving_using_primary_search_paths: diag(6117, ts.DiagnosticCategory.Message, "Resolving_using_primary_search_paths_6117", "Resolving using primary search paths..."),
-        Resolving_from_node_modules_folder: diag(6118, ts.DiagnosticCategory.Message, "Resolving_from_node_modules_folder_6118", "Resolving from node_modules folder..."),
         Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2: diag(6119, ts.DiagnosticCategory.Message, "Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2_6119", "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========"),
         Type_reference_directive_0_was_not_resolved: diag(6120, ts.DiagnosticCategory.Message, "Type_reference_directive_0_was_not_resolved_6120", "======== Type reference directive '{0}' was not resolved. ========"),
         Resolving_with_primary_search_path_0: diag(6121, ts.DiagnosticCategory.Message, "Resolving_with_primary_search_path_0_6121", "Resolving with primary search path '{0}'."),
@@ -6005,7 +6219,6 @@ var ts;
         List_of_folders_to_include_type_definitions_from: diag(6161, ts.DiagnosticCategory.Message, "List_of_folders_to_include_type_definitions_from_6161", "List of folders to include type definitions from."),
         Disable_size_limitations_on_JavaScript_projects: diag(6162, ts.DiagnosticCategory.Message, "Disable_size_limitations_on_JavaScript_projects_6162", "Disable size limitations on JavaScript projects."),
         The_character_set_of_the_input_files: diag(6163, ts.DiagnosticCategory.Message, "The_character_set_of_the_input_files_6163", "The character set of the input files."),
-        Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6164, ts.DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6164", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),
         Do_not_truncate_error_messages: diag(6165, ts.DiagnosticCategory.Message, "Do_not_truncate_error_messages_6165", "Do not truncate error messages."),
         Output_directory_for_generated_declaration_files: diag(6166, ts.DiagnosticCategory.Message, "Output_directory_for_generated_declaration_files_6166", "Output directory for generated declaration files."),
         A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl: diag(6167, ts.DiagnosticCategory.Message, "A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl_6167", "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'."),
@@ -6013,20 +6226,12 @@ var ts;
         Show_all_compiler_options: diag(6169, ts.DiagnosticCategory.Message, "Show_all_compiler_options_6169", "Show all compiler options."),
         Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file: diag(6170, ts.DiagnosticCategory.Message, "Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file_6170", "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file"),
         Command_line_Options: diag(6171, ts.DiagnosticCategory.Message, "Command_line_Options_6171", "Command-line Options"),
-        Basic_Options: diag(6172, ts.DiagnosticCategory.Message, "Basic_Options_6172", "Basic Options"),
-        Strict_Type_Checking_Options: diag(6173, ts.DiagnosticCategory.Message, "Strict_Type_Checking_Options_6173", "Strict Type-Checking Options"),
-        Module_Resolution_Options: diag(6174, ts.DiagnosticCategory.Message, "Module_Resolution_Options_6174", "Module Resolution Options"),
-        Source_Map_Options: diag(6175, ts.DiagnosticCategory.Message, "Source_Map_Options_6175", "Source Map Options"),
-        Additional_Checks: diag(6176, ts.DiagnosticCategory.Message, "Additional_Checks_6176", "Additional Checks"),
-        Experimental_Options: diag(6177, ts.DiagnosticCategory.Message, "Experimental_Options_6177", "Experimental Options"),
-        Advanced_Options: diag(6178, ts.DiagnosticCategory.Message, "Advanced_Options_6178", "Advanced Options"),
         Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3: diag(6179, ts.DiagnosticCategory.Message, "Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3_6179", "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'."),
         Enable_all_strict_type_checking_options: diag(6180, ts.DiagnosticCategory.Message, "Enable_all_strict_type_checking_options_6180", "Enable all strict type-checking options."),
         List_of_language_service_plugins: diag(6181, ts.DiagnosticCategory.Message, "List_of_language_service_plugins_6181", "List of language service plugins."),
         Scoped_package_detected_looking_in_0: diag(6182, ts.DiagnosticCategory.Message, "Scoped_package_detected_looking_in_0_6182", "Scoped package detected, looking in '{0}'"),
-        Reusing_resolution_of_module_0_to_file_1_from_old_program: diag(6183, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_to_file_1_from_old_program_6183", "Reusing resolution of module '{0}' to file '{1}' from old program."),
-        Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program: diag(6184, ts.DiagnosticCategory.Message, "Reusing_module_resolutions_originating_in_0_since_resolutions_are_unchanged_from_old_program_6184", "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program."),
-        Disable_strict_checking_of_generic_signatures_in_function_types: diag(6185, ts.DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6185", "Disable strict checking of generic signatures in function types."),
+        Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6183, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_6183", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),
+        Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6184, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package__6184", "Reusing resolution of module '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),
         Enable_strict_checking_of_function_types: diag(6186, ts.DiagnosticCategory.Message, "Enable_strict_checking_of_function_types_6186", "Enable strict checking of function types."),
         Enable_strict_checking_of_property_initialization_in_classes: diag(6187, ts.DiagnosticCategory.Message, "Enable_strict_checking_of_property_initialization_in_classes_6187", "Enable strict checking of property initialization in classes."),
         Numeric_separators_are_not_allowed_here: diag(6188, ts.DiagnosticCategory.Error, "Numeric_separators_are_not_allowed_here_6188", "Numeric separators are not allowed here."),
@@ -6065,10 +6270,9 @@ var ts;
         Emit_class_fields_with_Define_instead_of_Set: diag(6222, ts.DiagnosticCategory.Message, "Emit_class_fields_with_Define_instead_of_Set_6222", "Emit class fields with Define instead of Set."),
         Generates_a_CPU_profile: diag(6223, ts.DiagnosticCategory.Message, "Generates_a_CPU_profile_6223", "Generates a CPU profile."),
         Disable_solution_searching_for_this_project: diag(6224, ts.DiagnosticCategory.Message, "Disable_solution_searching_for_this_project_6224", "Disable solution searching for this project."),
-        Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),
-        Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling'."),
-        Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority'."),
-        Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6228, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6228", "Synchronously call callbacks and update the state of directory watchers on platforms that don't support recursive watching natively."),
+        Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling_UseFsEvents_UseFsEventsOnParentDirectory: diag(6225, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_Dynami_6225", "Specify strategy for watching file: 'FixedPollingInterval' (default), 'PriorityPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling', 'UseFsEvents', 'UseFsEventsOnParentDirectory'."),
+        Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling_FixedChunkSizePolling: diag(6226, ts.DiagnosticCategory.Message, "Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively__6226", "Specify strategy for watching directory on platforms that don't support recursive watching natively: 'UseFsEvents' (default), 'FixedPollingInterval', 'DynamicPriorityPolling', 'FixedChunkSizePolling'."),
+        Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority_FixedChunkSize: diag(6227, ts.DiagnosticCategory.Message, "Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_6227", "Specify strategy for creating a polling watch when it fails to create using file system events: 'FixedInterval' (default), 'PriorityInterval', 'DynamicPriority', 'FixedChunkSize'."),
         Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3: diag(6229, ts.DiagnosticCategory.Error, "Tag_0_expects_at_least_1_arguments_but_the_JSX_factory_2_provides_at_most_3_6229", "Tag '{0}' expects at least '{1}' arguments, but the JSX factory '{2}' provides at most '{3}'."),
         Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line: diag(6230, ts.DiagnosticCategory.Error, "Option_0_can_only_be_specified_in_tsconfig_json_file_or_set_to_false_or_null_on_command_line_6230", "Option '{0}' can only be specified in 'tsconfig.json' file or set to 'false' or 'null' on command line."),
         Could_not_resolve_the_path_0_with_the_extensions_Colon_1: diag(6231, ts.DiagnosticCategory.Error, "Could_not_resolve_the_path_0_with_the_extensions_Colon_1_6231", "Could not resolve the path '{0}' with the extensions: {1}."),
@@ -6078,8 +6282,34 @@ var ts;
         Disable_loading_referenced_projects: diag(6235, ts.DiagnosticCategory.Message, "Disable_loading_referenced_projects_6235", "Disable loading referenced projects."),
         Arguments_for_the_rest_parameter_0_were_not_provided: diag(6236, ts.DiagnosticCategory.Error, "Arguments_for_the_rest_parameter_0_were_not_provided_6236", "Arguments for the rest parameter '{0}' were not provided."),
         Generates_an_event_trace_and_a_list_of_types: diag(6237, ts.DiagnosticCategory.Message, "Generates_an_event_trace_and_a_list_of_types_6237", "Generates an event trace and a list of types."),
-        Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, ts.DiagnosticCategory.Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the `jsx` and `jsxs` factory functions from. eg, react"),
-        Projects_to_reference: diag(6300, ts.DiagnosticCategory.Message, "Projects_to_reference_6300", "Projects to reference"),
+        Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react: diag(6238, ts.DiagnosticCategory.Error, "Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react_6238", "Specify the module specifier to be used to import the 'jsx' and 'jsxs' factory functions from. eg, react"),
+        File_0_exists_according_to_earlier_cached_lookups: diag(6239, ts.DiagnosticCategory.Message, "File_0_exists_according_to_earlier_cached_lookups_6239", "File '{0}' exists according to earlier cached lookups."),
+        File_0_does_not_exist_according_to_earlier_cached_lookups: diag(6240, ts.DiagnosticCategory.Message, "File_0_does_not_exist_according_to_earlier_cached_lookups_6240", "File '{0}' does not exist according to earlier cached lookups."),
+        Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1: diag(6241, ts.DiagnosticCategory.Message, "Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1_6241", "Resolution for type reference directive '{0}' was found in cache from location '{1}'."),
+        Resolving_type_reference_directive_0_containing_file_1: diag(6242, ts.DiagnosticCategory.Message, "Resolving_type_reference_directive_0_containing_file_1_6242", "======== Resolving type reference directive '{0}', containing file '{1}'. ========"),
+        Interpret_optional_property_types_as_written_rather_than_adding_undefined: diag(6243, ts.DiagnosticCategory.Message, "Interpret_optional_property_types_as_written_rather_than_adding_undefined_6243", "Interpret optional property types as written, rather than adding 'undefined'."),
+        Modules: diag(6244, ts.DiagnosticCategory.Message, "Modules_6244", "Modules"),
+        File_Management: diag(6245, ts.DiagnosticCategory.Message, "File_Management_6245", "File Management"),
+        Emit: diag(6246, ts.DiagnosticCategory.Message, "Emit_6246", "Emit"),
+        JavaScript_Support: diag(6247, ts.DiagnosticCategory.Message, "JavaScript_Support_6247", "JavaScript Support"),
+        Type_Checking: diag(6248, ts.DiagnosticCategory.Message, "Type_Checking_6248", "Type Checking"),
+        Editor_Support: diag(6249, ts.DiagnosticCategory.Message, "Editor_Support_6249", "Editor Support"),
+        Watch_and_Build_Modes: diag(6250, ts.DiagnosticCategory.Message, "Watch_and_Build_Modes_6250", "Watch and Build Modes"),
+        Compiler_Diagnostics: diag(6251, ts.DiagnosticCategory.Message, "Compiler_Diagnostics_6251", "Compiler Diagnostics"),
+        Interop_Constraints: diag(6252, ts.DiagnosticCategory.Message, "Interop_Constraints_6252", "Interop Constraints"),
+        Backwards_Compatibility: diag(6253, ts.DiagnosticCategory.Message, "Backwards_Compatibility_6253", "Backwards Compatibility"),
+        Language_and_Environment: diag(6254, ts.DiagnosticCategory.Message, "Language_and_Environment_6254", "Language and Environment"),
+        Projects: diag(6255, ts.DiagnosticCategory.Message, "Projects_6255", "Projects"),
+        Output_Formatting: diag(6256, ts.DiagnosticCategory.Message, "Output_Formatting_6256", "Output Formatting"),
+        Completeness: diag(6257, ts.DiagnosticCategory.Message, "Completeness_6257", "Completeness"),
+        _0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file: diag(6258, ts.DiagnosticCategory.Error, "_0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file_6258", "'{0}' should be set inside the 'compilerOptions' object of the config json file"),
+        Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve: diag(6270, ts.DiagnosticCategory.Message, "Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve_6270", "Directory '{0}' has no containing package.json scope. Imports will not resolve."),
+        Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6271, ts.DiagnosticCategory.Message, "Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6271", "Import specifier '{0}' does not exist in package.json scope at path '{1}'."),
+        Invalid_import_specifier_0_has_no_possible_resolutions: diag(6272, ts.DiagnosticCategory.Message, "Invalid_import_specifier_0_has_no_possible_resolutions_6272", "Invalid import specifier '{0}' has no possible resolutions."),
+        package_json_scope_0_has_no_imports_defined: diag(6273, ts.DiagnosticCategory.Message, "package_json_scope_0_has_no_imports_defined_6273", "package.json scope '{0}' has no imports defined."),
+        package_json_scope_0_explicitly_maps_specifier_1_to_null: diag(6274, ts.DiagnosticCategory.Message, "package_json_scope_0_explicitly_maps_specifier_1_to_null_6274", "package.json scope '{0}' explicitly maps specifier '{1}' to null."),
+        package_json_scope_0_has_invalid_type_for_target_of_specifier_1: diag(6275, ts.DiagnosticCategory.Message, "package_json_scope_0_has_invalid_type_for_target_of_specifier_1_6275", "package.json scope '{0}' has invalid type for target of specifier '{1}'"),
+        Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1: diag(6276, ts.DiagnosticCategory.Message, "Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1_6276", "Export specifier '{0}' does not exist in package.json scope at path '{1}'."),
         Enable_project_compilation: diag(6302, ts.DiagnosticCategory.Message, "Enable_project_compilation_6302", "Enable project compilation"),
         Composite_projects_may_not_disable_declaration_emit: diag(6304, ts.DiagnosticCategory.Error, "Composite_projects_may_not_disable_declaration_emit_6304", "Composite projects may not disable declaration emit."),
         Output_file_0_has_not_been_built_from_source_file_1: diag(6305, ts.DiagnosticCategory.Error, "Output_file_0_has_not_been_built_from_source_file_1_6305", "Output file '{0}' has not been built from source file '{1}'."),
@@ -6098,15 +6328,12 @@ var ts;
         A_non_dry_build_would_build_project_0: diag(6357, ts.DiagnosticCategory.Message, "A_non_dry_build_would_build_project_0_6357", "A non-dry build would build project '{0}'"),
         Building_project_0: diag(6358, ts.DiagnosticCategory.Message, "Building_project_0_6358", "Building project '{0}'..."),
         Updating_output_timestamps_of_project_0: diag(6359, ts.DiagnosticCategory.Message, "Updating_output_timestamps_of_project_0_6359", "Updating output timestamps of project '{0}'..."),
-        delete_this_Project_0_is_up_to_date_because_it_was_previously_built: diag(6360, ts.DiagnosticCategory.Message, "delete_this_Project_0_is_up_to_date_because_it_was_previously_built_6360", "delete this - Project '{0}' is up to date because it was previously built"),
         Project_0_is_up_to_date: diag(6361, ts.DiagnosticCategory.Message, "Project_0_is_up_to_date_6361", "Project '{0}' is up to date"),
         Skipping_build_of_project_0_because_its_dependency_1_has_errors: diag(6362, ts.DiagnosticCategory.Message, "Skipping_build_of_project_0_because_its_dependency_1_has_errors_6362", "Skipping build of project '{0}' because its dependency '{1}' has errors"),
         Project_0_can_t_be_built_because_its_dependency_1_has_errors: diag(6363, ts.DiagnosticCategory.Message, "Project_0_can_t_be_built_because_its_dependency_1_has_errors_6363", "Project '{0}' can't be built because its dependency '{1}' has errors"),
         Build_one_or_more_projects_and_their_dependencies_if_out_of_date: diag(6364, ts.DiagnosticCategory.Message, "Build_one_or_more_projects_and_their_dependencies_if_out_of_date_6364", "Build one or more projects and their dependencies, if out of date"),
         Delete_the_outputs_of_all_projects: diag(6365, ts.DiagnosticCategory.Message, "Delete_the_outputs_of_all_projects_6365", "Delete the outputs of all projects"),
-        Enable_verbose_logging: diag(6366, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6366", "Enable verbose logging"),
         Show_what_would_be_built_or_deleted_if_specified_with_clean: diag(6367, ts.DiagnosticCategory.Message, "Show_what_would_be_built_or_deleted_if_specified_with_clean_6367", "Show what would be built (or deleted, if specified with '--clean')"),
-        Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6368, ts.DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6368", "Build all projects, including those that appear to be up to date"),
         Option_build_must_be_the_first_command_line_argument: diag(6369, ts.DiagnosticCategory.Error, "Option_build_must_be_the_first_command_line_argument_6369", "Option '--build' must be the first command line argument."),
         Options_0_and_1_cannot_be_combined: diag(6370, ts.DiagnosticCategory.Error, "Options_0_and_1_cannot_be_combined_6370", "Options '{0}' and '{1}' cannot be combined."),
         Updating_unchanged_output_timestamps_of_project_0: diag(6371, ts.DiagnosticCategory.Message, "Updating_unchanged_output_timestamps_of_project_0_6371", "Updating unchanged output timestamps of project '{0}'..."),
@@ -6126,14 +6353,171 @@ var ts;
         _0_is_deprecated: diag(6385, ts.DiagnosticCategory.Suggestion, "_0_is_deprecated_6385", "'{0}' is deprecated.", undefined, undefined, true),
         Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_native_implementation_of_the_Web_Performance_API_could_not_be_found: diag(6386, ts.DiagnosticCategory.Message, "Performance_timings_for_diagnostics_or_extendedDiagnostics_are_not_available_in_this_session_A_nativ_6386", "Performance timings for '--diagnostics' or '--extendedDiagnostics' are not available in this session. A native implementation of the Web Performance API could not be found."),
         The_signature_0_of_1_is_deprecated: diag(6387, ts.DiagnosticCategory.Suggestion, "The_signature_0_of_1_is_deprecated_6387", "The signature '{0}' of '{1}' is deprecated.", undefined, undefined, true),
+        Project_0_is_being_forcibly_rebuilt: diag(6388, ts.DiagnosticCategory.Message, "Project_0_is_being_forcibly_rebuilt_6388", "Project '{0}' is being forcibly rebuilt"),
+        Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved: diag(6389, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved_6389", "Reusing resolution of module '{0}' from '{1}' of old program, it was not resolved."),
+        Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2: diag(6390, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6390", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}'."),
+        Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3: diag(6391, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved__6391", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was successfully resolved to '{2}' with Package ID '{3}'."),
+        Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved: diag(6392, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved_6392", "Reusing resolution of type reference directive '{0}' from '{1}' of old program, it was not resolved."),
+        Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6393, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6393", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),
+        Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6394, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_6394", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),
+        Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6395, ts.DiagnosticCategory.Message, "Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved_6395", "Reusing resolution of module '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
+        Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3: diag(6396, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6396", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}'."),
+        Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4: diag(6397, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_succes_6397", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was successfully resolved to '{3}' with Package ID '{4}'."),
+        Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved: diag(6398, ts.DiagnosticCategory.Message, "Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_re_6398", "Reusing resolution of type reference directive '{0}' from '{1}' found in cache from location '{2}', it was not resolved."),
         The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1: diag(6500, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_property_0_which_is_declared_here_on_type_1_6500", "The expected type comes from property '{0}' which is declared here on type '{1}'"),
         The_expected_type_comes_from_this_index_signature: diag(6501, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_this_index_signature_6501", "The expected type comes from this index signature."),
         The_expected_type_comes_from_the_return_type_of_this_signature: diag(6502, ts.DiagnosticCategory.Message, "The_expected_type_comes_from_the_return_type_of_this_signature_6502", "The expected type comes from the return type of this signature."),
         Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing: diag(6503, ts.DiagnosticCategory.Message, "Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing_6503", "Print names of files that are part of the compilation and then stop processing."),
         File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option: diag(6504, ts.DiagnosticCategory.Error, "File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option_6504", "File '{0}' is a JavaScript file. Did you mean to enable the 'allowJs' option?"),
         Print_names_of_files_and_the_reason_they_are_part_of_the_compilation: diag(6505, ts.DiagnosticCategory.Message, "Print_names_of_files_and_the_reason_they_are_part_of_the_compilation_6505", "Print names of files and the reason they are part of the compilation."),
-        Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6803, ts.DiagnosticCategory.Error, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6803", "Require undeclared properties from index signatures to use element accesses."),
-        Include_undefined_in_index_signature_results: diag(6800, ts.DiagnosticCategory.Message, "Include_undefined_in_index_signature_results_6800", "Include 'undefined' in index signature results"),
+        Consider_adding_a_declare_modifier_to_this_class: diag(6506, ts.DiagnosticCategory.Message, "Consider_adding_a_declare_modifier_to_this_class_6506", "Consider adding a 'declare' modifier to this class."),
+        Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files: diag(6600, ts.DiagnosticCategory.Message, "Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these__6600", "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files."),
+        Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export: diag(6601, ts.DiagnosticCategory.Message, "Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export_6601", "Allow 'import x from y' when a module doesn't have a default export."),
+        Allow_accessing_UMD_globals_from_modules: diag(6602, ts.DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_6602", "Allow accessing UMD globals from modules."),
+        Disable_error_reporting_for_unreachable_code: diag(6603, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unreachable_code_6603", "Disable error reporting for unreachable code."),
+        Disable_error_reporting_for_unused_labels: diag(6604, ts.DiagnosticCategory.Message, "Disable_error_reporting_for_unused_labels_6604", "Disable error reporting for unused labels."),
+        Ensure_use_strict_is_always_emitted: diag(6605, ts.DiagnosticCategory.Message, "Ensure_use_strict_is_always_emitted_6605", "Ensure 'use strict' is always emitted."),
+        Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it: diag(6606, ts.DiagnosticCategory.Message, "Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_wi_6606", "Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it."),
+        Specify_the_base_directory_to_resolve_non_relative_module_names: diag(6607, ts.DiagnosticCategory.Message, "Specify_the_base_directory_to_resolve_non_relative_module_names_6607", "Specify the base directory to resolve non-relative module names."),
+        No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files: diag(6608, ts.DiagnosticCategory.Message, "No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files_6608", "No longer supported. In early versions, manually set the text encoding for reading files."),
+        Enable_error_reporting_in_type_checked_JavaScript_files: diag(6609, ts.DiagnosticCategory.Message, "Enable_error_reporting_in_type_checked_JavaScript_files_6609", "Enable error reporting in type-checked JavaScript files."),
+        Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references: diag(6611, ts.DiagnosticCategory.Message, "Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references_6611", "Enable constraints that allow a TypeScript project to be used with project references."),
+        Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project: diag(6612, ts.DiagnosticCategory.Message, "Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project_6612", "Generate .d.ts files from TypeScript and JavaScript files in your project."),
+        Specify_the_output_directory_for_generated_declaration_files: diag(6613, ts.DiagnosticCategory.Message, "Specify_the_output_directory_for_generated_declaration_files_6613", "Specify the output directory for generated declaration files."),
+        Create_sourcemaps_for_d_ts_files: diag(6614, ts.DiagnosticCategory.Message, "Create_sourcemaps_for_d_ts_files_6614", "Create sourcemaps for d.ts files."),
+        Output_compiler_performance_information_after_building: diag(6615, ts.DiagnosticCategory.Message, "Output_compiler_performance_information_after_building_6615", "Output compiler performance information after building."),
+        Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project: diag(6616, ts.DiagnosticCategory.Message, "Disables_inference_for_type_acquisition_by_looking_at_filenames_in_a_project_6616", "Disables inference for type acquisition by looking at filenames in a project."),
+        Reduce_the_number_of_projects_loaded_automatically_by_TypeScript: diag(6617, ts.DiagnosticCategory.Message, "Reduce_the_number_of_projects_loaded_automatically_by_TypeScript_6617", "Reduce the number of projects loaded automatically by TypeScript."),
+        Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server: diag(6618, ts.DiagnosticCategory.Message, "Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server_6618", "Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server."),
+        Opt_a_project_out_of_multi_project_reference_checking_when_editing: diag(6619, ts.DiagnosticCategory.Message, "Opt_a_project_out_of_multi_project_reference_checking_when_editing_6619", "Opt a project out of multi-project reference checking when editing."),
+        Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects: diag(6620, ts.DiagnosticCategory.Message, "Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects_6620", "Disable preferring source files instead of declaration files when referencing composite projects"),
+        Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration: diag(6621, ts.DiagnosticCategory.Message, "Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration_6621", "Emit more compliant, but verbose and less performant JavaScript for iteration."),
+        Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files: diag(6622, ts.DiagnosticCategory.Message, "Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files_6622", "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files."),
+        Only_output_d_ts_files_and_not_JavaScript_files: diag(6623, ts.DiagnosticCategory.Message, "Only_output_d_ts_files_and_not_JavaScript_files_6623", "Only output d.ts files and not JavaScript files."),
+        Emit_design_type_metadata_for_decorated_declarations_in_source_files: diag(6624, ts.DiagnosticCategory.Message, "Emit_design_type_metadata_for_decorated_declarations_in_source_files_6624", "Emit design-type metadata for decorated declarations in source files."),
+        Disable_the_type_acquisition_for_JavaScript_projects: diag(6625, ts.DiagnosticCategory.Message, "Disable_the_type_acquisition_for_JavaScript_projects_6625", "Disable the type acquisition for JavaScript projects"),
+        Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility: diag(6626, ts.DiagnosticCategory.Message, "Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheti_6626", "Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility."),
+        Filters_results_from_the_include_option: diag(6627, ts.DiagnosticCategory.Message, "Filters_results_from_the_include_option_6627", "Filters results from the `include` option."),
+        Remove_a_list_of_directories_from_the_watch_process: diag(6628, ts.DiagnosticCategory.Message, "Remove_a_list_of_directories_from_the_watch_process_6628", "Remove a list of directories from the watch process."),
+        Remove_a_list_of_files_from_the_watch_mode_s_processing: diag(6629, ts.DiagnosticCategory.Message, "Remove_a_list_of_files_from_the_watch_mode_s_processing_6629", "Remove a list of files from the watch mode's processing."),
+        Enable_experimental_support_for_TC39_stage_2_draft_decorators: diag(6630, ts.DiagnosticCategory.Message, "Enable_experimental_support_for_TC39_stage_2_draft_decorators_6630", "Enable experimental support for TC39 stage 2 draft decorators."),
+        Print_files_read_during_the_compilation_including_why_it_was_included: diag(6631, ts.DiagnosticCategory.Message, "Print_files_read_during_the_compilation_including_why_it_was_included_6631", "Print files read during the compilation including why it was included."),
+        Output_more_detailed_compiler_performance_information_after_building: diag(6632, ts.DiagnosticCategory.Message, "Output_more_detailed_compiler_performance_information_after_building_6632", "Output more detailed compiler performance information after building."),
+        Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_are_inherited: diag(6633, ts.DiagnosticCategory.Message, "Specify_one_or_more_path_or_node_module_references_to_base_configuration_files_from_which_settings_a_6633", "Specify one or more path or node module references to base configuration files from which settings are inherited."),
+        Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers: diag(6634, ts.DiagnosticCategory.Message, "Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers_6634", "Specify what approach the watcher should use if the system runs out of native file watchers."),
+        Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include: diag(6635, ts.DiagnosticCategory.Message, "Include_a_list_of_files_This_does_not_support_glob_patterns_as_opposed_to_include_6635", "Include a list of files. This does not support glob patterns, as opposed to `include`."),
+        Build_all_projects_including_those_that_appear_to_be_up_to_date: diag(6636, ts.DiagnosticCategory.Message, "Build_all_projects_including_those_that_appear_to_be_up_to_date_6636", "Build all projects, including those that appear to be up to date"),
+        Ensure_that_casing_is_correct_in_imports: diag(6637, ts.DiagnosticCategory.Message, "Ensure_that_casing_is_correct_in_imports_6637", "Ensure that casing is correct in imports."),
+        Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging: diag(6638, ts.DiagnosticCategory.Message, "Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging_6638", "Emit a v8 CPU profile of the compiler run for debugging."),
+        Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file: diag(6639, ts.DiagnosticCategory.Message, "Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file_6639", "Allow importing helper functions from tslib once per project, instead of including them per-file."),
+        Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation: diag(6641, ts.DiagnosticCategory.Message, "Specify_a_list_of_glob_patterns_that_match_files_to_be_included_in_compilation_6641", "Specify a list of glob patterns that match files to be included in compilation."),
+        Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects: diag(6642, ts.DiagnosticCategory.Message, "Save_tsbuildinfo_files_to_allow_for_incremental_compilation_of_projects_6642", "Save .tsbuildinfo files to allow for incremental compilation of projects."),
+        Include_sourcemap_files_inside_the_emitted_JavaScript: diag(6643, ts.DiagnosticCategory.Message, "Include_sourcemap_files_inside_the_emitted_JavaScript_6643", "Include sourcemap files inside the emitted JavaScript."),
+        Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript: diag(6644, ts.DiagnosticCategory.Message, "Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript_6644", "Include source code in the sourcemaps inside the emitted JavaScript."),
+        Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports: diag(6645, ts.DiagnosticCategory.Message, "Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports_6645", "Ensure that each file can be safely transpiled without relying on other imports."),
+        Specify_what_JSX_code_is_generated: diag(6646, ts.DiagnosticCategory.Message, "Specify_what_JSX_code_is_generated_6646", "Specify what JSX code is generated."),
+        Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h: diag(6647, ts.DiagnosticCategory.Message, "Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h_6647", "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'"),
+        Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment: diag(6648, ts.DiagnosticCategory.Message, "Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragme_6648", "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'."),
+        Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk: diag(6649, ts.DiagnosticCategory.Message, "Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Ast_6649", "Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.`"),
+        Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option: diag(6650, ts.DiagnosticCategory.Message, "Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option_6650", "Make keyof only return strings instead of string, numbers or symbols. Legacy option."),
+        Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment: diag(6651, ts.DiagnosticCategory.Message, "Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment_6651", "Specify a set of bundled library declaration files that describe the target runtime environment."),
+        Print_the_names_of_emitted_files_after_a_compilation: diag(6652, ts.DiagnosticCategory.Message, "Print_the_names_of_emitted_files_after_a_compilation_6652", "Print the names of emitted files after a compilation."),
+        Print_all_of_the_files_read_during_the_compilation: diag(6653, ts.DiagnosticCategory.Message, "Print_all_of_the_files_read_during_the_compilation_6653", "Print all of the files read during the compilation."),
+        Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit: diag(6654, ts.DiagnosticCategory.Message, "Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit_6654", "Set the language of the messaging from TypeScript. This does not affect emit."),
+        Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations: diag(6655, ts.DiagnosticCategory.Message, "Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6655", "Specify the location where debugger should locate map files instead of generated locations."),
+        Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs: diag(6656, ts.DiagnosticCategory.Message, "Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicabl_6656", "Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`."),
+        Specify_what_module_code_is_generated: diag(6657, ts.DiagnosticCategory.Message, "Specify_what_module_code_is_generated_6657", "Specify what module code is generated."),
+        Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier: diag(6658, ts.DiagnosticCategory.Message, "Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier_6658", "Specify how TypeScript looks up a file from a given module specifier."),
+        Set_the_newline_character_for_emitting_files: diag(6659, ts.DiagnosticCategory.Message, "Set_the_newline_character_for_emitting_files_6659", "Set the newline character for emitting files."),
+        Disable_emitting_files_from_a_compilation: diag(6660, ts.DiagnosticCategory.Message, "Disable_emitting_files_from_a_compilation_6660", "Disable emitting files from a compilation."),
+        Disable_generating_custom_helper_functions_like_extends_in_compiled_output: diag(6661, ts.DiagnosticCategory.Message, "Disable_generating_custom_helper_functions_like_extends_in_compiled_output_6661", "Disable generating custom helper functions like `__extends` in compiled output."),
+        Disable_emitting_files_if_any_type_checking_errors_are_reported: diag(6662, ts.DiagnosticCategory.Message, "Disable_emitting_files_if_any_type_checking_errors_are_reported_6662", "Disable emitting files if any type checking errors are reported."),
+        Disable_truncating_types_in_error_messages: diag(6663, ts.DiagnosticCategory.Message, "Disable_truncating_types_in_error_messages_6663", "Disable truncating types in error messages."),
+        Enable_error_reporting_for_fallthrough_cases_in_switch_statements: diag(6664, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_fallthrough_cases_in_switch_statements_6664", "Enable error reporting for fallthrough cases in switch statements."),
+        Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type: diag(6665, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type_6665", "Enable error reporting for expressions and declarations with an implied `any` type.."),
+        Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier: diag(6666, ts.DiagnosticCategory.Message, "Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier_6666", "Ensure overriding members in derived classes are marked with an override modifier."),
+        Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function: diag(6667, ts.DiagnosticCategory.Message, "Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function_6667", "Enable error reporting for codepaths that do not explicitly return in a function."),
+        Enable_error_reporting_when_this_is_given_the_type_any: diag(6668, ts.DiagnosticCategory.Message, "Enable_error_reporting_when_this_is_given_the_type_any_6668", "Enable error reporting when `this` is given the type `any`."),
+        Disable_adding_use_strict_directives_in_emitted_JavaScript_files: diag(6669, ts.DiagnosticCategory.Message, "Disable_adding_use_strict_directives_in_emitted_JavaScript_files_6669", "Disable adding 'use strict' directives in emitted JavaScript files."),
+        Disable_including_any_library_files_including_the_default_lib_d_ts: diag(6670, ts.DiagnosticCategory.Message, "Disable_including_any_library_files_including_the_default_lib_d_ts_6670", "Disable including any library files, including the default lib.d.ts."),
+        Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type: diag(6671, ts.DiagnosticCategory.Message, "Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type_6671", "Enforces using indexed accessors for keys declared using an indexed type"),
+        Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project: diag(6672, ts.DiagnosticCategory.Message, "Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add__6672", "Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project."),
+        Disable_strict_checking_of_generic_signatures_in_function_types: diag(6673, ts.DiagnosticCategory.Message, "Disable_strict_checking_of_generic_signatures_in_function_types_6673", "Disable strict checking of generic signatures in function types."),
+        Add_undefined_to_a_type_when_accessed_using_an_index: diag(6674, ts.DiagnosticCategory.Message, "Add_undefined_to_a_type_when_accessed_using_an_index_6674", "Add `undefined` to a type when accessed using an index."),
+        Enable_error_reporting_when_a_local_variables_aren_t_read: diag(6675, ts.DiagnosticCategory.Message, "Enable_error_reporting_when_a_local_variables_aren_t_read_6675", "Enable error reporting when a local variables aren't read."),
+        Raise_an_error_when_a_function_parameter_isn_t_read: diag(6676, ts.DiagnosticCategory.Message, "Raise_an_error_when_a_function_parameter_isn_t_read_6676", "Raise an error when a function parameter isn't read"),
+        Deprecated_setting_Use_outFile_instead: diag(6677, ts.DiagnosticCategory.Message, "Deprecated_setting_Use_outFile_instead_6677", "Deprecated setting. Use `outFile` instead."),
+        Specify_an_output_folder_for_all_emitted_files: diag(6678, ts.DiagnosticCategory.Message, "Specify_an_output_folder_for_all_emitted_files_6678", "Specify an output folder for all emitted files."),
+        Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output: diag(6679, ts.DiagnosticCategory.Message, "Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designa_6679", "Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output."),
+        Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations: diag(6680, ts.DiagnosticCategory.Message, "Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations_6680", "Specify a set of entries that re-map imports to additional lookup locations."),
+        Specify_a_list_of_language_service_plugins_to_include: diag(6681, ts.DiagnosticCategory.Message, "Specify_a_list_of_language_service_plugins_to_include_6681", "Specify a list of language service plugins to include."),
+        Disable_erasing_const_enum_declarations_in_generated_code: diag(6682, ts.DiagnosticCategory.Message, "Disable_erasing_const_enum_declarations_in_generated_code_6682", "Disable erasing `const enum` declarations in generated code."),
+        Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node: diag(6683, ts.DiagnosticCategory.Message, "Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node_6683", "Disable resolving symlinks to their realpath. This correlates to the same flag in node."),
+        Disable_wiping_the_console_in_watch_mode: diag(6684, ts.DiagnosticCategory.Message, "Disable_wiping_the_console_in_watch_mode_6684", "Disable wiping the console in watch mode"),
+        Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read: diag(6685, ts.DiagnosticCategory.Message, "Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read_6685", "Enable color and formatting in TypeScript's output to make compiler errors easier to read"),
+        Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit: diag(6686, ts.DiagnosticCategory.Message, "Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit_6686", "Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit."),
+        Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references: diag(6687, ts.DiagnosticCategory.Message, "Specify_an_array_of_objects_that_specify_paths_for_projects_Used_in_project_references_6687", "Specify an array of objects that specify paths for projects. Used in project references."),
+        Disable_emitting_comments: diag(6688, ts.DiagnosticCategory.Message, "Disable_emitting_comments_6688", "Disable emitting comments."),
+        Enable_importing_json_files: diag(6689, ts.DiagnosticCategory.Message, "Enable_importing_json_files_6689", "Enable importing .json files"),
+        Specify_the_root_folder_within_your_source_files: diag(6690, ts.DiagnosticCategory.Message, "Specify_the_root_folder_within_your_source_files_6690", "Specify the root folder within your source files."),
+        Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules: diag(6691, ts.DiagnosticCategory.Message, "Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules_6691", "Allow multiple folders to be treated as one when resolving modules."),
+        Skip_type_checking_d_ts_files_that_are_included_with_TypeScript: diag(6692, ts.DiagnosticCategory.Message, "Skip_type_checking_d_ts_files_that_are_included_with_TypeScript_6692", "Skip type checking .d.ts files that are included with TypeScript."),
+        Skip_type_checking_all_d_ts_files: diag(6693, ts.DiagnosticCategory.Message, "Skip_type_checking_all_d_ts_files_6693", "Skip type checking all .d.ts files."),
+        Create_source_map_files_for_emitted_JavaScript_files: diag(6694, ts.DiagnosticCategory.Message, "Create_source_map_files_for_emitted_JavaScript_files_6694", "Create source map files for emitted JavaScript files."),
+        Specify_the_root_path_for_debuggers_to_find_the_reference_source_code: diag(6695, ts.DiagnosticCategory.Message, "Specify_the_root_path_for_debuggers_to_find_the_reference_source_code_6695", "Specify the root path for debuggers to find the reference source code."),
+        Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function: diag(6697, ts.DiagnosticCategory.Message, "Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function_6697", "Check that the arguments for `bind`, `call`, and `apply` methods match the original function."),
+        When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible: diag(6698, ts.DiagnosticCategory.Message, "When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible_6698", "When assigning functions, check to ensure parameters and the return values are subtype-compatible."),
+        When_type_checking_take_into_account_null_and_undefined: diag(6699, ts.DiagnosticCategory.Message, "When_type_checking_take_into_account_null_and_undefined_6699", "When type checking, take into account `null` and `undefined`."),
+        Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor: diag(6700, ts.DiagnosticCategory.Message, "Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor_6700", "Check for class properties that are declared but not set in the constructor."),
+        Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments: diag(6701, ts.DiagnosticCategory.Message, "Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments_6701", "Disable emitting declarations that have `@internal` in their JSDoc comments."),
+        Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals: diag(6702, ts.DiagnosticCategory.Message, "Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals_6702", "Disable reporting of excess property errors during the creation of object literals."),
+        Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures: diag(6703, ts.DiagnosticCategory.Message, "Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures_6703", "Suppress `noImplicitAny` errors when indexing objects that lack index signatures."),
+        Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively: diag(6704, ts.DiagnosticCategory.Message, "Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_supp_6704", "Synchronously call callbacks and update the state of directory watchers on platforms that don`t support recursive watching natively."),
+        Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations: diag(6705, ts.DiagnosticCategory.Message, "Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declaratio_6705", "Set the JavaScript language version for emitted JavaScript and include compatible library declarations."),
+        Log_paths_used_during_the_moduleResolution_process: diag(6706, ts.DiagnosticCategory.Message, "Log_paths_used_during_the_moduleResolution_process_6706", "Log paths used during the `moduleResolution` process."),
+        Specify_the_folder_for_tsbuildinfo_incremental_compilation_files: diag(6707, ts.DiagnosticCategory.Message, "Specify_the_folder_for_tsbuildinfo_incremental_compilation_files_6707", "Specify the folder for .tsbuildinfo incremental compilation files."),
+        Specify_options_for_automatic_acquisition_of_declaration_files: diag(6709, ts.DiagnosticCategory.Message, "Specify_options_for_automatic_acquisition_of_declaration_files_6709", "Specify options for automatic acquisition of declaration files."),
+        Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types: diag(6710, ts.DiagnosticCategory.Message, "Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types_6710", "Specify multiple folders that act like `./node_modules/@types`."),
+        Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file: diag(6711, ts.DiagnosticCategory.Message, "Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file_6711", "Specify type package names to be included without being referenced in a source file."),
+        Emit_ECMAScript_standard_compliant_class_fields: diag(6712, ts.DiagnosticCategory.Message, "Emit_ECMAScript_standard_compliant_class_fields_6712", "Emit ECMAScript-standard-compliant class fields."),
+        Enable_verbose_logging: diag(6713, ts.DiagnosticCategory.Message, "Enable_verbose_logging_6713", "Enable verbose logging"),
+        Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality: diag(6714, ts.DiagnosticCategory.Message, "Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality_6714", "Specify how directories are watched on systems that lack recursive file-watching functionality."),
+        Specify_how_the_TypeScript_watch_mode_works: diag(6715, ts.DiagnosticCategory.Message, "Specify_how_the_TypeScript_watch_mode_works_6715", "Specify how the TypeScript watch mode works."),
+        Include_undefined_in_index_signature_results: diag(6716, ts.DiagnosticCategory.Message, "Include_undefined_in_index_signature_results_6716", "Include 'undefined' in index signature results"),
+        Require_undeclared_properties_from_index_signatures_to_use_element_accesses: diag(6717, ts.DiagnosticCategory.Message, "Require_undeclared_properties_from_index_signatures_to_use_element_accesses_6717", "Require undeclared properties from index signatures to use element accesses."),
+        Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, ts.DiagnosticCategory.Message, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types"),
+        Type_catch_clause_variables_as_unknown_instead_of_any: diag(6803, ts.DiagnosticCategory.Message, "Type_catch_clause_variables_as_unknown_instead_of_any_6803", "Type catch clause variables as 'unknown' instead of 'any'."),
+        one_of_Colon: diag(6900, ts.DiagnosticCategory.Message, "one_of_Colon_6900", "one of:"),
+        one_or_more_Colon: diag(6901, ts.DiagnosticCategory.Message, "one_or_more_Colon_6901", "one or more:"),
+        type_Colon: diag(6902, ts.DiagnosticCategory.Message, "type_Colon_6902", "type:"),
+        default_Colon: diag(6903, ts.DiagnosticCategory.Message, "default_Colon_6903", "default:"),
+        module_system_or_esModuleInterop: diag(6904, ts.DiagnosticCategory.Message, "module_system_or_esModuleInterop_6904", "module === \"system\" or esModuleInterop"),
+        false_unless_strict_is_set: diag(6905, ts.DiagnosticCategory.Message, "false_unless_strict_is_set_6905", "`false`, unless `strict` is set"),
+        false_unless_composite_is_set: diag(6906, ts.DiagnosticCategory.Message, "false_unless_composite_is_set_6906", "`false`, unless `composite` is set"),
+        node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified: diag(6907, ts.DiagnosticCategory.Message, "node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified_6907", "`[\"node_modules\", \"bower_components\", \"jspm_packages\"]`, plus the value of `outDir` if one is specified."),
+        if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk: diag(6908, ts.DiagnosticCategory.Message, "if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk_6908", "`[]` if `files` is specified, otherwise `[\"**/*\"]`"),
+        true_if_composite_false_otherwise: diag(6909, ts.DiagnosticCategory.Message, "true_if_composite_false_otherwise_6909", "`true` if `composite`, `false` otherwise"),
+        module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node: diag(69010, ts.DiagnosticCategory.Message, "module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node_69010", "module === `AMD` or `UMD` or `System` or `ES6`, then `Classic`, Otherwise `Node`"),
+        Computed_from_the_list_of_input_files: diag(6911, ts.DiagnosticCategory.Message, "Computed_from_the_list_of_input_files_6911", "Computed from the list of input files"),
+        Platform_specific: diag(6912, ts.DiagnosticCategory.Message, "Platform_specific_6912", "Platform specific"),
+        You_can_learn_about_all_of_the_compiler_options_at_0: diag(6913, ts.DiagnosticCategory.Message, "You_can_learn_about_all_of_the_compiler_options_at_0_6913", "You can learn about all of the compiler options at {0}"),
+        Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_config_watch_mode_with_Colon: diag(6914, ts.DiagnosticCategory.Message, "Including_watch_w_will_start_watching_the_current_project_for_the_file_changes_Once_set_you_can_conf_6914", "Including --watch, -w will start watching the current project for the file changes. Once set, you can config watch mode with:"),
+        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: diag(6915, ts.DiagnosticCategory.Message, "Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_tr_6915", "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}"),
+        COMMON_COMMANDS: diag(6916, ts.DiagnosticCategory.Message, "COMMON_COMMANDS_6916", "COMMON COMMANDS"),
+        ALL_COMPILER_OPTIONS: diag(6917, ts.DiagnosticCategory.Message, "ALL_COMPILER_OPTIONS_6917", "ALL COMPILER OPTIONS"),
+        WATCH_OPTIONS: diag(6918, ts.DiagnosticCategory.Message, "WATCH_OPTIONS_6918", "WATCH OPTIONS"),
+        BUILD_OPTIONS: diag(6919, ts.DiagnosticCategory.Message, "BUILD_OPTIONS_6919", "BUILD OPTIONS"),
+        COMMON_COMPILER_OPTIONS: diag(6920, ts.DiagnosticCategory.Message, "COMMON_COMPILER_OPTIONS_6920", "COMMON COMPILER OPTIONS"),
+        COMMAND_LINE_FLAGS: diag(6921, ts.DiagnosticCategory.Message, "COMMAND_LINE_FLAGS_6921", "COMMAND LINE FLAGS"),
+        tsc_Colon_The_TypeScript_Compiler: diag(6922, ts.DiagnosticCategory.Message, "tsc_Colon_The_TypeScript_Compiler_6922", "tsc: The TypeScript Compiler"),
+        Compiles_the_current_project_tsconfig_json_in_the_working_directory: diag(6923, ts.DiagnosticCategory.Message, "Compiles_the_current_project_tsconfig_json_in_the_working_directory_6923", "Compiles the current project (tsconfig.json in the working directory.)"),
+        Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options: diag(6924, ts.DiagnosticCategory.Message, "Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options_6924", "Ignoring tsconfig.json, compiles the specified files with default compiler options."),
+        Build_a_composite_project_in_the_working_directory: diag(6925, ts.DiagnosticCategory.Message, "Build_a_composite_project_in_the_working_directory_6925", "Build a composite project in the working directory."),
+        Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory: diag(6926, ts.DiagnosticCategory.Message, "Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory_6926", "Creates a tsconfig.json with the recommended settings in the working directory."),
+        Compiles_the_TypeScript_project_located_at_the_specified_path: diag(6927, ts.DiagnosticCategory.Message, "Compiles_the_TypeScript_project_located_at_the_specified_path_6927", "Compiles the TypeScript project located at the specified path."),
+        An_expanded_version_of_this_information_showing_all_possible_compiler_options: diag(6928, ts.DiagnosticCategory.Message, "An_expanded_version_of_this_information_showing_all_possible_compiler_options_6928", "An expanded version of this information, showing all possible compiler options"),
+        Compiles_the_current_project_with_additional_settings: diag(6929, ts.DiagnosticCategory.Message, "Compiles_the_current_project_with_additional_settings_6929", "Compiles the current project, with additional settings."),
+        true_for_ES2022_and_above_including_ESNext: diag(6930, ts.DiagnosticCategory.Message, "true_for_ES2022_and_above_including_ESNext_6930", "`true` for ES2022 and above, including ESNext."),
         Variable_0_implicitly_has_an_1_type: diag(7005, ts.DiagnosticCategory.Error, "Variable_0_implicitly_has_an_1_type_7005", "Variable '{0}' implicitly has an '{1}' type."),
         Parameter_0_implicitly_has_an_1_type: diag(7006, ts.DiagnosticCategory.Error, "Parameter_0_implicitly_has_an_1_type_7006", "Parameter '{0}' implicitly has an '{1}' type."),
         Member_0_implicitly_has_an_1_type: diag(7008, ts.DiagnosticCategory.Error, "Member_0_implicitly_has_an_1_type_7008", "Member '{0}' implicitly has an '{1}' type."),
@@ -6166,7 +6550,7 @@ var ts;
         Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports: diag(7037, ts.DiagnosticCategory.Message, "Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for__7037", "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'."),
         Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cause_a_failure_at_runtime_Consider_using_a_default_import_or_import_require_here_instead: diag(7038, ts.DiagnosticCategory.Message, "Type_originates_at_this_import_A_namespace_style_import_cannot_be_called_or_constructed_and_will_cau_7038", "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead."),
         Mapped_object_type_implicitly_has_an_any_template_type: diag(7039, ts.DiagnosticCategory.Error, "Mapped_object_type_implicitly_has_an_any_template_type_7039", "Mapped object type implicitly has an 'any' template type."),
-        If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`"),
+        If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1: diag(7040, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_S_7040", "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}'"),
         The_containing_arrow_function_captures_the_global_value_of_this: diag(7041, ts.DiagnosticCategory.Error, "The_containing_arrow_function_captures_the_global_value_of_this_7041", "The containing arrow function captures the global value of 'this'."),
         Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used: diag(7042, ts.DiagnosticCategory.Error, "Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used_7042", "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used."),
         Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage: diag(7043, ts.DiagnosticCategory.Suggestion, "Variable_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage_7043", "Variable '{0}' implicitly has an '{1}' type, but a better type may be inferred from usage."),
@@ -6184,6 +6568,11 @@ var ts;
         _0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type: diag(7055, ts.DiagnosticCategory.Error, "_0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type_7055", "'{0}', which lacks return-type annotation, implicitly has an '{1}' yield type."),
         The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed: diag(7056, ts.DiagnosticCategory.Error, "The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_ty_7056", "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed."),
         yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_type_annotation: diag(7057, ts.DiagnosticCategory.Error, "yield_expression_implicitly_results_in_an_any_type_because_its_containing_generator_lacks_a_return_t_7057", "'yield' expression implicitly results in an 'any' type because its containing generator lacks a return-type annotation."),
+        If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1: diag(7058, ts.DiagnosticCategory.Error, "If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_decl_7058", "If the '{0}' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '{1}';`"),
+        This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead: diag(7059, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead_7059", "This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead."),
+        This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint: diag(7060, ts.DiagnosticCategory.Error, "This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_cons_7060", "This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint."),
+        A_mapped_type_may_not_declare_properties_or_methods: diag(7061, ts.DiagnosticCategory.Error, "A_mapped_type_may_not_declare_properties_or_methods_7061", "A mapped type may not declare properties or methods."),
+        JSON_imports_are_experimental_in_ES_module_mode_imports: diag(7062, ts.DiagnosticCategory.Error, "JSON_imports_are_experimental_in_ES_module_mode_imports_7062", "JSON imports are experimental in ES module mode imports."),
         You_cannot_rename_this_element: diag(8000, ts.DiagnosticCategory.Error, "You_cannot_rename_this_element_8000", "You cannot rename this element."),
         You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library: diag(8001, ts.DiagnosticCategory.Error, "You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001", "You cannot rename elements that are defined in the standard TypeScript library."),
         import_can_only_be_used_in_TypeScript_files: diag(8002, ts.DiagnosticCategory.Error, "import_can_only_be_used_in_TypeScript_files_8002", "'import ... =' can only be used in TypeScript files."),
@@ -6206,7 +6595,7 @@ var ts;
         JSDoc_0_is_not_attached_to_a_class: diag(8022, ts.DiagnosticCategory.Error, "JSDoc_0_is_not_attached_to_a_class_8022", "JSDoc '@{0}' is not attached to a class."),
         JSDoc_0_1_does_not_match_the_extends_2_clause: diag(8023, ts.DiagnosticCategory.Error, "JSDoc_0_1_does_not_match_the_extends_2_clause_8023", "JSDoc '@{0} {1}' does not match the 'extends {2}' clause."),
         JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name: diag(8024, ts.DiagnosticCategory.Error, "JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_8024", "JSDoc '@param' tag has name '{0}', but there is no parameter with that name."),
-        Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, ts.DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one `@augments` or `@extends` tag."),
+        Class_declarations_cannot_have_more_than_one_augments_or_extends_tag: diag(8025, ts.DiagnosticCategory.Error, "Class_declarations_cannot_have_more_than_one_augments_or_extends_tag_8025", "Class declarations cannot have more than one '@augments' or '@extends' tag."),
         Expected_0_type_arguments_provide_these_with_an_extends_tag: diag(8026, ts.DiagnosticCategory.Error, "Expected_0_type_arguments_provide_these_with_an_extends_tag_8026", "Expected {0} type arguments; provide these with an '@extends' tag."),
         Expected_0_1_type_arguments_provide_these_with_an_extends_tag: diag(8027, ts.DiagnosticCategory.Error, "Expected_0_1_type_arguments_provide_these_with_an_extends_tag_8027", "Expected {0}-{1} type arguments; provide these with an '@extends' tag."),
         JSDoc_may_only_appear_in_the_last_parameter_of_a_signature: diag(8028, ts.DiagnosticCategory.Error, "JSDoc_may_only_appear_in_the_last_parameter_of_a_signature_8028", "JSDoc '...' may only appear in the last parameter of a signature."),
@@ -6216,15 +6605,11 @@ var ts;
         Qualified_name_0_is_not_allowed_without_a_leading_param_object_1: diag(8032, ts.DiagnosticCategory.Error, "Qualified_name_0_is_not_allowed_without_a_leading_param_object_1_8032", "Qualified name '{0}' is not allowed without a leading '@param {object} {1}'."),
         A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags: diag(8033, ts.DiagnosticCategory.Error, "A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags_8033", "A JSDoc '@typedef' comment may not contain multiple '@type' tags."),
         The_tag_was_first_specified_here: diag(8034, ts.DiagnosticCategory.Error, "The_tag_was_first_specified_here_8034", "The tag was first specified here."),
-        Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clause: diag(9002, ts.DiagnosticCategory.Error, "Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002", "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause."),
-        class_expressions_are_not_currently_supported: diag(9003, ts.DiagnosticCategory.Error, "class_expressions_are_not_currently_supported_9003", "'class' expressions are not currently supported."),
-        Language_service_is_disabled: diag(9004, ts.DiagnosticCategory.Error, "Language_service_is_disabled_9004", "Language service is disabled."),
         Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, ts.DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),
         Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, ts.DiagnosticCategory.Error, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),
         JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17000, ts.DiagnosticCategory.Error, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."),
         JSX_elements_cannot_have_multiple_attributes_with_the_same_name: diag(17001, ts.DiagnosticCategory.Error, "JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001", "JSX elements cannot have multiple attributes with the same name."),
         Expected_corresponding_JSX_closing_tag_for_0: diag(17002, ts.DiagnosticCategory.Error, "Expected_corresponding_JSX_closing_tag_for_0_17002", "Expected corresponding JSX closing tag for '{0}'."),
-        JSX_attribute_expected: diag(17003, ts.DiagnosticCategory.Error, "JSX_attribute_expected_17003", "JSX attribute expected."),
         Cannot_use_JSX_unless_the_jsx_flag_is_provided: diag(17004, ts.DiagnosticCategory.Error, "Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004", "Cannot use JSX unless the '--jsx' flag is provided."),
         A_constructor_cannot_contain_a_super_call_when_its_class_extends_null: diag(17005, ts.DiagnosticCategory.Error, "A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005", "A constructor cannot contain a 'super' call when its class extends 'null'."),
         An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses: diag(17006, ts.DiagnosticCategory.Error, "An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006", "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses."),
@@ -6241,10 +6626,9 @@ var ts;
         An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments: diag(17017, ts.DiagnosticCategory.Error, "An_jsxFrag_pragma_is_required_when_using_an_jsx_pragma_with_JSX_fragments_17017", "An @jsxFrag pragma is required when using an @jsx pragma with JSX fragments."),
         Unknown_type_acquisition_option_0_Did_you_mean_1: diag(17018, ts.DiagnosticCategory.Error, "Unknown_type_acquisition_option_0_Did_you_mean_1_17018", "Unknown type acquisition option '{0}'. Did you mean '{1}'?"),
         Circularity_detected_while_resolving_configuration_Colon_0: diag(18000, ts.DiagnosticCategory.Error, "Circularity_detected_while_resolving_configuration_Colon_0_18000", "Circularity detected while resolving configuration: {0}"),
-        A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not: diag(18001, ts.DiagnosticCategory.Error, "A_path_in_an_extends_option_must_be_relative_or_rooted_but_0_is_not_18001", "A path in an 'extends' option must be relative or rooted, but '{0}' is not."),
         The_files_list_in_config_file_0_is_empty: diag(18002, ts.DiagnosticCategory.Error, "The_files_list_in_config_file_0_is_empty_18002", "The 'files' list in config file '{0}' is empty."),
         No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2: diag(18003, ts.DiagnosticCategory.Error, "No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2_18003", "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'."),
-        File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module: diag(80001, ts.DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES6_module_80001", "File is a CommonJS module; it may be converted to an ES6 module."),
+        File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module: diag(80001, ts.DiagnosticCategory.Suggestion, "File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module_80001", "File is a CommonJS module; it may be converted to an ES module."),
         This_constructor_function_may_be_converted_to_a_class_declaration: diag(80002, ts.DiagnosticCategory.Suggestion, "This_constructor_function_may_be_converted_to_a_class_declaration_80002", "This constructor function may be converted to a class declaration."),
         Import_may_be_converted_to_a_default_import: diag(80003, ts.DiagnosticCategory.Suggestion, "Import_may_be_converted_to_a_default_import_80003", "Import may be converted to a default import."),
         JSDoc_types_may_be_moved_to_TypeScript_types: diag(80004, ts.DiagnosticCategory.Suggestion, "JSDoc_types_may_be_moved_to_TypeScript_types_80004", "JSDoc types may be moved to TypeScript types."),
@@ -6292,8 +6676,8 @@ var ts;
         Remove_unused_destructuring_declaration: diag(90039, ts.DiagnosticCategory.Message, "Remove_unused_destructuring_declaration_90039", "Remove unused destructuring declaration"),
         Remove_unused_declarations_for_Colon_0: diag(90041, ts.DiagnosticCategory.Message, "Remove_unused_declarations_for_Colon_0_90041", "Remove unused declarations for: '{0}'"),
         Declare_a_private_field_named_0: diag(90053, ts.DiagnosticCategory.Message, "Declare_a_private_field_named_0_90053", "Declare a private field named '{0}'."),
+        Includes_imports_of_types_referenced_by_0: diag(90054, ts.DiagnosticCategory.Message, "Includes_imports_of_types_referenced_by_0_90054", "Includes imports of types referenced by '{0}'"),
         Convert_function_to_an_ES2015_class: diag(95001, ts.DiagnosticCategory.Message, "Convert_function_to_an_ES2015_class_95001", "Convert function to an ES2015 class"),
-        Convert_function_0_to_class: diag(95002, ts.DiagnosticCategory.Message, "Convert_function_0_to_class_95002", "Convert function '{0}' to class"),
         Convert_0_to_1_in_0: diag(95003, ts.DiagnosticCategory.Message, "Convert_0_to_1_in_0_95003", "Convert '{0}' to '{1} in {0}'"),
         Extract_to_0_in_1: diag(95004, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_95004", "Extract to {0} in {1}"),
         Extract_function: diag(95005, ts.DiagnosticCategory.Message, "Extract_function_95005", "Extract function"),
@@ -6301,14 +6685,13 @@ var ts;
         Extract_to_0_in_enclosing_scope: diag(95007, ts.DiagnosticCategory.Message, "Extract_to_0_in_enclosing_scope_95007", "Extract to {0} in enclosing scope"),
         Extract_to_0_in_1_scope: diag(95008, ts.DiagnosticCategory.Message, "Extract_to_0_in_1_scope_95008", "Extract to {0} in {1} scope"),
         Annotate_with_type_from_JSDoc: diag(95009, ts.DiagnosticCategory.Message, "Annotate_with_type_from_JSDoc_95009", "Annotate with type from JSDoc"),
-        Annotate_with_types_from_JSDoc: diag(95010, ts.DiagnosticCategory.Message, "Annotate_with_types_from_JSDoc_95010", "Annotate with types from JSDoc"),
         Infer_type_of_0_from_usage: diag(95011, ts.DiagnosticCategory.Message, "Infer_type_of_0_from_usage_95011", "Infer type of '{0}' from usage"),
         Infer_parameter_types_from_usage: diag(95012, ts.DiagnosticCategory.Message, "Infer_parameter_types_from_usage_95012", "Infer parameter types from usage"),
         Convert_to_default_import: diag(95013, ts.DiagnosticCategory.Message, "Convert_to_default_import_95013", "Convert to default import"),
         Install_0: diag(95014, ts.DiagnosticCategory.Message, "Install_0_95014", "Install '{0}'"),
         Replace_import_with_0: diag(95015, ts.DiagnosticCategory.Message, "Replace_import_with_0_95015", "Replace import with '{0}'."),
         Use_synthetic_default_member: diag(95016, ts.DiagnosticCategory.Message, "Use_synthetic_default_member_95016", "Use synthetic 'default' member."),
-        Convert_to_ES6_module: diag(95017, ts.DiagnosticCategory.Message, "Convert_to_ES6_module_95017", "Convert to ES6 module"),
+        Convert_to_ES_module: diag(95017, ts.DiagnosticCategory.Message, "Convert_to_ES_module_95017", "Convert to ES module"),
         Add_undefined_type_to_property_0: diag(95018, ts.DiagnosticCategory.Message, "Add_undefined_type_to_property_0_95018", "Add 'undefined' type to property '{0}'"),
         Add_initializer_to_property_0: diag(95019, ts.DiagnosticCategory.Message, "Add_initializer_to_property_0_95019", "Add initializer to property '{0}'"),
         Add_definite_assignment_assertion_to_property_0: diag(95020, ts.DiagnosticCategory.Message, "Add_definite_assignment_assertion_to_property_0_95020", "Add definite assignment assertion to property '{0}'"),
@@ -6367,7 +6750,6 @@ var ts;
         Add_names_to_all_parameters_without_names: diag(95073, ts.DiagnosticCategory.Message, "Add_names_to_all_parameters_without_names_95073", "Add names to all parameters without names"),
         Enable_the_experimentalDecorators_option_in_your_configuration_file: diag(95074, ts.DiagnosticCategory.Message, "Enable_the_experimentalDecorators_option_in_your_configuration_file_95074", "Enable the 'experimentalDecorators' option in your configuration file"),
         Convert_parameters_to_destructured_object: diag(95075, ts.DiagnosticCategory.Message, "Convert_parameters_to_destructured_object_95075", "Convert parameters to destructured object"),
-        Allow_accessing_UMD_globals_from_modules: diag(95076, ts.DiagnosticCategory.Message, "Allow_accessing_UMD_globals_from_modules_95076", "Allow accessing UMD globals from modules."),
         Extract_type: diag(95077, ts.DiagnosticCategory.Message, "Extract_type_95077", "Extract type"),
         Extract_to_type_alias: diag(95078, ts.DiagnosticCategory.Message, "Extract_to_type_alias_95078", "Extract to type alias"),
         Extract_to_typedef: diag(95079, ts.DiagnosticCategory.Message, "Extract_to_typedef_95079", "Extract to typedef"),
@@ -6393,9 +6775,6 @@ var ts;
         Set_the_module_option_in_your_configuration_file_to_0: diag(95099, ts.DiagnosticCategory.Message, "Set_the_module_option_in_your_configuration_file_to_0_95099", "Set the 'module' option in your configuration file to '{0}'"),
         Convert_invalid_character_to_its_html_entity_code: diag(95100, ts.DiagnosticCategory.Message, "Convert_invalid_character_to_its_html_entity_code_95100", "Convert invalid character to its html entity code"),
         Convert_all_invalid_characters_to_HTML_entity_code: diag(95101, ts.DiagnosticCategory.Message, "Convert_all_invalid_characters_to_HTML_entity_code_95101", "Convert all invalid characters to HTML entity code"),
-        Add_class_tag: diag(95102, ts.DiagnosticCategory.Message, "Add_class_tag_95102", "Add '@class' tag"),
-        Add_this_tag: diag(95103, ts.DiagnosticCategory.Message, "Add_this_tag_95103", "Add '@this' tag"),
-        Add_this_parameter: diag(95104, ts.DiagnosticCategory.Message, "Add_this_parameter_95104", "Add 'this' parameter."),
         Convert_function_expression_0_to_arrow_function: diag(95105, ts.DiagnosticCategory.Message, "Convert_function_expression_0_to_arrow_function_95105", "Convert function expression '{0}' to arrow function"),
         Convert_function_declaration_0_to_arrow_function: diag(95106, ts.DiagnosticCategory.Message, "Convert_function_declaration_0_to_arrow_function_95106", "Convert function declaration '{0}' to arrow function"),
         Fix_all_implicit_this_errors: diag(95107, ts.DiagnosticCategory.Message, "Fix_all_implicit_this_errors_95107", "Fix all implicit-'this' errors"),
@@ -6451,6 +6830,16 @@ var ts;
         Add_all_missing_function_declarations: diag(95157, ts.DiagnosticCategory.Message, "Add_all_missing_function_declarations_95157", "Add all missing function declarations"),
         Method_not_implemented: diag(95158, ts.DiagnosticCategory.Message, "Method_not_implemented_95158", "Method not implemented."),
         Function_not_implemented: diag(95159, ts.DiagnosticCategory.Message, "Function_not_implemented_95159", "Function not implemented."),
+        Add_override_modifier: diag(95160, ts.DiagnosticCategory.Message, "Add_override_modifier_95160", "Add 'override' modifier"),
+        Remove_override_modifier: diag(95161, ts.DiagnosticCategory.Message, "Remove_override_modifier_95161", "Remove 'override' modifier"),
+        Add_all_missing_override_modifiers: diag(95162, ts.DiagnosticCategory.Message, "Add_all_missing_override_modifiers_95162", "Add all missing 'override' modifiers"),
+        Remove_all_unnecessary_override_modifiers: diag(95163, ts.DiagnosticCategory.Message, "Remove_all_unnecessary_override_modifiers_95163", "Remove all unnecessary 'override' modifiers"),
+        Can_only_convert_named_export: diag(95164, ts.DiagnosticCategory.Message, "Can_only_convert_named_export_95164", "Can only convert named export"),
+        Add_missing_properties: diag(95165, ts.DiagnosticCategory.Message, "Add_missing_properties_95165", "Add missing properties"),
+        Add_all_missing_properties: diag(95166, ts.DiagnosticCategory.Message, "Add_all_missing_properties_95166", "Add all missing properties"),
+        Add_missing_attributes: diag(95167, ts.DiagnosticCategory.Message, "Add_missing_attributes_95167", "Add missing attributes"),
+        Add_all_missing_attributes: diag(95168, ts.DiagnosticCategory.Message, "Add_all_missing_attributes_95168", "Add all missing attributes"),
+        Add_undefined_to_optional_property_type: diag(95169, ts.DiagnosticCategory.Message, "Add_undefined_to_optional_property_type_95169", "Add 'undefined' to optional property type"),
         No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
         Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
         JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
@@ -6465,8 +6854,6 @@ var ts;
         The_shadowing_declaration_of_0_is_defined_here: diag(18017, ts.DiagnosticCategory.Error, "The_shadowing_declaration_of_0_is_defined_here_18017", "The shadowing declaration of '{0}' is defined here"),
         The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here: diag(18018, ts.DiagnosticCategory.Error, "The_declaration_of_0_that_you_probably_intended_to_use_is_defined_here_18018", "The declaration of '{0}' that you probably intended to use is defined here"),
         _0_modifier_cannot_be_used_with_a_private_identifier: diag(18019, ts.DiagnosticCategory.Error, "_0_modifier_cannot_be_used_with_a_private_identifier_18019", "'{0}' modifier cannot be used with a private identifier."),
-        A_method_cannot_be_named_with_a_private_identifier: diag(18022, ts.DiagnosticCategory.Error, "A_method_cannot_be_named_with_a_private_identifier_18022", "A method cannot be named with a private identifier."),
-        An_accessor_cannot_be_named_with_a_private_identifier: diag(18023, ts.DiagnosticCategory.Error, "An_accessor_cannot_be_named_with_a_private_identifier_18023", "An accessor cannot be named with a private identifier."),
         An_enum_member_cannot_be_named_with_a_private_identifier: diag(18024, ts.DiagnosticCategory.Error, "An_enum_member_cannot_be_named_with_a_private_identifier_18024", "An enum member cannot be named with a private identifier."),
         can_only_be_used_at_the_start_of_a_file: diag(18026, ts.DiagnosticCategory.Error, "can_only_be_used_at_the_start_of_a_file_18026", "'#!' can only be used at the start of a file."),
         Compiler_reserves_name_0_when_emitting_private_identifier_downlevel: diag(18027, ts.DiagnosticCategory.Error, "Compiler_reserves_name_0_when_emitting_private_identifier_downlevel_18027", "Compiler reserves name '{0}' when emitting private identifier downlevel."),
@@ -6478,109 +6865,116 @@ var ts;
         Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhaustiveness_checks_consider_using_an_object_literal_instead: diag(18033, ts.DiagnosticCategory.Error, "Only_numeric_enums_can_have_computed_members_but_this_expression_has_type_0_If_you_do_not_need_exhau_18033", "Only numeric enums can have computed members, but this expression has type '{0}'. If you do not need exhaustiveness checks, consider using an object literal instead."),
         Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment: diag(18034, ts.DiagnosticCategory.Message, "Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compi_18034", "Specify the JSX fragment factory function to use when targeting 'react' JSX emit with 'jsxFactory' compiler option is specified, e.g. 'Fragment'."),
         Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name: diag(18035, ts.DiagnosticCategory.Error, "Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name_18035", "Invalid value for 'jsxFragmentFactory'. '{0}' is not a valid identifier or qualified-name."),
+        Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator: diag(18036, ts.DiagnosticCategory.Error, "Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_dec_18036", "Class decorators can't be used with static private identifier. Consider removing the experimental decorator."),
+        Await_expression_cannot_be_used_inside_a_class_static_block: diag(18037, ts.DiagnosticCategory.Error, "Await_expression_cannot_be_used_inside_a_class_static_block_18037", "Await expression cannot be used inside a class static block."),
+        For_await_loops_cannot_be_used_inside_a_class_static_block: diag(18038, ts.DiagnosticCategory.Error, "For_await_loops_cannot_be_used_inside_a_class_static_block_18038", "'For await' loops cannot be used inside a class static block."),
+        Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block: diag(18039, ts.DiagnosticCategory.Error, "Invalid_use_of_0_It_cannot_be_used_inside_a_class_static_block_18039", "Invalid use of '{0}'. It cannot be used inside a class static block."),
+        A_return_statement_cannot_be_used_inside_a_class_static_block: diag(18041, ts.DiagnosticCategory.Error, "A_return_statement_cannot_be_used_inside_a_class_static_block_18041", "A 'return' statement cannot be used inside a class static block."),
     };
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
     var _a;
     function tokenIsIdentifierOrKeyword(token) {
-        return token >= 78;
+        return token >= 79;
     }
     ts.tokenIsIdentifierOrKeyword = tokenIsIdentifierOrKeyword;
     function tokenIsIdentifierOrKeywordOrGreaterThan(token) {
         return token === 31 || tokenIsIdentifierOrKeyword(token);
     }
     ts.tokenIsIdentifierOrKeywordOrGreaterThan = tokenIsIdentifierOrKeywordOrGreaterThan;
-    var textToKeywordObj = (_a = {
-            abstract: 125,
-            any: 128,
-            as: 126,
-            asserts: 127,
-            bigint: 155,
-            boolean: 131,
-            break: 80,
-            case: 81,
-            catch: 82,
-            class: 83,
-            continue: 85,
-            const: 84
+    ts.textToKeywordObj = (_a = {
+            abstract: 126,
+            any: 130,
+            as: 127,
+            asserts: 128,
+            assert: 129,
+            bigint: 157,
+            boolean: 133,
+            break: 81,
+            case: 82,
+            catch: 83,
+            class: 84,
+            continue: 86,
+            const: 85
         },
-        _a["" + "constructor"] = 132,
-        _a.debugger = 86,
-        _a.declare = 133,
-        _a.default = 87,
-        _a.delete = 88,
-        _a.do = 89,
-        _a.else = 90,
-        _a.enum = 91,
-        _a.export = 92,
-        _a.extends = 93,
-        _a.false = 94,
-        _a.finally = 95,
-        _a.for = 96,
-        _a.from = 153,
-        _a.function = 97,
-        _a.get = 134,
-        _a.if = 98,
-        _a.implements = 116,
-        _a.import = 99,
-        _a.in = 100,
-        _a.infer = 135,
-        _a.instanceof = 101,
-        _a.interface = 117,
-        _a.intrinsic = 136,
-        _a.is = 137,
-        _a.keyof = 138,
-        _a.let = 118,
-        _a.module = 139,
-        _a.namespace = 140,
-        _a.never = 141,
-        _a.new = 102,
-        _a.null = 103,
-        _a.number = 144,
-        _a.object = 145,
-        _a.package = 119,
-        _a.private = 120,
-        _a.protected = 121,
-        _a.public = 122,
-        _a.readonly = 142,
-        _a.require = 143,
-        _a.global = 154,
-        _a.return = 104,
-        _a.set = 146,
-        _a.static = 123,
-        _a.string = 147,
-        _a.super = 105,
-        _a.switch = 106,
-        _a.symbol = 148,
-        _a.this = 107,
-        _a.throw = 108,
-        _a.true = 109,
-        _a.try = 110,
-        _a.type = 149,
-        _a.typeof = 111,
-        _a.undefined = 150,
-        _a.unique = 151,
-        _a.unknown = 152,
-        _a.var = 112,
-        _a.void = 113,
-        _a.while = 114,
-        _a.with = 115,
-        _a.yield = 124,
-        _a.async = 129,
-        _a.await = 130,
-        _a.of = 156,
+        _a["" + "constructor"] = 134,
+        _a.debugger = 87,
+        _a.declare = 135,
+        _a.default = 88,
+        _a.delete = 89,
+        _a.do = 90,
+        _a.else = 91,
+        _a.enum = 92,
+        _a.export = 93,
+        _a.extends = 94,
+        _a.false = 95,
+        _a.finally = 96,
+        _a.for = 97,
+        _a.from = 155,
+        _a.function = 98,
+        _a.get = 136,
+        _a.if = 99,
+        _a.implements = 117,
+        _a.import = 100,
+        _a.in = 101,
+        _a.infer = 137,
+        _a.instanceof = 102,
+        _a.interface = 118,
+        _a.intrinsic = 138,
+        _a.is = 139,
+        _a.keyof = 140,
+        _a.let = 119,
+        _a.module = 141,
+        _a.namespace = 142,
+        _a.never = 143,
+        _a.new = 103,
+        _a.null = 104,
+        _a.number = 146,
+        _a.object = 147,
+        _a.package = 120,
+        _a.private = 121,
+        _a.protected = 122,
+        _a.public = 123,
+        _a.override = 158,
+        _a.readonly = 144,
+        _a.require = 145,
+        _a.global = 156,
+        _a.return = 105,
+        _a.set = 148,
+        _a.static = 124,
+        _a.string = 149,
+        _a.super = 106,
+        _a.switch = 107,
+        _a.symbol = 150,
+        _a.this = 108,
+        _a.throw = 109,
+        _a.true = 110,
+        _a.try = 111,
+        _a.type = 151,
+        _a.typeof = 112,
+        _a.undefined = 152,
+        _a.unique = 153,
+        _a.unknown = 154,
+        _a.var = 113,
+        _a.void = 114,
+        _a.while = 115,
+        _a.with = 116,
+        _a.yield = 125,
+        _a.async = 131,
+        _a.await = 132,
+        _a.of = 159,
         _a);
-    var textToKeyword = new ts.Map(ts.getEntries(textToKeywordObj));
-    var textToToken = new ts.Map(ts.getEntries(__assign(__assign({}, textToKeywordObj), { "{": 18, "}": 19, "(": 20, ")": 21, "[": 22, "]": 23, ".": 24, "...": 25, ";": 26, ",": 27, "<": 29, ">": 31, "<=": 32, ">=": 33, "==": 34, "!=": 35, "===": 36, "!==": 37, "=>": 38, "+": 39, "-": 40, "**": 42, "*": 41, "/": 43, "%": 44, "++": 45, "--": 46, "<<": 47, "</": 30, ">>": 48, ">>>": 49, "&": 50, "|": 51, "^": 52, "!": 53, "~": 54, "&&": 55, "||": 56, "?": 57, "??": 60, "?.": 28, ":": 58, "=": 62, "+=": 63, "-=": 64, "*=": 65, "**=": 66, "/=": 67, "%=": 68, "<<=": 69, ">>=": 70, ">>>=": 71, "&=": 72, "|=": 73, "^=": 77, "||=": 74, "&&=": 75, "??=": 76, "@": 59, "`": 61 })));
+    var textToKeyword = new ts.Map(ts.getEntries(ts.textToKeywordObj));
+    var textToToken = new ts.Map(ts.getEntries(__assign(__assign({}, ts.textToKeywordObj), { "{": 18, "}": 19, "(": 20, ")": 21, "[": 22, "]": 23, ".": 24, "...": 25, ";": 26, ",": 27, "<": 29, ">": 31, "<=": 32, ">=": 33, "==": 34, "!=": 35, "===": 36, "!==": 37, "=>": 38, "+": 39, "-": 40, "**": 42, "*": 41, "/": 43, "%": 44, "++": 45, "--": 46, "<<": 47, "</": 30, ">>": 48, ">>>": 49, "&": 50, "|": 51, "^": 52, "!": 53, "~": 54, "&&": 55, "||": 56, "?": 57, "??": 60, "?.": 28, ":": 58, "=": 63, "+=": 64, "-=": 65, "*=": 66, "**=": 67, "/=": 68, "%=": 69, "<<=": 70, ">>=": 71, ">>>=": 72, "&=": 73, "|=": 74, "^=": 78, "||=": 75, "&&=": 76, "??=": 77, "@": 59, "#": 62, "`": 61 })));
     var unicodeES3IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1610, 1649, 1747, 1749, 1749, 1765, 1766, 1786, 1788, 1808, 1808, 1810, 1836, 1920, 1957, 2309, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2784, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3294, 3294, 3296, 3297, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3424, 3425, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3805, 3840, 3840, 3904, 3911, 3913, 3946, 3976, 3979, 4096, 4129, 4131, 4135, 4137, 4138, 4176, 4181, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6067, 6176, 6263, 6272, 6312, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8319, 8319, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12346, 12353, 12436, 12445, 12446, 12449, 12538, 12540, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65138, 65140, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
     var unicodeES3IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 543, 546, 563, 592, 685, 688, 696, 699, 705, 720, 721, 736, 740, 750, 750, 768, 846, 864, 866, 890, 890, 902, 902, 904, 906, 908, 908, 910, 929, 931, 974, 976, 983, 986, 1011, 1024, 1153, 1155, 1158, 1164, 1220, 1223, 1224, 1227, 1228, 1232, 1269, 1272, 1273, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1441, 1443, 1465, 1467, 1469, 1471, 1471, 1473, 1474, 1476, 1476, 1488, 1514, 1520, 1522, 1569, 1594, 1600, 1621, 1632, 1641, 1648, 1747, 1749, 1756, 1759, 1768, 1770, 1773, 1776, 1788, 1808, 1836, 1840, 1866, 1920, 1968, 2305, 2307, 2309, 2361, 2364, 2381, 2384, 2388, 2392, 2403, 2406, 2415, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2492, 2494, 2500, 2503, 2504, 2507, 2509, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2562, 2562, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2649, 2652, 2654, 2654, 2662, 2676, 2689, 2691, 2693, 2699, 2701, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2784, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2870, 2873, 2876, 2883, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2913, 2918, 2927, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 2997, 2999, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3031, 3031, 3047, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3134, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3168, 3169, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3262, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3297, 3302, 3311, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3368, 3370, 3385, 3390, 3395, 3398, 3400, 3402, 3405, 3415, 3415, 3424, 3425, 3430, 3439, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3805, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3946, 3953, 3972, 3974, 3979, 3984, 3991, 3993, 4028, 4038, 4038, 4096, 4129, 4131, 4135, 4137, 4138, 4140, 4146, 4150, 4153, 4160, 4169, 4176, 4185, 4256, 4293, 4304, 4342, 4352, 4441, 4447, 4514, 4520, 4601, 4608, 4614, 4616, 4678, 4680, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4742, 4744, 4744, 4746, 4749, 4752, 4782, 4784, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4814, 4816, 4822, 4824, 4846, 4848, 4878, 4880, 4880, 4882, 4885, 4888, 4894, 4896, 4934, 4936, 4954, 4969, 4977, 5024, 5108, 5121, 5740, 5743, 5750, 5761, 5786, 5792, 5866, 6016, 6099, 6112, 6121, 6160, 6169, 6176, 6263, 6272, 6313, 7680, 7835, 7840, 7929, 7936, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8319, 8319, 8400, 8412, 8417, 8417, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8497, 8499, 8505, 8544, 8579, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12346, 12353, 12436, 12441, 12442, 12445, 12446, 12449, 12542, 12549, 12588, 12593, 12686, 12704, 12727, 13312, 19893, 19968, 40869, 40960, 42124, 44032, 55203, 63744, 64045, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65056, 65059, 65075, 65076, 65101, 65103, 65136, 65138, 65140, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65381, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
     var unicodeES5IdentifierStart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1488, 1514, 1520, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2208, 2208, 2210, 2220, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2423, 2425, 2431, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3133, 3160, 3161, 3168, 3169, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3424, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6263, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6428, 6480, 6509, 6512, 6516, 6528, 6571, 6593, 6599, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7401, 7404, 7406, 7409, 7413, 7414, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11823, 11823, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42647, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43648, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
     var unicodeES5IdentifierPart = [170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1319, 1329, 1366, 1369, 1369, 1377, 1415, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1520, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2048, 2093, 2112, 2139, 2208, 2208, 2210, 2220, 2276, 2302, 2304, 2403, 2406, 2415, 2417, 2423, 2425, 2431, 2433, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3073, 3075, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3123, 3125, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3161, 3168, 3171, 3174, 3183, 3202, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3330, 3331, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3396, 3398, 3400, 3402, 3406, 3415, 3415, 3424, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3719, 3720, 3722, 3722, 3725, 3725, 3732, 3735, 3737, 3743, 3745, 3747, 3749, 3749, 3751, 3751, 3754, 3755, 3757, 3769, 3771, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4992, 5007, 5024, 5108, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5872, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6263, 6272, 6314, 6320, 6389, 6400, 6428, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6617, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7376, 7378, 7380, 7414, 7424, 7654, 7676, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8204, 8205, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8473, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8493, 8495, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 11823, 11823, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12442, 12445, 12447, 12449, 12538, 12540, 12543, 12549, 12589, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40908, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42647, 42655, 42737, 42775, 42783, 42786, 42888, 42891, 42894, 42896, 42899, 42912, 42922, 43000, 43047, 43072, 43123, 43136, 43204, 43216, 43225, 43232, 43255, 43259, 43259, 43264, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43643, 43648, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43968, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65062, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500,];
     var unicodeESNextIdentifierStart = [65, 90, 97, 122, 170, 170, 181, 181, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 880, 884, 886, 887, 890, 893, 895, 895, 902, 902, 904, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1488, 1514, 1519, 1522, 1568, 1610, 1646, 1647, 1649, 1747, 1749, 1749, 1765, 1766, 1774, 1775, 1786, 1788, 1791, 1791, 1808, 1808, 1810, 1839, 1869, 1957, 1969, 1969, 1994, 2026, 2036, 2037, 2042, 2042, 2048, 2069, 2074, 2074, 2084, 2084, 2088, 2088, 2112, 2136, 2144, 2154, 2208, 2228, 2230, 2237, 2308, 2361, 2365, 2365, 2384, 2384, 2392, 2401, 2417, 2432, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2493, 2493, 2510, 2510, 2524, 2525, 2527, 2529, 2544, 2545, 2556, 2556, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2649, 2652, 2654, 2654, 2674, 2676, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2749, 2749, 2768, 2768, 2784, 2785, 2809, 2809, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2877, 2877, 2908, 2909, 2911, 2913, 2929, 2929, 2947, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3024, 3024, 3077, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3133, 3160, 3162, 3168, 3169, 3200, 3200, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3261, 3261, 3294, 3294, 3296, 3297, 3313, 3314, 3333, 3340, 3342, 3344, 3346, 3386, 3389, 3389, 3406, 3406, 3412, 3414, 3423, 3425, 3450, 3455, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3585, 3632, 3634, 3635, 3648, 3654, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3760, 3762, 3763, 3773, 3773, 3776, 3780, 3782, 3782, 3804, 3807, 3840, 3840, 3904, 3911, 3913, 3948, 3976, 3980, 4096, 4138, 4159, 4159, 4176, 4181, 4186, 4189, 4193, 4193, 4197, 4198, 4206, 4208, 4213, 4225, 4238, 4238, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5905, 5920, 5937, 5952, 5969, 5984, 5996, 5998, 6000, 6016, 6067, 6103, 6103, 6108, 6108, 6176, 6264, 6272, 6312, 6314, 6314, 6320, 6389, 6400, 6430, 6480, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6656, 6678, 6688, 6740, 6823, 6823, 6917, 6963, 6981, 6987, 7043, 7072, 7086, 7087, 7098, 7141, 7168, 7203, 7245, 7247, 7258, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7401, 7404, 7406, 7411, 7413, 7414, 7418, 7418, 7424, 7615, 7680, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8305, 8305, 8319, 8319, 8336, 8348, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11502, 11506, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11648, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 12293, 12295, 12321, 12329, 12337, 12341, 12344, 12348, 12353, 12438, 12443, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42527, 42538, 42539, 42560, 42606, 42623, 42653, 42656, 42735, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43009, 43011, 43013, 43015, 43018, 43020, 43042, 43072, 43123, 43138, 43187, 43250, 43255, 43259, 43259, 43261, 43262, 43274, 43301, 43312, 43334, 43360, 43388, 43396, 43442, 43471, 43471, 43488, 43492, 43494, 43503, 43514, 43518, 43520, 43560, 43584, 43586, 43588, 43595, 43616, 43638, 43642, 43642, 43646, 43695, 43697, 43697, 43701, 43702, 43705, 43709, 43712, 43712, 43714, 43714, 43739, 43741, 43744, 43754, 43762, 43764, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44002, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64285, 64287, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65136, 65140, 65142, 65276, 65313, 65338, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66176, 66204, 66208, 66256, 66304, 66335, 66349, 66378, 66384, 66421, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68096, 68112, 68115, 68117, 68119, 68121, 68149, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68324, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68899, 69376, 69404, 69415, 69415, 69424, 69445, 69600, 69622, 69635, 69687, 69763, 69807, 69840, 69864, 69891, 69926, 69956, 69956, 69968, 70002, 70006, 70006, 70019, 70066, 70081, 70084, 70106, 70106, 70108, 70108, 70144, 70161, 70163, 70187, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70366, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70461, 70461, 70480, 70480, 70493, 70497, 70656, 70708, 70727, 70730, 70751, 70751, 70784, 70831, 70852, 70853, 70855, 70855, 71040, 71086, 71128, 71131, 71168, 71215, 71236, 71236, 71296, 71338, 71352, 71352, 71424, 71450, 71680, 71723, 71840, 71903, 71935, 71935, 72096, 72103, 72106, 72144, 72161, 72161, 72163, 72163, 72192, 72192, 72203, 72242, 72250, 72250, 72272, 72272, 72284, 72329, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72750, 72768, 72768, 72818, 72847, 72960, 72966, 72968, 72969, 72971, 73008, 73030, 73030, 73056, 73061, 73063, 73064, 73066, 73097, 73112, 73112, 73440, 73458, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92880, 92909, 92928, 92975, 92992, 92995, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94032, 94032, 94099, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 123136, 123180, 123191, 123197, 123214, 123214, 123584, 123627, 124928, 125124, 125184, 125251, 125259, 125259, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101];
     var unicodeESNextIdentifierPart = [48, 57, 65, 90, 95, 95, 97, 122, 170, 170, 181, 181, 183, 183, 186, 186, 192, 214, 216, 246, 248, 705, 710, 721, 736, 740, 748, 748, 750, 750, 768, 884, 886, 887, 890, 893, 895, 895, 902, 906, 908, 908, 910, 929, 931, 1013, 1015, 1153, 1155, 1159, 1162, 1327, 1329, 1366, 1369, 1369, 1376, 1416, 1425, 1469, 1471, 1471, 1473, 1474, 1476, 1477, 1479, 1479, 1488, 1514, 1519, 1522, 1552, 1562, 1568, 1641, 1646, 1747, 1749, 1756, 1759, 1768, 1770, 1788, 1791, 1791, 1808, 1866, 1869, 1969, 1984, 2037, 2042, 2042, 2045, 2045, 2048, 2093, 2112, 2139, 2144, 2154, 2208, 2228, 2230, 2237, 2259, 2273, 2275, 2403, 2406, 2415, 2417, 2435, 2437, 2444, 2447, 2448, 2451, 2472, 2474, 2480, 2482, 2482, 2486, 2489, 2492, 2500, 2503, 2504, 2507, 2510, 2519, 2519, 2524, 2525, 2527, 2531, 2534, 2545, 2556, 2556, 2558, 2558, 2561, 2563, 2565, 2570, 2575, 2576, 2579, 2600, 2602, 2608, 2610, 2611, 2613, 2614, 2616, 2617, 2620, 2620, 2622, 2626, 2631, 2632, 2635, 2637, 2641, 2641, 2649, 2652, 2654, 2654, 2662, 2677, 2689, 2691, 2693, 2701, 2703, 2705, 2707, 2728, 2730, 2736, 2738, 2739, 2741, 2745, 2748, 2757, 2759, 2761, 2763, 2765, 2768, 2768, 2784, 2787, 2790, 2799, 2809, 2815, 2817, 2819, 2821, 2828, 2831, 2832, 2835, 2856, 2858, 2864, 2866, 2867, 2869, 2873, 2876, 2884, 2887, 2888, 2891, 2893, 2902, 2903, 2908, 2909, 2911, 2915, 2918, 2927, 2929, 2929, 2946, 2947, 2949, 2954, 2958, 2960, 2962, 2965, 2969, 2970, 2972, 2972, 2974, 2975, 2979, 2980, 2984, 2986, 2990, 3001, 3006, 3010, 3014, 3016, 3018, 3021, 3024, 3024, 3031, 3031, 3046, 3055, 3072, 3084, 3086, 3088, 3090, 3112, 3114, 3129, 3133, 3140, 3142, 3144, 3146, 3149, 3157, 3158, 3160, 3162, 3168, 3171, 3174, 3183, 3200, 3203, 3205, 3212, 3214, 3216, 3218, 3240, 3242, 3251, 3253, 3257, 3260, 3268, 3270, 3272, 3274, 3277, 3285, 3286, 3294, 3294, 3296, 3299, 3302, 3311, 3313, 3314, 3328, 3331, 3333, 3340, 3342, 3344, 3346, 3396, 3398, 3400, 3402, 3406, 3412, 3415, 3423, 3427, 3430, 3439, 3450, 3455, 3458, 3459, 3461, 3478, 3482, 3505, 3507, 3515, 3517, 3517, 3520, 3526, 3530, 3530, 3535, 3540, 3542, 3542, 3544, 3551, 3558, 3567, 3570, 3571, 3585, 3642, 3648, 3662, 3664, 3673, 3713, 3714, 3716, 3716, 3718, 3722, 3724, 3747, 3749, 3749, 3751, 3773, 3776, 3780, 3782, 3782, 3784, 3789, 3792, 3801, 3804, 3807, 3840, 3840, 3864, 3865, 3872, 3881, 3893, 3893, 3895, 3895, 3897, 3897, 3902, 3911, 3913, 3948, 3953, 3972, 3974, 3991, 3993, 4028, 4038, 4038, 4096, 4169, 4176, 4253, 4256, 4293, 4295, 4295, 4301, 4301, 4304, 4346, 4348, 4680, 4682, 4685, 4688, 4694, 4696, 4696, 4698, 4701, 4704, 4744, 4746, 4749, 4752, 4784, 4786, 4789, 4792, 4798, 4800, 4800, 4802, 4805, 4808, 4822, 4824, 4880, 4882, 4885, 4888, 4954, 4957, 4959, 4969, 4977, 4992, 5007, 5024, 5109, 5112, 5117, 5121, 5740, 5743, 5759, 5761, 5786, 5792, 5866, 5870, 5880, 5888, 5900, 5902, 5908, 5920, 5940, 5952, 5971, 5984, 5996, 5998, 6000, 6002, 6003, 6016, 6099, 6103, 6103, 6108, 6109, 6112, 6121, 6155, 6157, 6160, 6169, 6176, 6264, 6272, 6314, 6320, 6389, 6400, 6430, 6432, 6443, 6448, 6459, 6470, 6509, 6512, 6516, 6528, 6571, 6576, 6601, 6608, 6618, 6656, 6683, 6688, 6750, 6752, 6780, 6783, 6793, 6800, 6809, 6823, 6823, 6832, 6845, 6912, 6987, 6992, 7001, 7019, 7027, 7040, 7155, 7168, 7223, 7232, 7241, 7245, 7293, 7296, 7304, 7312, 7354, 7357, 7359, 7376, 7378, 7380, 7418, 7424, 7673, 7675, 7957, 7960, 7965, 7968, 8005, 8008, 8013, 8016, 8023, 8025, 8025, 8027, 8027, 8029, 8029, 8031, 8061, 8064, 8116, 8118, 8124, 8126, 8126, 8130, 8132, 8134, 8140, 8144, 8147, 8150, 8155, 8160, 8172, 8178, 8180, 8182, 8188, 8255, 8256, 8276, 8276, 8305, 8305, 8319, 8319, 8336, 8348, 8400, 8412, 8417, 8417, 8421, 8432, 8450, 8450, 8455, 8455, 8458, 8467, 8469, 8469, 8472, 8477, 8484, 8484, 8486, 8486, 8488, 8488, 8490, 8505, 8508, 8511, 8517, 8521, 8526, 8526, 8544, 8584, 11264, 11310, 11312, 11358, 11360, 11492, 11499, 11507, 11520, 11557, 11559, 11559, 11565, 11565, 11568, 11623, 11631, 11631, 11647, 11670, 11680, 11686, 11688, 11694, 11696, 11702, 11704, 11710, 11712, 11718, 11720, 11726, 11728, 11734, 11736, 11742, 11744, 11775, 12293, 12295, 12321, 12335, 12337, 12341, 12344, 12348, 12353, 12438, 12441, 12447, 12449, 12538, 12540, 12543, 12549, 12591, 12593, 12686, 12704, 12730, 12784, 12799, 13312, 19893, 19968, 40943, 40960, 42124, 42192, 42237, 42240, 42508, 42512, 42539, 42560, 42607, 42612, 42621, 42623, 42737, 42775, 42783, 42786, 42888, 42891, 42943, 42946, 42950, 42999, 43047, 43072, 43123, 43136, 43205, 43216, 43225, 43232, 43255, 43259, 43259, 43261, 43309, 43312, 43347, 43360, 43388, 43392, 43456, 43471, 43481, 43488, 43518, 43520, 43574, 43584, 43597, 43600, 43609, 43616, 43638, 43642, 43714, 43739, 43741, 43744, 43759, 43762, 43766, 43777, 43782, 43785, 43790, 43793, 43798, 43808, 43814, 43816, 43822, 43824, 43866, 43868, 43879, 43888, 44010, 44012, 44013, 44016, 44025, 44032, 55203, 55216, 55238, 55243, 55291, 63744, 64109, 64112, 64217, 64256, 64262, 64275, 64279, 64285, 64296, 64298, 64310, 64312, 64316, 64318, 64318, 64320, 64321, 64323, 64324, 64326, 64433, 64467, 64829, 64848, 64911, 64914, 64967, 65008, 65019, 65024, 65039, 65056, 65071, 65075, 65076, 65101, 65103, 65136, 65140, 65142, 65276, 65296, 65305, 65313, 65338, 65343, 65343, 65345, 65370, 65382, 65470, 65474, 65479, 65482, 65487, 65490, 65495, 65498, 65500, 65536, 65547, 65549, 65574, 65576, 65594, 65596, 65597, 65599, 65613, 65616, 65629, 65664, 65786, 65856, 65908, 66045, 66045, 66176, 66204, 66208, 66256, 66272, 66272, 66304, 66335, 66349, 66378, 66384, 66426, 66432, 66461, 66464, 66499, 66504, 66511, 66513, 66517, 66560, 66717, 66720, 66729, 66736, 66771, 66776, 66811, 66816, 66855, 66864, 66915, 67072, 67382, 67392, 67413, 67424, 67431, 67584, 67589, 67592, 67592, 67594, 67637, 67639, 67640, 67644, 67644, 67647, 67669, 67680, 67702, 67712, 67742, 67808, 67826, 67828, 67829, 67840, 67861, 67872, 67897, 67968, 68023, 68030, 68031, 68096, 68099, 68101, 68102, 68108, 68115, 68117, 68119, 68121, 68149, 68152, 68154, 68159, 68159, 68192, 68220, 68224, 68252, 68288, 68295, 68297, 68326, 68352, 68405, 68416, 68437, 68448, 68466, 68480, 68497, 68608, 68680, 68736, 68786, 68800, 68850, 68864, 68903, 68912, 68921, 69376, 69404, 69415, 69415, 69424, 69456, 69600, 69622, 69632, 69702, 69734, 69743, 69759, 69818, 69840, 69864, 69872, 69881, 69888, 69940, 69942, 69951, 69956, 69958, 69968, 70003, 70006, 70006, 70016, 70084, 70089, 70092, 70096, 70106, 70108, 70108, 70144, 70161, 70163, 70199, 70206, 70206, 70272, 70278, 70280, 70280, 70282, 70285, 70287, 70301, 70303, 70312, 70320, 70378, 70384, 70393, 70400, 70403, 70405, 70412, 70415, 70416, 70419, 70440, 70442, 70448, 70450, 70451, 70453, 70457, 70459, 70468, 70471, 70472, 70475, 70477, 70480, 70480, 70487, 70487, 70493, 70499, 70502, 70508, 70512, 70516, 70656, 70730, 70736, 70745, 70750, 70751, 70784, 70853, 70855, 70855, 70864, 70873, 71040, 71093, 71096, 71104, 71128, 71133, 71168, 71232, 71236, 71236, 71248, 71257, 71296, 71352, 71360, 71369, 71424, 71450, 71453, 71467, 71472, 71481, 71680, 71738, 71840, 71913, 71935, 71935, 72096, 72103, 72106, 72151, 72154, 72161, 72163, 72164, 72192, 72254, 72263, 72263, 72272, 72345, 72349, 72349, 72384, 72440, 72704, 72712, 72714, 72758, 72760, 72768, 72784, 72793, 72818, 72847, 72850, 72871, 72873, 72886, 72960, 72966, 72968, 72969, 72971, 73014, 73018, 73018, 73020, 73021, 73023, 73031, 73040, 73049, 73056, 73061, 73063, 73064, 73066, 73102, 73104, 73105, 73107, 73112, 73120, 73129, 73440, 73462, 73728, 74649, 74752, 74862, 74880, 75075, 77824, 78894, 82944, 83526, 92160, 92728, 92736, 92766, 92768, 92777, 92880, 92909, 92912, 92916, 92928, 92982, 92992, 92995, 93008, 93017, 93027, 93047, 93053, 93071, 93760, 93823, 93952, 94026, 94031, 94087, 94095, 94111, 94176, 94177, 94179, 94179, 94208, 100343, 100352, 101106, 110592, 110878, 110928, 110930, 110948, 110951, 110960, 111355, 113664, 113770, 113776, 113788, 113792, 113800, 113808, 113817, 113821, 113822, 119141, 119145, 119149, 119154, 119163, 119170, 119173, 119179, 119210, 119213, 119362, 119364, 119808, 119892, 119894, 119964, 119966, 119967, 119970, 119970, 119973, 119974, 119977, 119980, 119982, 119993, 119995, 119995, 119997, 120003, 120005, 120069, 120071, 120074, 120077, 120084, 120086, 120092, 120094, 120121, 120123, 120126, 120128, 120132, 120134, 120134, 120138, 120144, 120146, 120485, 120488, 120512, 120514, 120538, 120540, 120570, 120572, 120596, 120598, 120628, 120630, 120654, 120656, 120686, 120688, 120712, 120714, 120744, 120746, 120770, 120772, 120779, 120782, 120831, 121344, 121398, 121403, 121452, 121461, 121461, 121476, 121476, 121499, 121503, 121505, 121519, 122880, 122886, 122888, 122904, 122907, 122913, 122915, 122916, 122918, 122922, 123136, 123180, 123184, 123197, 123200, 123209, 123214, 123214, 123584, 123641, 124928, 125124, 125136, 125142, 125184, 125259, 125264, 125273, 126464, 126467, 126469, 126495, 126497, 126498, 126500, 126500, 126503, 126503, 126505, 126514, 126516, 126519, 126521, 126521, 126523, 126523, 126530, 126530, 126535, 126535, 126537, 126537, 126539, 126539, 126541, 126543, 126545, 126546, 126548, 126548, 126551, 126551, 126553, 126553, 126555, 126555, 126557, 126557, 126559, 126559, 126561, 126562, 126564, 126564, 126567, 126570, 126572, 126578, 126580, 126583, 126585, 126588, 126590, 126590, 126592, 126601, 126603, 126619, 126625, 126627, 126629, 126633, 126635, 126651, 131072, 173782, 173824, 177972, 177984, 178205, 178208, 183969, 183984, 191456, 194560, 195101, 917760, 917999];
-    var commentDirectiveRegExSingleLine = /^\s*\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
-    var commentDirectiveRegExMultiLine = /^\s*(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
+    var commentDirectiveRegExSingleLine = /^\/\/\/?\s*@(ts-expect-error|ts-ignore)/;
+    var commentDirectiveRegExMultiLine = /^(?:\/|\*)*\s*@(ts-expect-error|ts-ignore)/;
     function lookupInUnicodeMap(code, map) {
         if (code < map[0]) {
             return false;
@@ -6672,7 +7066,7 @@ var ts;
                 line = line < 0 ? 0 : line >= lineStarts.length ? lineStarts.length - 1 : line;
             }
             else {
-                ts.Debug.fail("Bad line number. Line: " + line + ", lineStarts.length: " + lineStarts.length + " , line map is correct? " + (debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
+                ts.Debug.fail("Bad line number. Line: ".concat(line, ", lineStarts.length: ").concat(lineStarts.length, " , line map is correct? ").concat(debugText !== undefined ? ts.arraysEqual(lineStarts, computeLineStarts(debugText)) : "unknown"));
             }
         }
         var res = lineStarts[line] + character;
@@ -6786,11 +7180,11 @@ var ts;
         }
     }
     ts.couldStartTrivia = couldStartTrivia;
-    function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments) {
-        if (stopAtComments === void 0) { stopAtComments = false; }
+    function skipTrivia(text, pos, stopAfterLineBreak, stopAtComments, inJSDoc) {
         if (ts.positionIsSynthesized(pos)) {
             return pos;
         }
+        var canConsumeStar = false;
         while (true) {
             var ch = text.charCodeAt(pos);
             switch (ch) {
@@ -6803,6 +7197,7 @@ var ts;
                     if (stopAfterLineBreak) {
                         return pos;
                     }
+                    canConsumeStar = !!inJSDoc;
                     continue;
                 case 9:
                 case 11:
@@ -6822,6 +7217,7 @@ var ts;
                             }
                             pos++;
                         }
+                        canConsumeStar = false;
                         continue;
                     }
                     if (text.charCodeAt(pos + 1) === 42) {
@@ -6833,6 +7229,7 @@ var ts;
                             }
                             pos++;
                         }
+                        canConsumeStar = false;
                         continue;
                     }
                     break;
@@ -6842,12 +7239,21 @@ var ts;
                 case 62:
                     if (isConflictMarkerTrivia(text, pos)) {
                         pos = scanConflictMarkerTrivia(text, pos);
+                        canConsumeStar = false;
                         continue;
                     }
                     break;
                 case 35:
                     if (pos === 0 && isShebangTrivia(text, pos)) {
                         pos = scanShebangTrivia(text, pos);
+                        canConsumeStar = false;
+                        continue;
+                    }
+                    break;
+                case 42:
+                    if (canConsumeStar) {
+                        pos++;
+                        canConsumeStar = false;
                         continue;
                     }
                     break;
@@ -7097,8 +7503,8 @@ var ts;
             hasExtendedUnicodeEscape: function () { return (tokenFlags & 8) !== 0; },
             hasPrecedingLineBreak: function () { return (tokenFlags & 1) !== 0; },
             hasPrecedingJSDocComment: function () { return (tokenFlags & 2) !== 0; },
-            isIdentifier: function () { return token === 78 || token > 115; },
-            isReservedWord: function () { return token >= 80 && token <= 115; },
+            isIdentifier: function () { return token === 79 || token > 116; },
+            isReservedWord: function () { return token >= 81 && token <= 116; },
             isUnterminated: function () { return (tokenFlags & 4) !== 0; },
             getCommentDirectives: function () { return commentDirectives; },
             getNumericLiteralFlags: function () { return tokenFlags & 1008; },
@@ -7113,6 +7519,7 @@ var ts;
             reScanJsxAttributeValue: reScanJsxAttributeValue,
             reScanJsxToken: reScanJsxToken,
             reScanLessThanToken: reScanLessThanToken,
+            reScanHashToken: reScanHashToken,
             reScanQuestionToken: reScanQuestionToken,
             reScanInvalidIdentifier: reScanInvalidIdentifier,
             scanJsxToken: scanJsxToken,
@@ -7590,7 +7997,7 @@ var ts;
                     }
                 }
             }
-            return token = 78;
+            return token = 79;
         }
         function scanBinaryOrOctalDigits(base) {
             var value = "";
@@ -7731,19 +8138,19 @@ var ts;
                         return token = scanTemplateAndSetTokenValue(false);
                     case 37:
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 68;
+                            return pos += 2, token = 69;
                         }
                         pos++;
                         return token = 44;
                     case 38:
                         if (text.charCodeAt(pos + 1) === 38) {
                             if (text.charCodeAt(pos + 2) === 61) {
-                                return pos += 3, token = 75;
+                                return pos += 3, token = 76;
                             }
                             return pos += 2, token = 55;
                         }
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 72;
+                            return pos += 2, token = 73;
                         }
                         pos++;
                         return token = 50;
@@ -7755,11 +8162,11 @@ var ts;
                         return token = 21;
                     case 42:
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 65;
+                            return pos += 2, token = 66;
                         }
                         if (text.charCodeAt(pos + 1) === 42) {
                             if (text.charCodeAt(pos + 2) === 61) {
-                                return pos += 3, token = 66;
+                                return pos += 3, token = 67;
                             }
                             return pos += 2, token = 42;
                         }
@@ -7774,7 +8181,7 @@ var ts;
                             return pos += 2, token = 45;
                         }
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 63;
+                            return pos += 2, token = 64;
                         }
                         pos++;
                         return token = 39;
@@ -7786,7 +8193,7 @@ var ts;
                             return pos += 2, token = 46;
                         }
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 64;
+                            return pos += 2, token = 65;
                         }
                         pos++;
                         return token = 40;
@@ -7852,7 +8259,7 @@ var ts;
                             }
                         }
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 67;
+                            return pos += 2, token = 68;
                         }
                         pos++;
                         return token = 43;
@@ -7924,7 +8331,7 @@ var ts;
                         }
                         if (text.charCodeAt(pos + 1) === 60) {
                             if (text.charCodeAt(pos + 2) === 61) {
-                                return pos += 3, token = 69;
+                                return pos += 3, token = 70;
                             }
                             return pos += 2, token = 47;
                         }
@@ -7958,7 +8365,7 @@ var ts;
                             return pos += 2, token = 38;
                         }
                         pos++;
-                        return token = 62;
+                        return token = 63;
                     case 62:
                         if (isConflictMarkerTrivia(text, pos)) {
                             pos = scanConflictMarkerTrivia(text, pos, error);
@@ -7977,7 +8384,7 @@ var ts;
                         }
                         if (text.charCodeAt(pos + 1) === 63) {
                             if (text.charCodeAt(pos + 2) === 61) {
-                                return pos += 3, token = 76;
+                                return pos += 3, token = 77;
                             }
                             return pos += 2, token = 60;
                         }
@@ -7991,7 +8398,7 @@ var ts;
                         return token = 23;
                     case 94:
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 77;
+                            return pos += 2, token = 78;
                         }
                         pos++;
                         return token = 52;
@@ -8010,12 +8417,12 @@ var ts;
                         }
                         if (text.charCodeAt(pos + 1) === 124) {
                             if (text.charCodeAt(pos + 2) === 61) {
-                                return pos += 3, token = 74;
+                                return pos += 3, token = 75;
                             }
                             return pos += 2, token = 56;
                         }
                         if (text.charCodeAt(pos + 1) === 61) {
-                            return pos += 2, token = 73;
+                            return pos += 2, token = 74;
                         }
                         pos++;
                         return token = 51;
@@ -8052,21 +8459,15 @@ var ts;
                             pos++;
                             return token = 0;
                         }
-                        pos++;
-                        if (isIdentifierStart(ch = text.charCodeAt(pos), languageVersion)) {
+                        if (isIdentifierStart(codePointAt(text, pos + 1), languageVersion)) {
                             pos++;
-                            while (pos < end && isIdentifierPart(ch = text.charCodeAt(pos), languageVersion))
-                                pos++;
-                            tokenValue = text.substring(tokenPos, pos);
-                            if (ch === 92) {
-                                tokenValue += scanIdentifierParts();
-                            }
+                            scanIdentifier(codePointAt(text, pos), languageVersion);
                         }
                         else {
-                            tokenValue = "#";
-                            error(ts.Diagnostics.Invalid_character);
+                            tokenValue = String.fromCharCode(codePointAt(text, pos));
+                            error(ts.Diagnostics.Invalid_character, pos++, charSize(ch));
                         }
-                        return token = 79;
+                        return token = 80;
                     default:
                         var identifierKind = scanIdentifier(ch, languageVersion);
                         if (identifierKind) {
@@ -8081,8 +8482,9 @@ var ts;
                             pos += charSize(ch);
                             continue;
                         }
-                        error(ts.Diagnostics.Invalid_character);
-                        pos += charSize(ch);
+                        var size = charSize(ch);
+                        error(ts.Diagnostics.Invalid_character, pos, size);
+                        pos += size;
                         return token = 0;
                 }
             }
@@ -8117,12 +8519,12 @@ var ts;
                 if (text.charCodeAt(pos) === 62) {
                     if (text.charCodeAt(pos + 1) === 62) {
                         if (text.charCodeAt(pos + 2) === 61) {
-                            return pos += 3, token = 71;
+                            return pos += 3, token = 72;
                         }
                         return pos += 2, token = 49;
                     }
                     if (text.charCodeAt(pos + 1) === 61) {
-                        return pos += 2, token = 70;
+                        return pos += 2, token = 71;
                     }
                     pos++;
                     return token = 48;
@@ -8135,12 +8537,12 @@ var ts;
             return token;
         }
         function reScanAsteriskEqualsToken() {
-            ts.Debug.assert(token === 65, "'reScanAsteriskEqualsToken' should only be called on a '*='");
+            ts.Debug.assert(token === 66, "'reScanAsteriskEqualsToken' should only be called on a '*='");
             pos = tokenPos + 1;
-            return token = 62;
+            return token = 63;
         }
         function reScanSlashToken() {
-            if (token === 43 || token === 67) {
+            if (token === 43 || token === 68) {
                 var p = tokenPos + 1;
                 var inEscape = false;
                 var inCharacterClass = false;
@@ -8184,7 +8586,7 @@ var ts;
             return token;
         }
         function appendIfCommentDirective(commentDirectives, text, commentDirectiveRegEx, lineStart) {
-            var type = getDirectiveFromComment(text, commentDirectiveRegEx);
+            var type = getDirectiveFromComment(ts.trimStringStart(text), commentDirectiveRegEx);
             if (type === undefined) {
                 return commentDirectives;
             }
@@ -8215,9 +8617,10 @@ var ts;
             pos = tokenPos;
             return token = scanTemplateAndSetTokenValue(true);
         }
-        function reScanJsxToken() {
+        function reScanJsxToken(allowMultilineJsxText) {
+            if (allowMultilineJsxText === void 0) { allowMultilineJsxText = true; }
             pos = tokenPos = startPos;
-            return token = scanJsxToken();
+            return token = scanJsxToken(allowMultilineJsxText);
         }
         function reScanLessThanToken() {
             if (token === 47) {
@@ -8226,12 +8629,20 @@ var ts;
             }
             return token;
         }
+        function reScanHashToken() {
+            if (token === 80) {
+                pos = tokenPos + 1;
+                return token = 62;
+            }
+            return token;
+        }
         function reScanQuestionToken() {
             ts.Debug.assert(token === 60, "'reScanQuestionToken' should only be called on a '??'");
             pos = tokenPos + 1;
             return token = 57;
         }
-        function scanJsxToken() {
+        function scanJsxToken(allowMultilineJsxText) {
+            if (allowMultilineJsxText === void 0) { allowMultilineJsxText = true; }
             startPos = tokenPos = pos;
             if (pos >= end) {
                 return token = 1;
@@ -8250,11 +8661,7 @@ var ts;
                 return token = 18;
             }
             var firstNonWhitespace = 0;
-            var lastNonWhitespace = -1;
             while (pos < end) {
-                if (!isWhiteSpaceSingleLine(char)) {
-                    lastNonWhitespace = pos;
-                }
                 char = text.charCodeAt(pos);
                 if (char === 123) {
                     break;
@@ -8272,18 +8679,18 @@ var ts;
                 if (char === 125) {
                     error(ts.Diagnostics.Unexpected_token_Did_you_mean_or_rbrace, pos, 1);
                 }
-                if (lastNonWhitespace > 0)
-                    lastNonWhitespace++;
                 if (isLineBreak(char) && firstNonWhitespace === 0) {
                     firstNonWhitespace = -1;
                 }
+                else if (!allowMultilineJsxText && isLineBreak(char) && firstNonWhitespace > 0) {
+                    break;
+                }
                 else if (!isWhiteSpaceLike(char)) {
                     firstNonWhitespace = pos;
                 }
                 pos++;
             }
-            var endPosition = lastNonWhitespace === -1 ? pos : lastNonWhitespace;
-            tokenValue = text.substring(startPos, endPosition);
+            tokenValue = text.substring(startPos, pos);
             return firstNonWhitespace === -1 ? 12 : 11;
         }
         function scanJsxIdentifier() {
@@ -8300,6 +8707,7 @@ var ts;
                         tokenValue += ":";
                         pos++;
                         namespaceSeparator = true;
+                        token = 79;
                         continue;
                     }
                     var oldPos = pos;
@@ -8371,13 +8779,15 @@ var ts;
                 case 62:
                     return token = 31;
                 case 61:
-                    return token = 62;
+                    return token = 63;
                 case 44:
                     return token = 27;
                 case 46:
                     return token = 24;
                 case 96:
                     return token = 61;
+                case 35:
+                    return token = 62;
                 case 92:
                     pos--;
                     var extendedCookedChar = peekExtendedUnicodeEscape();
@@ -8536,9 +8946,11 @@ var ts;
     }
     ts.sortAndDeduplicateDiagnostics = sortAndDeduplicateDiagnostics;
     function getDefaultLibFileName(options) {
-        switch (options.target) {
+        switch (ts.getEmitScriptTarget(options)) {
             case 99:
                 return "lib.esnext.full.d.ts";
+            case 8:
+                return "lib.es2021.full.d.ts";
             case 7:
                 return "lib.es2020.full.d.ts";
             case 6:
@@ -8666,9 +9078,9 @@ var ts;
     }
     ts.collapseTextChangeRangesAcrossMultipleVersions = collapseTextChangeRangesAcrossMultipleVersions;
     function getTypeParameterOwner(d) {
-        if (d && d.kind === 159) {
+        if (d && d.kind === 162) {
             for (var current = d; current; current = current.parent) {
-                if (isFunctionLike(current) || isClassLike(current) || current.kind === 253) {
+                if (isFunctionLike(current) || isClassLike(current) || current.kind === 257) {
                     return current;
                 }
             }
@@ -8676,7 +9088,7 @@ var ts;
     }
     ts.getTypeParameterOwner = getTypeParameterOwner;
     function isParameterPropertyDeclaration(node, parent) {
-        return ts.hasSyntacticModifier(node, 92) && parent.kind === 166;
+        return ts.hasSyntacticModifier(node, 16476) && parent.kind === 170;
     }
     ts.isParameterPropertyDeclaration = isParameterPropertyDeclaration;
     function isEmptyBindingPattern(node) {
@@ -8706,14 +9118,14 @@ var ts;
             node = walkUpBindingElementsAndPatterns(node);
         }
         var flags = getFlags(node);
-        if (node.kind === 249) {
+        if (node.kind === 253) {
             node = node.parent;
         }
-        if (node && node.kind === 250) {
+        if (node && node.kind === 254) {
             flags |= getFlags(node);
             node = node.parent;
         }
-        if (node && node.kind === 232) {
+        if (node && node.kind === 236) {
             flags |= getFlags(node);
         }
         return flags;
@@ -8834,7 +9246,7 @@ var ts;
     }
     ts.idText = idText;
     function symbolName(symbol) {
-        if (symbol.valueDeclaration && isPrivateIdentifierPropertyDeclaration(symbol.valueDeclaration)) {
+        if (symbol.valueDeclaration && isPrivateIdentifierClassElementDeclaration(symbol.valueDeclaration)) {
             return idText(symbol.valueDeclaration.name);
         }
         return unescapeLeadingUnderscores(symbol.escapedName);
@@ -8849,30 +9261,30 @@ var ts;
             return getDeclarationIdentifier(hostNode);
         }
         switch (hostNode.kind) {
-            case 232:
+            case 236:
                 if (hostNode.declarationList && hostNode.declarationList.declarations[0]) {
                     return getDeclarationIdentifier(hostNode.declarationList.declarations[0]);
                 }
                 break;
-            case 233:
+            case 237:
                 var expr = hostNode.expression;
-                if (expr.kind === 216 && expr.operatorToken.kind === 62) {
+                if (expr.kind === 220 && expr.operatorToken.kind === 63) {
                     expr = expr.left;
                 }
                 switch (expr.kind) {
-                    case 201:
+                    case 205:
                         return expr.name;
-                    case 202:
+                    case 206:
                         var arg = expr.argumentExpression;
                         if (ts.isIdentifier(arg)) {
                             return arg;
                         }
                 }
                 break;
-            case 207: {
+            case 211: {
                 return getDeclarationIdentifier(hostNode.expression);
             }
-            case 245: {
+            case 249: {
                 if (isDeclaration(hostNode.statement) || isExpression(hostNode.statement)) {
                     return getDeclarationIdentifier(hostNode.statement);
                 }
@@ -8904,18 +9316,18 @@ var ts;
     ts.isNamedDeclaration = isNamedDeclaration;
     function getNonAssignedNameOfDeclaration(declaration) {
         switch (declaration.kind) {
-            case 78:
+            case 79:
                 return declaration;
-            case 333:
-            case 326: {
+            case 345:
+            case 338: {
                 var name = declaration.name;
-                if (name.kind === 157) {
+                if (name.kind === 160) {
                     return name.right;
                 }
                 break;
             }
-            case 203:
-            case 216: {
+            case 207:
+            case 220: {
                 var expr_1 = declaration;
                 switch (ts.getAssignmentDeclarationKind(expr_1)) {
                     case 1:
@@ -8931,15 +9343,15 @@ var ts;
                         return undefined;
                 }
             }
-            case 331:
+            case 343:
                 return getNameOfJSDocTypedef(declaration);
-            case 325:
+            case 337:
                 return nameForNamelessJSDocTypedef(declaration);
-            case 266: {
+            case 270: {
                 var expression = declaration.expression;
                 return ts.isIdentifier(expression) ? expression : undefined;
             }
-            case 202:
+            case 206:
                 var expr = declaration;
                 if (ts.isBindableStaticElementAccessExpression(expr)) {
                     return expr.argumentExpression;
@@ -8952,7 +9364,7 @@ var ts;
         if (declaration === undefined)
             return undefined;
         return getNonAssignedNameOfDeclaration(declaration) ||
-            (ts.isFunctionExpression(declaration) || ts.isClassExpression(declaration) ? getAssignedName(declaration) : undefined);
+            (ts.isFunctionExpression(declaration) || ts.isArrowFunction(declaration) || ts.isClassExpression(declaration) ? getAssignedName(declaration) : undefined);
     }
     ts.getNameOfDeclaration = getNameOfDeclaration;
     function getAssignedName(node) {
@@ -9062,6 +9474,10 @@ var ts;
         return getFirstJSDocTag(node, ts.isJSDocReadonlyTag, true);
     }
     ts.getJSDocReadonlyTagNoCache = getJSDocReadonlyTagNoCache;
+    function getJSDocOverrideTagNoCache(node) {
+        return getFirstJSDocTag(node, ts.isJSDocOverrideTag, true);
+    }
+    ts.getJSDocOverrideTagNoCache = getJSDocOverrideTagNoCache;
     function getJSDocDeprecatedTag(node) {
         return getFirstJSDocTag(node, ts.isJSDocDeprecatedTag);
     }
@@ -9151,12 +9567,19 @@ var ts;
         return getJSDocTags(node).filter(function (doc) { return doc.kind === kind; });
     }
     ts.getAllJSDocTagsOfKind = getAllJSDocTagsOfKind;
+    function getTextOfJSDocComment(comment) {
+        return typeof comment === "string" ? comment
+            : comment === null || comment === void 0 ? void 0 : comment.map(function (c) {
+                return c.kind === 319 ? c.text : "{@link ".concat(c.name ? ts.entityNameToString(c.name) + " " : "").concat(c.text, "}");
+            }).join("");
+    }
+    ts.getTextOfJSDocComment = getTextOfJSDocComment;
     function getEffectiveTypeParameterDeclarations(node) {
         if (ts.isJSDocSignature(node)) {
             return ts.emptyArray;
         }
         if (ts.isJSDocTypeAlias(node)) {
-            ts.Debug.assert(node.parent.kind === 311);
+            ts.Debug.assert(node.parent.kind === 318);
             return ts.flatMap(node.parent.tags, function (tag) { return ts.isJSDocTemplateTag(tag) ? tag.typeParameters : undefined; });
         }
         if (node.typeParameters) {
@@ -9181,12 +9604,12 @@ var ts;
                 undefined;
     }
     ts.getEffectiveConstraintOfTypeParameter = getEffectiveConstraintOfTypeParameter;
-    function isIdentifierOrPrivateIdentifier(node) {
-        return node.kind === 78 || node.kind === 79;
+    function isMemberName(node) {
+        return node.kind === 79 || node.kind === 80;
     }
-    ts.isIdentifierOrPrivateIdentifier = isIdentifierOrPrivateIdentifier;
+    ts.isMemberName = isMemberName;
     function isGetOrSetAccessorDeclaration(node) {
-        return node.kind === 168 || node.kind === 167;
+        return node.kind === 172 || node.kind === 171;
     }
     ts.isGetOrSetAccessorDeclaration = isGetOrSetAccessorDeclaration;
     function isPropertyAccessChain(node) {
@@ -9204,10 +9627,10 @@ var ts;
     function isOptionalChain(node) {
         var kind = node.kind;
         return !!(node.flags & 32) &&
-            (kind === 201
-                || kind === 202
-                || kind === 203
-                || kind === 225);
+            (kind === 205
+                || kind === 206
+                || kind === 207
+                || kind === 229);
     }
     ts.isOptionalChain = isOptionalChain;
     function isOptionalChainRoot(node) {
@@ -9225,7 +9648,7 @@ var ts;
     }
     ts.isOutermostOptionalChain = isOutermostOptionalChain;
     function isNullishCoalesce(node) {
-        return node.kind === 216 && node.operatorToken.kind === 60;
+        return node.kind === 220 && node.operatorToken.kind === 60;
     }
     ts.isNullishCoalesce = isNullishCoalesce;
     function isConstTypeReference(node) {
@@ -9242,17 +9665,17 @@ var ts;
     }
     ts.isNonNullChain = isNonNullChain;
     function isBreakOrContinueStatement(node) {
-        return node.kind === 241 || node.kind === 240;
+        return node.kind === 245 || node.kind === 244;
     }
     ts.isBreakOrContinueStatement = isBreakOrContinueStatement;
     function isNamedExportBindings(node) {
-        return node.kind === 269 || node.kind === 268;
+        return node.kind === 273 || node.kind === 272;
     }
     ts.isNamedExportBindings = isNamedExportBindings;
     function isUnparsedTextLike(node) {
         switch (node.kind) {
-            case 294:
-            case 295:
+            case 300:
+            case 301:
                 return true;
             default:
                 return false;
@@ -9261,12 +9684,12 @@ var ts;
     ts.isUnparsedTextLike = isUnparsedTextLike;
     function isUnparsedNode(node) {
         return isUnparsedTextLike(node) ||
-            node.kind === 292 ||
-            node.kind === 296;
+            node.kind === 298 ||
+            node.kind === 302;
     }
     ts.isUnparsedNode = isUnparsedNode;
     function isJSDocPropertyLikeTag(node) {
-        return node.kind === 333 || node.kind === 326;
+        return node.kind === 345 || node.kind === 338;
     }
     ts.isJSDocPropertyLikeTag = isJSDocPropertyLikeTag;
     function isNode(node) {
@@ -9274,11 +9697,15 @@ var ts;
     }
     ts.isNode = isNode;
     function isNodeKind(kind) {
-        return kind >= 157;
+        return kind >= 160;
     }
     ts.isNodeKind = isNodeKind;
+    function isTokenKind(kind) {
+        return kind >= 0 && kind <= 159;
+    }
+    ts.isTokenKind = isTokenKind;
     function isToken(n) {
-        return n.kind >= 0 && n.kind <= 156;
+        return isTokenKind(n.kind);
     }
     ts.isToken = isToken;
     function isNodeArray(array) {
@@ -9313,19 +9740,23 @@ var ts;
     ts.isImportOrExportSpecifier = isImportOrExportSpecifier;
     function isTypeOnlyImportOrExportDeclaration(node) {
         switch (node.kind) {
-            case 265:
-            case 270:
-                return node.parent.parent.isTypeOnly;
-            case 263:
+            case 269:
+            case 274:
+                return node.isTypeOnly || node.parent.parent.isTypeOnly;
+            case 267:
                 return node.parent.isTypeOnly;
-            case 262:
-            case 260:
+            case 266:
+            case 264:
                 return node.isTypeOnly;
             default:
                 return false;
         }
     }
     ts.isTypeOnlyImportOrExportDeclaration = isTypeOnlyImportOrExportDeclaration;
+    function isAssertionKey(node) {
+        return ts.isStringLiteral(node) || ts.isIdentifier(node);
+    }
+    ts.isAssertionKey = isAssertionKey;
     function isStringTextContainingNode(node) {
         return node.kind === 10 || isTemplateLiteralKind(node.kind);
     }
@@ -9334,38 +9765,39 @@ var ts;
         return ts.isIdentifier(node) && (node.autoGenerateFlags & 7) > 0;
     }
     ts.isGeneratedIdentifier = isGeneratedIdentifier;
-    function isPrivateIdentifierPropertyDeclaration(node) {
-        return ts.isPropertyDeclaration(node) && ts.isPrivateIdentifier(node.name);
+    function isPrivateIdentifierClassElementDeclaration(node) {
+        return (ts.isPropertyDeclaration(node) || isMethodOrAccessor(node)) && ts.isPrivateIdentifier(node.name);
     }
-    ts.isPrivateIdentifierPropertyDeclaration = isPrivateIdentifierPropertyDeclaration;
+    ts.isPrivateIdentifierClassElementDeclaration = isPrivateIdentifierClassElementDeclaration;
     function isPrivateIdentifierPropertyAccessExpression(node) {
         return ts.isPropertyAccessExpression(node) && ts.isPrivateIdentifier(node.name);
     }
     ts.isPrivateIdentifierPropertyAccessExpression = isPrivateIdentifierPropertyAccessExpression;
     function isModifierKind(token) {
         switch (token) {
-            case 125:
-            case 129:
-            case 84:
-            case 133:
-            case 87:
-            case 92:
-            case 122:
-            case 120:
-            case 121:
-            case 142:
+            case 126:
+            case 131:
+            case 85:
+            case 135:
+            case 88:
+            case 93:
             case 123:
+            case 121:
+            case 122:
+            case 144:
+            case 124:
+            case 158:
                 return true;
         }
         return false;
     }
     ts.isModifierKind = isModifierKind;
     function isParameterPropertyModifier(kind) {
-        return !!(ts.modifierToFlag(kind) & 92);
+        return !!(ts.modifierToFlag(kind) & 16476);
     }
     ts.isParameterPropertyModifier = isParameterPropertyModifier;
     function isClassMemberModifier(idToken) {
-        return isParameterPropertyModifier(idToken) || idToken === 123;
+        return isParameterPropertyModifier(idToken) || idToken === 124 || idToken === 158;
     }
     ts.isClassMemberModifier = isClassMemberModifier;
     function isModifier(node) {
@@ -9374,43 +9806,51 @@ var ts;
     ts.isModifier = isModifier;
     function isEntityName(node) {
         var kind = node.kind;
-        return kind === 157
-            || kind === 78;
+        return kind === 160
+            || kind === 79;
     }
     ts.isEntityName = isEntityName;
     function isPropertyName(node) {
         var kind = node.kind;
-        return kind === 78
-            || kind === 79
+        return kind === 79
+            || kind === 80
             || kind === 10
             || kind === 8
-            || kind === 158;
+            || kind === 161;
     }
     ts.isPropertyName = isPropertyName;
     function isBindingName(node) {
         var kind = node.kind;
-        return kind === 78
-            || kind === 196
-            || kind === 197;
+        return kind === 79
+            || kind === 200
+            || kind === 201;
     }
     ts.isBindingName = isBindingName;
     function isFunctionLike(node) {
-        return node && isFunctionLikeKind(node.kind);
+        return !!node && isFunctionLikeKind(node.kind);
     }
     ts.isFunctionLike = isFunctionLike;
+    function isFunctionLikeOrClassStaticBlockDeclaration(node) {
+        return !!node && (isFunctionLikeKind(node.kind) || ts.isClassStaticBlockDeclaration(node));
+    }
+    ts.isFunctionLikeOrClassStaticBlockDeclaration = isFunctionLikeOrClassStaticBlockDeclaration;
     function isFunctionLikeDeclaration(node) {
         return node && isFunctionLikeDeclarationKind(node.kind);
     }
     ts.isFunctionLikeDeclaration = isFunctionLikeDeclaration;
+    function isBooleanLiteral(node) {
+        return node.kind === 110 || node.kind === 95;
+    }
+    ts.isBooleanLiteral = isBooleanLiteral;
     function isFunctionLikeDeclarationKind(kind) {
         switch (kind) {
-            case 251:
-            case 165:
-            case 166:
-            case 167:
+            case 255:
             case 168:
-            case 208:
-            case 209:
+            case 170:
+            case 171:
+            case 172:
+            case 212:
+            case 213:
                 return true;
             default:
                 return false;
@@ -9418,14 +9858,14 @@ var ts;
     }
     function isFunctionLikeKind(kind) {
         switch (kind) {
-            case 164:
-            case 169:
-            case 313:
-            case 170:
-            case 171:
+            case 167:
+            case 173:
+            case 321:
             case 174:
-            case 308:
             case 175:
+            case 178:
+            case 315:
+            case 179:
                 return true;
             default:
                 return isFunctionLikeDeclarationKind(kind);
@@ -9438,28 +9878,29 @@ var ts;
     ts.isFunctionOrModuleBlock = isFunctionOrModuleBlock;
     function isClassElement(node) {
         var kind = node.kind;
-        return kind === 166
-            || kind === 163
-            || kind === 165
-            || kind === 167
+        return kind === 170
+            || kind === 166
             || kind === 168
             || kind === 171
-            || kind === 229;
+            || kind === 172
+            || kind === 175
+            || kind === 169
+            || kind === 233;
     }
     ts.isClassElement = isClassElement;
     function isClassLike(node) {
-        return node && (node.kind === 252 || node.kind === 221);
+        return node && (node.kind === 256 || node.kind === 225);
     }
     ts.isClassLike = isClassLike;
     function isAccessor(node) {
-        return node && (node.kind === 167 || node.kind === 168);
+        return node && (node.kind === 171 || node.kind === 172);
     }
     ts.isAccessor = isAccessor;
     function isMethodOrAccessor(node) {
         switch (node.kind) {
-            case 165:
-            case 167:
             case 168:
+            case 171:
+            case 172:
                 return true;
             default:
                 return false;
@@ -9468,11 +9909,11 @@ var ts;
     ts.isMethodOrAccessor = isMethodOrAccessor;
     function isTypeElement(node) {
         var kind = node.kind;
-        return kind === 170
-            || kind === 169
-            || kind === 162
-            || kind === 164
-            || kind === 171;
+        return kind === 174
+            || kind === 173
+            || kind === 165
+            || kind === 167
+            || kind === 175;
     }
     ts.isTypeElement = isTypeElement;
     function isClassOrTypeElement(node) {
@@ -9481,12 +9922,12 @@ var ts;
     ts.isClassOrTypeElement = isClassOrTypeElement;
     function isObjectLiteralElementLike(node) {
         var kind = node.kind;
-        return kind === 288
-            || kind === 289
-            || kind === 290
-            || kind === 165
-            || kind === 167
-            || kind === 168;
+        return kind === 294
+            || kind === 295
+            || kind === 296
+            || kind === 168
+            || kind === 171
+            || kind === 172;
     }
     ts.isObjectLiteralElementLike = isObjectLiteralElementLike;
     function isTypeNode(node) {
@@ -9495,8 +9936,8 @@ var ts;
     ts.isTypeNode = isTypeNode;
     function isFunctionOrConstructorTypeNode(node) {
         switch (node.kind) {
-            case 174:
-            case 175:
+            case 178:
+            case 179:
                 return true;
         }
         return false;
@@ -9505,29 +9946,29 @@ var ts;
     function isBindingPattern(node) {
         if (node) {
             var kind = node.kind;
-            return kind === 197
-                || kind === 196;
+            return kind === 201
+                || kind === 200;
         }
         return false;
     }
     ts.isBindingPattern = isBindingPattern;
     function isAssignmentPattern(node) {
         var kind = node.kind;
-        return kind === 199
-            || kind === 200;
+        return kind === 203
+            || kind === 204;
     }
     ts.isAssignmentPattern = isAssignmentPattern;
     function isArrayBindingElement(node) {
         var kind = node.kind;
-        return kind === 198
-            || kind === 222;
+        return kind === 202
+            || kind === 226;
     }
     ts.isArrayBindingElement = isArrayBindingElement;
     function isDeclarationBindingElement(bindingElement) {
         switch (bindingElement.kind) {
-            case 249:
-            case 160:
-            case 198:
+            case 253:
+            case 163:
+            case 202:
                 return true;
         }
         return false;
@@ -9540,17 +9981,28 @@ var ts;
     ts.isBindingOrAssignmentPattern = isBindingOrAssignmentPattern;
     function isObjectBindingOrAssignmentPattern(node) {
         switch (node.kind) {
-            case 196:
             case 200:
+            case 204:
                 return true;
         }
         return false;
     }
     ts.isObjectBindingOrAssignmentPattern = isObjectBindingOrAssignmentPattern;
+    function isObjectBindingOrAssignmentElement(node) {
+        switch (node.kind) {
+            case 202:
+            case 294:
+            case 295:
+            case 296:
+                return true;
+        }
+        return false;
+    }
+    ts.isObjectBindingOrAssignmentElement = isObjectBindingOrAssignmentElement;
     function isArrayBindingOrAssignmentPattern(node) {
         switch (node.kind) {
-            case 197:
-            case 199:
+            case 201:
+            case 203:
                 return true;
         }
         return false;
@@ -9558,25 +10010,25 @@ var ts;
     ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
     function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
         var kind = node.kind;
-        return kind === 201
-            || kind === 157
-            || kind === 195;
+        return kind === 205
+            || kind === 160
+            || kind === 199;
     }
     ts.isPropertyAccessOrQualifiedNameOrImportTypeNode = isPropertyAccessOrQualifiedNameOrImportTypeNode;
     function isPropertyAccessOrQualifiedName(node) {
         var kind = node.kind;
-        return kind === 201
-            || kind === 157;
+        return kind === 205
+            || kind === 160;
     }
     ts.isPropertyAccessOrQualifiedName = isPropertyAccessOrQualifiedName;
     function isCallLikeExpression(node) {
         switch (node.kind) {
-            case 275:
-            case 274:
-            case 203:
-            case 204:
-            case 205:
-            case 161:
+            case 279:
+            case 278:
+            case 207:
+            case 208:
+            case 209:
+            case 164:
                 return true;
             default:
                 return false;
@@ -9584,12 +10036,12 @@ var ts;
     }
     ts.isCallLikeExpression = isCallLikeExpression;
     function isCallOrNewExpression(node) {
-        return node.kind === 203 || node.kind === 204;
+        return node.kind === 207 || node.kind === 208;
     }
     ts.isCallOrNewExpression = isCallOrNewExpression;
     function isTemplateLiteral(node) {
         var kind = node.kind;
-        return kind === 218
+        return kind === 222
             || kind === 14;
     }
     ts.isTemplateLiteral = isTemplateLiteral;
@@ -9599,34 +10051,35 @@ var ts;
     ts.isLeftHandSideExpression = isLeftHandSideExpression;
     function isLeftHandSideExpressionKind(kind) {
         switch (kind) {
-            case 201:
-            case 202:
-            case 204:
-            case 203:
-            case 273:
-            case 274:
-            case 277:
             case 205:
-            case 199:
-            case 207:
-            case 200:
-            case 221:
+            case 206:
             case 208:
-            case 78:
+            case 207:
+            case 277:
+            case 278:
+            case 281:
+            case 209:
+            case 203:
+            case 211:
+            case 204:
+            case 225:
+            case 212:
+            case 79:
+            case 80:
             case 13:
             case 8:
             case 9:
             case 10:
             case 14:
-            case 218:
-            case 94:
-            case 103:
-            case 107:
-            case 109:
-            case 105:
-            case 225:
-            case 226:
-            case 99:
+            case 222:
+            case 95:
+            case 104:
+            case 108:
+            case 110:
+            case 106:
+            case 229:
+            case 230:
+            case 100:
                 return true;
             default:
                 return false;
@@ -9638,13 +10091,13 @@ var ts;
     ts.isUnaryExpression = isUnaryExpression;
     function isUnaryExpressionKind(kind) {
         switch (kind) {
+            case 218:
+            case 219:
             case 214:
             case 215:
+            case 216:
+            case 217:
             case 210:
-            case 211:
-            case 212:
-            case 213:
-            case 206:
                 return true;
             default:
                 return isLeftHandSideExpressionKind(kind);
@@ -9652,9 +10105,9 @@ var ts;
     }
     function isUnaryExpressionWithWrite(expr) {
         switch (expr.kind) {
-            case 215:
+            case 219:
                 return true;
-            case 214:
+            case 218:
                 return expr.operator === 45 ||
                     expr.operator === 46;
             default:
@@ -9668,15 +10121,15 @@ var ts;
     ts.isExpression = isExpression;
     function isExpressionKind(kind) {
         switch (kind) {
-            case 217:
-            case 219:
-            case 209:
-            case 216:
+            case 221:
+            case 223:
+            case 213:
             case 220:
             case 224:
-            case 222:
-            case 337:
-            case 336:
+            case 228:
+            case 226:
+            case 349:
+            case 348:
                 return true;
             default:
                 return isUnaryExpressionKind(kind);
@@ -9684,8 +10137,8 @@ var ts;
     }
     function isAssertionExpression(node) {
         var kind = node.kind;
-        return kind === 206
-            || kind === 224;
+        return kind === 210
+            || kind === 228;
     }
     ts.isAssertionExpression = isAssertionExpression;
     function isNotEmittedOrPartiallyEmittedNode(node) {
@@ -9695,13 +10148,13 @@ var ts;
     ts.isNotEmittedOrPartiallyEmittedNode = isNotEmittedOrPartiallyEmittedNode;
     function isIterationStatement(node, lookInLabeledStatements) {
         switch (node.kind) {
-            case 237:
-            case 238:
+            case 241:
+            case 242:
+            case 243:
             case 239:
-            case 235:
-            case 236:
+            case 240:
                 return true;
-            case 245:
+            case 249:
                 return lookInLabeledStatements && isIterationStatement(node.statement, lookInLabeledStatements);
         }
         return false;
@@ -9724,7 +10177,7 @@ var ts;
     }
     ts.isExternalModuleIndicator = isExternalModuleIndicator;
     function isForInOrOfStatement(node) {
-        return node.kind === 238 || node.kind === 239;
+        return node.kind === 242 || node.kind === 243;
     }
     ts.isForInOrOfStatement = isForInOrOfStatement;
     function isConciseBody(node) {
@@ -9743,109 +10196,110 @@ var ts;
     ts.isForInitializer = isForInitializer;
     function isModuleBody(node) {
         var kind = node.kind;
-        return kind === 257
-            || kind === 256
-            || kind === 78;
+        return kind === 261
+            || kind === 260
+            || kind === 79;
     }
     ts.isModuleBody = isModuleBody;
     function isNamespaceBody(node) {
         var kind = node.kind;
-        return kind === 257
-            || kind === 256;
+        return kind === 261
+            || kind === 260;
     }
     ts.isNamespaceBody = isNamespaceBody;
     function isJSDocNamespaceBody(node) {
         var kind = node.kind;
-        return kind === 78
-            || kind === 256;
+        return kind === 79
+            || kind === 260;
     }
     ts.isJSDocNamespaceBody = isJSDocNamespaceBody;
     function isNamedImportBindings(node) {
         var kind = node.kind;
-        return kind === 264
-            || kind === 263;
+        return kind === 268
+            || kind === 267;
     }
     ts.isNamedImportBindings = isNamedImportBindings;
     function isModuleOrEnumDeclaration(node) {
-        return node.kind === 256 || node.kind === 255;
+        return node.kind === 260 || node.kind === 259;
     }
     ts.isModuleOrEnumDeclaration = isModuleOrEnumDeclaration;
     function isDeclarationKind(kind) {
-        return kind === 209
-            || kind === 198
-            || kind === 252
-            || kind === 221
-            || kind === 166
+        return kind === 213
+            || kind === 202
+            || kind === 256
+            || kind === 225
+            || kind === 169
+            || kind === 170
+            || kind === 259
+            || kind === 297
+            || kind === 274
             || kind === 255
-            || kind === 291
-            || kind === 270
-            || kind === 251
-            || kind === 208
+            || kind === 212
+            || kind === 171
+            || kind === 266
+            || kind === 264
+            || kind === 269
+            || kind === 257
+            || kind === 284
+            || kind === 168
             || kind === 167
-            || kind === 262
             || kind === 260
-            || kind === 265
-            || kind === 253
-            || kind === 280
-            || kind === 165
-            || kind === 164
-            || kind === 256
-            || kind === 259
             || kind === 263
-            || kind === 269
-            || kind === 160
-            || kind === 288
+            || kind === 267
+            || kind === 273
             || kind === 163
+            || kind === 294
+            || kind === 166
+            || kind === 165
+            || kind === 172
+            || kind === 295
+            || kind === 258
             || kind === 162
-            || kind === 168
-            || kind === 289
-            || kind === 254
-            || kind === 159
-            || kind === 249
-            || kind === 331
-            || kind === 324
-            || kind === 333;
+            || kind === 253
+            || kind === 343
+            || kind === 336
+            || kind === 345;
     }
     function isDeclarationStatementKind(kind) {
-        return kind === 251
-            || kind === 271
-            || kind === 252
-            || kind === 253
-            || kind === 254
-            || kind === 255
+        return kind === 255
+            || kind === 275
             || kind === 256
-            || kind === 261
+            || kind === 257
+            || kind === 258
+            || kind === 259
             || kind === 260
-            || kind === 267
-            || kind === 266
-            || kind === 259;
+            || kind === 265
+            || kind === 264
+            || kind === 271
+            || kind === 270
+            || kind === 263;
     }
     function isStatementKindButNotDeclarationKind(kind) {
-        return kind === 241
-            || kind === 240
-            || kind === 248
-            || kind === 235
-            || kind === 233
-            || kind === 231
-            || kind === 238
+        return kind === 245
+            || kind === 244
+            || kind === 252
             || kind === 239
             || kind === 237
-            || kind === 234
-            || kind === 245
+            || kind === 235
             || kind === 242
-            || kind === 244
+            || kind === 243
+            || kind === 241
+            || kind === 238
+            || kind === 249
             || kind === 246
-            || kind === 247
-            || kind === 232
+            || kind === 248
+            || kind === 250
+            || kind === 251
             || kind === 236
-            || kind === 243
-            || kind === 335
-            || kind === 339
-            || kind === 338;
+            || kind === 240
+            || kind === 247
+            || kind === 347
+            || kind === 351
+            || kind === 350;
     }
     function isDeclaration(node) {
-        if (node.kind === 159) {
-            return (node.parent && node.parent.kind !== 330) || ts.isInJSFile(node);
+        if (node.kind === 162) {
+            return (node.parent && node.parent.kind !== 342) || ts.isInJSFile(node);
         }
         return isDeclarationKind(node.kind);
     }
@@ -9866,10 +10320,10 @@ var ts;
     }
     ts.isStatement = isStatement;
     function isBlockStatement(node) {
-        if (node.kind !== 230)
+        if (node.kind !== 234)
             return false;
         if (node.parent !== undefined) {
-            if (node.parent.kind === 247 || node.parent.kind === 287) {
+            if (node.parent.kind === 251 || node.parent.kind === 291) {
                 return false;
             }
         }
@@ -9879,74 +10333,80 @@ var ts;
         var kind = node.kind;
         return isStatementKindButNotDeclarationKind(kind)
             || isDeclarationStatementKind(kind)
-            || kind === 230;
+            || kind === 234;
     }
     ts.isStatementOrBlock = isStatementOrBlock;
     function isModuleReference(node) {
         var kind = node.kind;
-        return kind === 272
-            || kind === 157
-            || kind === 78;
+        return kind === 276
+            || kind === 160
+            || kind === 79;
     }
     ts.isModuleReference = isModuleReference;
     function isJsxTagNameExpression(node) {
         var kind = node.kind;
-        return kind === 107
-            || kind === 78
-            || kind === 201;
+        return kind === 108
+            || kind === 79
+            || kind === 205;
     }
     ts.isJsxTagNameExpression = isJsxTagNameExpression;
     function isJsxChild(node) {
         var kind = node.kind;
-        return kind === 273
-            || kind === 283
-            || kind === 274
+        return kind === 277
+            || kind === 287
+            || kind === 278
             || kind === 11
-            || kind === 277;
+            || kind === 281;
     }
     ts.isJsxChild = isJsxChild;
     function isJsxAttributeLike(node) {
         var kind = node.kind;
-        return kind === 280
-            || kind === 282;
+        return kind === 284
+            || kind === 286;
     }
     ts.isJsxAttributeLike = isJsxAttributeLike;
     function isStringLiteralOrJsxExpression(node) {
         var kind = node.kind;
         return kind === 10
-            || kind === 283;
+            || kind === 287;
     }
     ts.isStringLiteralOrJsxExpression = isStringLiteralOrJsxExpression;
     function isJsxOpeningLikeElement(node) {
         var kind = node.kind;
-        return kind === 275
-            || kind === 274;
+        return kind === 279
+            || kind === 278;
     }
     ts.isJsxOpeningLikeElement = isJsxOpeningLikeElement;
     function isCaseOrDefaultClause(node) {
         var kind = node.kind;
-        return kind === 284
-            || kind === 285;
+        return kind === 288
+            || kind === 289;
     }
     ts.isCaseOrDefaultClause = isCaseOrDefaultClause;
     function isJSDocNode(node) {
-        return node.kind >= 301 && node.kind <= 333;
+        return node.kind >= 307 && node.kind <= 345;
     }
     ts.isJSDocNode = isJSDocNode;
     function isJSDocCommentContainingNode(node) {
-        return node.kind === 311 || node.kind === 310 || isJSDocTag(node) || ts.isJSDocTypeLiteral(node) || ts.isJSDocSignature(node);
+        return node.kind === 318
+            || node.kind === 317
+            || node.kind === 319
+            || isJSDocLinkLike(node)
+            || isJSDocTag(node)
+            || ts.isJSDocTypeLiteral(node)
+            || ts.isJSDocSignature(node);
     }
     ts.isJSDocCommentContainingNode = isJSDocCommentContainingNode;
     function isJSDocTag(node) {
-        return node.kind >= 314 && node.kind <= 333;
+        return node.kind >= 325 && node.kind <= 345;
     }
     ts.isJSDocTag = isJSDocTag;
     function isSetAccessor(node) {
-        return node.kind === 168;
+        return node.kind === 172;
     }
     ts.isSetAccessor = isSetAccessor;
     function isGetAccessor(node) {
-        return node.kind === 167;
+        return node.kind === 171;
     }
     ts.isGetAccessor = isGetAccessor;
     function hasJSDocNodes(node) {
@@ -9964,13 +10424,13 @@ var ts;
     ts.hasInitializer = hasInitializer;
     function hasOnlyExpressionInitializer(node) {
         switch (node.kind) {
-            case 249:
-            case 160:
-            case 198:
-            case 162:
+            case 253:
             case 163:
-            case 288:
-            case 291:
+            case 202:
+            case 165:
+            case 166:
+            case 294:
+            case 297:
                 return true;
             default:
                 return false;
@@ -9978,11 +10438,11 @@ var ts;
     }
     ts.hasOnlyExpressionInitializer = hasOnlyExpressionInitializer;
     function isObjectLiteralElement(node) {
-        return node.kind === 280 || node.kind === 282 || isObjectLiteralElementLike(node);
+        return node.kind === 284 || node.kind === 286 || isObjectLiteralElementLike(node);
     }
     ts.isObjectLiteralElement = isObjectLiteralElement;
     function isTypeReferenceType(node) {
-        return node.kind === 173 || node.kind === 223;
+        return node.kind === 177 || node.kind === 227;
     }
     ts.isTypeReferenceType = isTypeReferenceType;
     var MAX_SMI_X86 = 1073741823;
@@ -10013,6 +10473,10 @@ var ts;
         return node.kind === 10 || node.kind === 14;
     }
     ts.isStringLiteralLike = isStringLiteralLike;
+    function isJSDocLinkLike(node) {
+        return node.kind === 322 || node.kind === 323 || node.kind === 324;
+    }
+    ts.isJSDocLinkLike = isJSDocLinkLike;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -10086,7 +10550,7 @@ var ts;
             increaseIndent: ts.noop,
             decreaseIndent: ts.noop,
             clear: function () { return str = ""; },
-            trackSymbol: ts.noop,
+            trackSymbol: function () { return false; },
             reportInaccessibleThisError: ts.noop,
             reportInaccessibleUniqueSymbolError: ts.noop,
             reportPrivateInBaseOfClassExpression: ts.noop,
@@ -10098,11 +10562,19 @@ var ts;
     }
     ts.changesAffectModuleResolution = changesAffectModuleResolution;
     function optionsHaveModuleResolutionChanges(oldOptions, newOptions) {
-        return ts.moduleResolutionOptionDeclarations.some(function (o) {
+        return optionsHaveChanges(oldOptions, newOptions, ts.moduleResolutionOptionDeclarations);
+    }
+    ts.optionsHaveModuleResolutionChanges = optionsHaveModuleResolutionChanges;
+    function changesAffectingProgramStructure(oldOptions, newOptions) {
+        return optionsHaveChanges(oldOptions, newOptions, ts.optionsAffectingProgramStructure);
+    }
+    ts.changesAffectingProgramStructure = changesAffectingProgramStructure;
+    function optionsHaveChanges(oldOptions, newOptions, optionDeclarations) {
+        return oldOptions !== newOptions && optionDeclarations.some(function (o) {
             return !isJsonEqual(getCompilerOptionValue(oldOptions, o), getCompilerOptionValue(newOptions, o));
         });
     }
-    ts.optionsHaveModuleResolutionChanges = optionsHaveModuleResolutionChanges;
+    ts.optionsHaveChanges = optionsHaveChanges;
     function forEachAncestor(node, callback) {
         while (true) {
             var res = callback(node);
@@ -10161,22 +10633,22 @@ var ts;
         return node.end - node.pos;
     }
     ts.getFullWidth = getFullWidth;
-    function getResolvedModule(sourceFile, moduleNameText) {
-        return sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText);
+    function getResolvedModule(sourceFile, moduleNameText, mode) {
+        return sourceFile && sourceFile.resolvedModules && sourceFile.resolvedModules.get(moduleNameText, mode);
     }
     ts.getResolvedModule = getResolvedModule;
-    function setResolvedModule(sourceFile, moduleNameText, resolvedModule) {
+    function setResolvedModule(sourceFile, moduleNameText, resolvedModule, mode) {
         if (!sourceFile.resolvedModules) {
-            sourceFile.resolvedModules = new ts.Map();
+            sourceFile.resolvedModules = ts.createModeAwareCache();
         }
-        sourceFile.resolvedModules.set(moduleNameText, resolvedModule);
+        sourceFile.resolvedModules.set(moduleNameText, mode, resolvedModule);
     }
     ts.setResolvedModule = setResolvedModule;
     function setResolvedTypeReferenceDirective(sourceFile, typeReferenceDirectiveName, resolvedTypeReferenceDirective) {
         if (!sourceFile.resolvedTypeReferenceDirectiveNames) {
-            sourceFile.resolvedTypeReferenceDirectiveNames = new ts.Map();
+            sourceFile.resolvedTypeReferenceDirectiveNames = ts.createModeAwareCache();
         }
-        sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, resolvedTypeReferenceDirective);
+        sourceFile.resolvedTypeReferenceDirectiveNames.set(typeReferenceDirectiveName, undefined, resolvedTypeReferenceDirective);
     }
     ts.setResolvedTypeReferenceDirective = setResolvedTypeReferenceDirective;
     function projectReferenceIsEqualTo(oldRef, newRef) {
@@ -10198,19 +10670,21 @@ var ts;
     }
     function packageIdToString(_a) {
         var name = _a.name, subModuleName = _a.subModuleName, version = _a.version;
-        var fullName = subModuleName ? name + "/" + subModuleName : name;
-        return fullName + "@" + version;
+        var fullName = subModuleName ? "".concat(name, "/").concat(subModuleName) : name;
+        return "".concat(fullName, "@").concat(version);
     }
     ts.packageIdToString = packageIdToString;
     function typeDirectiveIsEqualTo(oldResolution, newResolution) {
-        return oldResolution.resolvedFileName === newResolution.resolvedFileName && oldResolution.primary === newResolution.primary;
+        return oldResolution.resolvedFileName === newResolution.resolvedFileName
+            && oldResolution.primary === newResolution.primary
+            && oldResolution.originalPath === newResolution.originalPath;
     }
     ts.typeDirectiveIsEqualTo = typeDirectiveIsEqualTo;
-    function hasChangesInResolutions(names, newResolutions, oldResolutions, comparer) {
+    function hasChangesInResolutions(names, newResolutions, oldResolutions, oldSourceFile, comparer) {
         ts.Debug.assert(names.length === newResolutions.length);
         for (var i = 0; i < names.length; i++) {
             var newResolution = newResolutions[i];
-            var oldResolution = oldResolutions && oldResolutions.get(names[i]);
+            var oldResolution = oldResolutions && oldResolutions.get(names[i], oldSourceFile && ts.getModeForResolutionAtIndex(oldSourceFile, i));
             var changed = oldResolution
                 ? !newResolution || !comparer(oldResolution, newResolution)
                 : newResolution;
@@ -10237,19 +10711,23 @@ var ts;
         }
     }
     function getSourceFileOfNode(node) {
-        while (node && node.kind !== 297) {
+        while (node && node.kind !== 303) {
             node = node.parent;
         }
         return node;
     }
     ts.getSourceFileOfNode = getSourceFileOfNode;
+    function getSourceFileOfModule(module) {
+        return getSourceFileOfNode(module.valueDeclaration || getNonAugmentationDeclaration(module));
+    }
+    ts.getSourceFileOfModule = getSourceFileOfModule;
     function isStatementWithLocals(node) {
         switch (node.kind) {
-            case 230:
-            case 258:
-            case 237:
-            case 238:
-            case 239:
+            case 234:
+            case 262:
+            case 241:
+            case 242:
+            case 243:
                 return true;
         }
         return false;
@@ -10263,7 +10741,7 @@ var ts;
     function nodePosToString(node) {
         var file = getSourceFileOfNode(node);
         var loc = ts.getLineAndCharacterOfPosition(file, node.pos);
-        return file.fileName + "(" + (loc.line + 1) + "," + (loc.character + 1) + ")";
+        return "".concat(file.fileName, "(").concat(loc.line + 1, ",").concat(loc.character + 1, ")");
     }
     ts.nodePosToString = nodePosToString;
     function getEndLinePosition(line, sourceFile) {
@@ -10309,7 +10787,7 @@ var ts;
                 break;
             }
         }
-        to.splice.apply(to, __spreadArray([statementIndex, 0], from));
+        to.splice.apply(to, __spreadArray([statementIndex, 0], from, false));
         return to;
     }
     function insertStatementAfterPrologue(to, statement, isPrologueDirective) {
@@ -10348,10 +10826,10 @@ var ts;
             commentPos + 2 < commentEnd &&
             text.charCodeAt(commentPos + 2) === 47) {
             var textSubStr = text.substring(commentPos, commentEnd);
-            return textSubStr.match(ts.fullTripleSlashReferencePathRegEx) ||
-                textSubStr.match(ts.fullTripleSlashAMDReferencePathRegEx) ||
-                textSubStr.match(fullTripleSlashReferenceTypeReferenceDirectiveRegEx) ||
-                textSubStr.match(defaultLibReferenceRegEx) ?
+            return ts.fullTripleSlashReferencePathRegEx.test(textSubStr) ||
+                ts.fullTripleSlashAMDReferencePathRegEx.test(textSubStr) ||
+                fullTripleSlashReferenceTypeReferenceDirectiveRegEx.test(textSubStr) ||
+                defaultLibReferenceRegEx.test(textSubStr) ?
                 true : false;
         }
         return false;
@@ -10364,7 +10842,7 @@ var ts;
     ts.isPinnedComment = isPinnedComment;
     function createCommentDirectivesMap(sourceFile, commentDirectives) {
         var directivesByLine = new ts.Map(commentDirectives.map(function (commentDirective) { return ([
-            "" + ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line,
+            "".concat(ts.getLineAndCharacterOfPosition(sourceFile, commentDirective.range.end).line),
             commentDirective,
         ]); }));
         var usedLines = new ts.Map();
@@ -10381,10 +10859,10 @@ var ts;
             });
         }
         function markUsed(line) {
-            if (!directivesByLine.has("" + line)) {
+            if (!directivesByLine.has("".concat(line))) {
                 return false;
             }
-            usedLines.set("" + line, true);
+            usedLines.set("".concat(line), true);
             return true;
         }
     }
@@ -10399,10 +10877,10 @@ var ts;
         if (includeJsDoc && ts.hasJSDocNodes(node)) {
             return getTokenPosOfNode(node.jsDoc[0], sourceFile);
         }
-        if (node.kind === 334 && node._children.length > 0) {
+        if (node.kind === 346 && node._children.length > 0) {
             return getTokenPosOfNode(node._children[0], sourceFile, includeJsDoc);
         }
-        return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos);
+        return ts.skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, false, false, isInJSDoc(node));
     }
     ts.getTokenPosOfNode = getTokenPosOfNode;
     function getNonDecoratorTokenPosOfNode(node, sourceFile) {
@@ -10431,7 +10909,7 @@ var ts;
         }
         var text = sourceText.substring(includeTrivia ? node.pos : ts.skipTrivia(sourceText, node.pos), node.end);
         if (isJSDocTypeExpressionOrChild(node)) {
-            text = text.replace(/(^|\r?\n|\r)\s*\*\s*/g, "$1");
+            text = text.split(/\r\n|\n|\r/).map(function (line) { return ts.trimStringStart(line.replace(/^\s*\*/, "")); }).join("\n");
         }
         return text;
     }
@@ -10513,15 +10991,18 @@ var ts;
                 DataView: ["setBigInt64", "setBigUint64", "getBigInt64", "getBigUint64"],
                 RelativeTimeFormat: ["format", "formatToParts", "resolvedOptions"]
             },
-            esnext: {
+            es2021: {
                 PromiseConstructor: ["any"],
-                String: ["replaceAll"],
+                String: ["replaceAll"]
+            },
+            esnext: {
                 NumberFormat: ["formatToParts"]
             }
         };
     }
     ts.getScriptTargetFeatures = getScriptTargetFeatures;
     function getLiteralText(node, sourceFile, flags) {
+        var _a;
         if (canUseOriginalText(node, flags)) {
             return getSourceTextOfNodeFromSourceFile(sourceFile, node);
         }
@@ -10543,7 +11024,7 @@ var ts;
             case 17: {
                 var escapeText = flags & 1 || (getEmitFlags(node) & 16777216) ? escapeString :
                     escapeNonAsciiString;
-                var rawText = node.rawText || escapeTemplateSubstitution(escapeText(node.text, 96));
+                var rawText = (_a = node.rawText) !== null && _a !== void 0 ? _a : escapeTemplateSubstitution(escapeText(node.text, 96));
                 switch (node.kind) {
                     case 14:
                         return "`" + rawText + "`";
@@ -10565,7 +11046,7 @@ var ts;
                 }
                 return node.text;
         }
-        return ts.Debug.fail("Literal kind '" + node.kind + "' not accounted for.");
+        return ts.Debug.fail("Literal kind '".concat(node.kind, "' not accounted for."));
     }
     ts.getLiteralText = getLiteralText;
     function canUseOriginalText(node, flags) {
@@ -10592,7 +11073,7 @@ var ts;
     ts.isBlockOrCatchScoped = isBlockOrCatchScoped;
     function isCatchClauseVariableDeclarationOrBindingElement(declaration) {
         var node = getRootDeclaration(declaration);
-        return node.kind === 249 && node.parent.kind === 287;
+        return node.kind === 253 && node.parent.kind === 291;
     }
     ts.isCatchClauseVariableDeclarationOrBindingElement = isCatchClauseVariableDeclarationOrBindingElement;
     function isAmbientModule(node) {
@@ -10616,12 +11097,12 @@ var ts;
     }
     ts.isShorthandAmbientModuleSymbol = isShorthandAmbientModuleSymbol;
     function isShorthandAmbientModule(node) {
-        return node && node.kind === 256 && (!node.body);
+        return !!node && node.kind === 260 && (!node.body);
     }
     function isBlockScopedContainerTopLevel(node) {
-        return node.kind === 297 ||
-            node.kind === 256 ||
-            ts.isFunctionLike(node);
+        return node.kind === 303 ||
+            node.kind === 260 ||
+            ts.isFunctionLikeOrClassStaticBlockDeclaration(node);
     }
     ts.isBlockScopedContainerTopLevel = isBlockScopedContainerTopLevel;
     function isGlobalScopeAugmentation(module) {
@@ -10634,20 +11115,24 @@ var ts;
     ts.isExternalModuleAugmentation = isExternalModuleAugmentation;
     function isModuleAugmentationExternal(node) {
         switch (node.parent.kind) {
-            case 297:
+            case 303:
                 return ts.isExternalModule(node.parent);
-            case 257:
+            case 261:
                 return isAmbientModule(node.parent.parent) && ts.isSourceFile(node.parent.parent.parent) && !ts.isExternalModule(node.parent.parent.parent);
         }
         return false;
     }
     ts.isModuleAugmentationExternal = isModuleAugmentationExternal;
     function getNonAugmentationDeclaration(symbol) {
-        return ts.find(symbol.declarations, function (d) { return !isExternalModuleAugmentation(d) && !(ts.isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); });
+        var _a;
+        return (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return !isExternalModuleAugmentation(d) && !(ts.isModuleDeclaration(d) && isGlobalScopeAugmentation(d)); });
     }
     ts.getNonAugmentationDeclaration = getNonAugmentationDeclaration;
+    function isCommonJSContainingModuleKind(kind) {
+        return kind === ts.ModuleKind.CommonJS || kind === ts.ModuleKind.Node12 || kind === ts.ModuleKind.NodeNext;
+    }
     function isEffectiveExternalModule(node, compilerOptions) {
-        return ts.isExternalModule(node) || compilerOptions.isolatedModules || ((getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS) && !!node.commonJsModuleIndicator);
+        return ts.isExternalModule(node) || compilerOptions.isolatedModules || (isCommonJSContainingModuleKind(getEmitModuleKind(compilerOptions)) && !!node.commonJsModuleIndicator);
     }
     ts.isEffectiveExternalModule = isEffectiveExternalModule;
     function isEffectiveStrictModeSourceFile(node, compilerOptions) {
@@ -10680,32 +11165,34 @@ var ts;
     ts.isEffectiveStrictModeSourceFile = isEffectiveStrictModeSourceFile;
     function isBlockScope(node, parentNode) {
         switch (node.kind) {
-            case 297:
-            case 258:
-            case 287:
-            case 256:
-            case 237:
-            case 238:
-            case 239:
-            case 166:
-            case 165:
-            case 167:
+            case 303:
+            case 262:
+            case 291:
+            case 260:
+            case 241:
+            case 242:
+            case 243:
+            case 170:
             case 168:
-            case 251:
-            case 208:
-            case 209:
+            case 171:
+            case 172:
+            case 255:
+            case 212:
+            case 213:
+            case 166:
+            case 169:
                 return true;
-            case 230:
-                return !ts.isFunctionLike(parentNode);
+            case 234:
+                return !ts.isFunctionLikeOrClassStaticBlockDeclaration(parentNode);
         }
         return false;
     }
     ts.isBlockScope = isBlockScope;
     function isDeclarationWithTypeParameters(node) {
         switch (node.kind) {
-            case 324:
-            case 331:
-            case 313:
+            case 336:
+            case 343:
+            case 321:
                 return true;
             default:
                 ts.assertType(node);
@@ -10715,25 +11202,25 @@ var ts;
     ts.isDeclarationWithTypeParameters = isDeclarationWithTypeParameters;
     function isDeclarationWithTypeParameterChildren(node) {
         switch (node.kind) {
-            case 169:
-            case 170:
-            case 164:
-            case 171:
+            case 173:
             case 174:
-            case 175:
-            case 308:
-            case 252:
-            case 221:
-            case 253:
-            case 254:
-            case 330:
-            case 251:
-            case 165:
-            case 166:
             case 167:
+            case 175:
+            case 178:
+            case 179:
+            case 315:
+            case 256:
+            case 225:
+            case 257:
+            case 258:
+            case 342:
+            case 255:
             case 168:
-            case 208:
-            case 209:
+            case 170:
+            case 171:
+            case 172:
+            case 212:
+            case 213:
                 return true;
             default:
                 ts.assertType(node);
@@ -10743,8 +11230,8 @@ var ts;
     ts.isDeclarationWithTypeParameterChildren = isDeclarationWithTypeParameterChildren;
     function isAnyImportSyntax(node) {
         switch (node.kind) {
-            case 261:
-            case 260:
+            case 265:
+            case 264:
                 return true;
             default:
                 return false;
@@ -10753,15 +11240,15 @@ var ts;
     ts.isAnyImportSyntax = isAnyImportSyntax;
     function isLateVisibilityPaintedStatement(node) {
         switch (node.kind) {
-            case 261:
-            case 260:
-            case 232:
-            case 252:
-            case 251:
+            case 265:
+            case 264:
+            case 236:
             case 256:
-            case 254:
-            case 253:
             case 255:
+            case 260:
+            case 258:
+            case 257:
+            case 259:
                 return true;
             default:
                 return false;
@@ -10780,6 +11267,14 @@ var ts;
         return ts.findAncestor(node.parent, function (current) { return isBlockScope(current, current.parent); });
     }
     ts.getEnclosingBlockScopeContainer = getEnclosingBlockScopeContainer;
+    function forEachEnclosingBlockScopeContainer(node, cb) {
+        var container = getEnclosingBlockScopeContainer(node);
+        while (container) {
+            cb(container);
+            container = getEnclosingBlockScopeContainer(container);
+        }
+    }
+    ts.forEachEnclosingBlockScopeContainer = forEachEnclosingBlockScopeContainer;
     function declarationNameToString(name) {
         return !name || getFullWidth(name) === 0 ? "(Missing)" : getTextOfNode(name);
     }
@@ -10789,19 +11284,19 @@ var ts;
     }
     ts.getNameFromIndexInfo = getNameFromIndexInfo;
     function isComputedNonLiteralName(name) {
-        return name.kind === 158 && !isStringOrNumericLiteralLike(name.expression);
+        return name.kind === 161 && !isStringOrNumericLiteralLike(name.expression);
     }
     ts.isComputedNonLiteralName = isComputedNonLiteralName;
     function getTextOfPropertyName(name) {
         switch (name.kind) {
-            case 78:
             case 79:
+            case 80:
                 return name.escapedText;
             case 10:
             case 8:
             case 14:
                 return ts.escapeLeadingUnderscores(name.text);
-            case 158:
+            case 161:
                 if (isStringOrNumericLiteralLike(name.expression))
                     return ts.escapeLeadingUnderscores(name.expression.text);
                 return ts.Debug.fail("Text of property name cannot be read from non-literal-valued ComputedPropertyNames");
@@ -10812,20 +11307,22 @@ var ts;
     ts.getTextOfPropertyName = getTextOfPropertyName;
     function entityNameToString(name) {
         switch (name.kind) {
-            case 107:
+            case 108:
                 return "this";
+            case 80:
             case 79:
-            case 78:
                 return getFullWidth(name) === 0 ? ts.idText(name) : getTextOfNode(name);
-            case 157:
+            case 160:
                 return entityNameToString(name.left) + "." + entityNameToString(name.right);
-            case 201:
+            case 205:
                 if (ts.isIdentifier(name.name) || ts.isPrivateIdentifier(name.name)) {
                     return entityNameToString(name.expression) + "." + entityNameToString(name.name);
                 }
                 else {
                     return ts.Debug.assertNever(name.name);
                 }
+            case 309:
+                return entityNameToString(name.left) + entityNameToString(name.right);
             default:
                 return ts.Debug.assertNever(name);
         }
@@ -10905,7 +11402,7 @@ var ts;
     ts.getSpanOfTokenAtPosition = getSpanOfTokenAtPosition;
     function getErrorSpanForArrowFunction(sourceFile, node) {
         var pos = ts.skipTrivia(sourceFile.text, node.pos);
-        if (node.body && node.body.kind === 230) {
+        if (node.body && node.body.kind === 234) {
             var startLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.pos).line;
             var endLine = ts.getLineAndCharacterOfPosition(sourceFile, node.body.end).line;
             if (startLine < endLine) {
@@ -10917,34 +11414,35 @@ var ts;
     function getErrorSpanForNode(sourceFile, node) {
         var errorNode = node;
         switch (node.kind) {
-            case 297:
+            case 303:
                 var pos_1 = ts.skipTrivia(sourceFile.text, 0, false);
                 if (pos_1 === sourceFile.text.length) {
                     return ts.createTextSpan(0, 0);
                 }
                 return getSpanOfTokenAtPosition(sourceFile, pos_1);
-            case 249:
-            case 198:
-            case 252:
-            case 221:
             case 253:
+            case 202:
             case 256:
+            case 225:
+            case 257:
+            case 260:
+            case 259:
+            case 297:
             case 255:
-            case 291:
-            case 251:
-            case 208:
-            case 165:
-            case 167:
+            case 212:
             case 168:
-            case 254:
-            case 163:
-            case 162:
+            case 171:
+            case 172:
+            case 258:
+            case 166:
+            case 165:
+            case 267:
                 errorNode = node.name;
                 break;
-            case 209:
+            case 213:
                 return getErrorSpanForArrowFunction(sourceFile, node);
-            case 284:
-            case 285:
+            case 288:
+            case 289:
                 var start = ts.skipTrivia(sourceFile.text, node.pos);
                 var end = node.statements.length > 0 ? node.statements[0].pos : node.end;
                 return ts.createTextSpanFromBounds(start, end);
@@ -10993,16 +11491,16 @@ var ts;
     }
     ts.isLet = isLet;
     function isSuperCall(n) {
-        return n.kind === 203 && n.expression.kind === 105;
+        return n.kind === 207 && n.expression.kind === 106;
     }
     ts.isSuperCall = isSuperCall;
     function isImportCall(n) {
-        return n.kind === 203 && n.expression.kind === 99;
+        return n.kind === 207 && n.expression.kind === 100;
     }
     ts.isImportCall = isImportCall;
     function isImportMeta(n) {
         return ts.isMetaProperty(n)
-            && n.keywordToken === 99
+            && n.keywordToken === 100
             && n.name.escapedText === "meta";
     }
     ts.isImportMeta = isImportMeta;
@@ -11011,7 +11509,7 @@ var ts;
     }
     ts.isLiteralImportTypeNode = isLiteralImportTypeNode;
     function isPrologueDirective(node) {
-        return node.kind === 233
+        return node.kind === 237
             && node.expression.kind === 10;
     }
     ts.isPrologueDirective = isPrologueDirective;
@@ -11039,11 +11537,12 @@ var ts;
     }
     ts.getLeadingCommentRangesOfNode = getLeadingCommentRangesOfNode;
     function getJSDocCommentRanges(node, text) {
-        var commentRanges = (node.kind === 160 ||
-            node.kind === 159 ||
-            node.kind === 208 ||
-            node.kind === 209 ||
-            node.kind === 207) ?
+        var commentRanges = (node.kind === 163 ||
+            node.kind === 162 ||
+            node.kind === 212 ||
+            node.kind === 213 ||
+            node.kind === 211 ||
+            node.kind === 253) ?
             ts.concatenate(ts.getTrailingCommentRanges(text, node.pos), ts.getLeadingCommentRanges(text, node.pos)) :
             ts.getLeadingCommentRanges(text, node.pos);
         return ts.filter(commentRanges, function (comment) {
@@ -11053,84 +11552,84 @@ var ts;
         });
     }
     ts.getJSDocCommentRanges = getJSDocCommentRanges;
-    ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*<reference\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
-    var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)('|")(.+?)\2.*?\/>/;
-    ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)('|")(.+?)\2.*?\/>/;
-    var defaultLibReferenceRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)('|")(.+?)\2\s*\/>/;
+    ts.fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*<reference\s+path\s*=\s*)(('[^']*')|("[^"]*")).*?\/>/;
+    var fullTripleSlashReferenceTypeReferenceDirectiveRegEx = /^(\/\/\/\s*<reference\s+types\s*=\s*)(('[^']*')|("[^"]*")).*?\/>/;
+    ts.fullTripleSlashAMDReferencePathRegEx = /^(\/\/\/\s*<amd-dependency\s+path\s*=\s*)(('[^']*')|("[^"]*")).*?\/>/;
+    var defaultLibReferenceRegEx = /^(\/\/\/\s*<reference\s+no-default-lib\s*=\s*)(('[^']*')|("[^"]*"))\s*\/>/;
     function isPartOfTypeNode(node) {
-        if (172 <= node.kind && node.kind <= 195) {
+        if (176 <= node.kind && node.kind <= 199) {
             return true;
         }
         switch (node.kind) {
-            case 128:
-            case 152:
-            case 144:
-            case 155:
-            case 147:
-            case 131:
-            case 148:
-            case 145:
+            case 130:
+            case 154:
+            case 146:
+            case 157:
+            case 149:
+            case 133:
             case 150:
-            case 141:
+            case 147:
+            case 152:
+            case 143:
                 return true;
-            case 113:
-                return node.parent.kind !== 212;
-            case 223:
+            case 114:
+                return node.parent.kind !== 216;
+            case 227:
                 return !isExpressionWithTypeArgumentsInClassExtendsClause(node);
-            case 159:
-                return node.parent.kind === 190 || node.parent.kind === 185;
-            case 78:
-                if (node.parent.kind === 157 && node.parent.right === node) {
+            case 162:
+                return node.parent.kind === 194 || node.parent.kind === 189;
+            case 79:
+                if (node.parent.kind === 160 && node.parent.right === node) {
                     node = node.parent;
                 }
-                else if (node.parent.kind === 201 && node.parent.name === node) {
+                else if (node.parent.kind === 205 && node.parent.name === node) {
                     node = node.parent;
                 }
-                ts.Debug.assert(node.kind === 78 || node.kind === 157 || node.kind === 201, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
-            case 157:
-            case 201:
-            case 107: {
+                ts.Debug.assert(node.kind === 79 || node.kind === 160 || node.kind === 205, "'node' was expected to be a qualified name, identifier or property access in 'isPartOfTypeNode'.");
+            case 160:
+            case 205:
+            case 108: {
                 var parent = node.parent;
-                if (parent.kind === 176) {
+                if (parent.kind === 180) {
                     return false;
                 }
-                if (parent.kind === 195) {
+                if (parent.kind === 199) {
                     return !parent.isTypeOf;
                 }
-                if (172 <= parent.kind && parent.kind <= 195) {
+                if (176 <= parent.kind && parent.kind <= 199) {
                     return true;
                 }
                 switch (parent.kind) {
-                    case 223:
+                    case 227:
                         return !isExpressionWithTypeArgumentsInClassExtendsClause(parent);
-                    case 159:
+                    case 162:
                         return node === parent.constraint;
-                    case 330:
+                    case 342:
                         return node === parent.constraint;
-                    case 163:
-                    case 162:
-                    case 160:
-                    case 249:
-                        return node === parent.type;
-                    case 251:
-                    case 208:
-                    case 209:
                     case 166:
                     case 165:
-                    case 164:
-                    case 167:
-                    case 168:
+                    case 163:
+                    case 253:
                         return node === parent.type;
-                    case 169:
+                    case 255:
+                    case 212:
+                    case 213:
                     case 170:
+                    case 168:
+                    case 167:
                     case 171:
+                    case 172:
                         return node === parent.type;
-                    case 206:
+                    case 173:
+                    case 174:
+                    case 175:
                         return node === parent.type;
-                    case 203:
-                    case 204:
+                    case 210:
+                        return node === parent.type;
+                    case 207:
+                    case 208:
                         return ts.contains(parent.typeArguments, node);
-                    case 205:
+                    case 209:
                         return false;
                 }
             }
@@ -11152,23 +11651,23 @@ var ts;
         return traverse(body);
         function traverse(node) {
             switch (node.kind) {
-                case 242:
+                case 246:
                     return visitor(node);
-                case 258:
-                case 230:
+                case 262:
                 case 234:
-                case 235:
-                case 236:
-                case 237:
                 case 238:
                 case 239:
+                case 240:
+                case 241:
+                case 242:
                 case 243:
-                case 244:
-                case 284:
-                case 285:
-                case 245:
                 case 247:
-                case 287:
+                case 248:
+                case 288:
+                case 289:
+                case 249:
+                case 251:
+                case 291:
                     return ts.forEachChild(node, traverse);
             }
         }
@@ -11178,21 +11677,21 @@ var ts;
         return traverse(body);
         function traverse(node) {
             switch (node.kind) {
-                case 219:
+                case 223:
                     visitor(node);
                     var operand = node.expression;
                     if (operand) {
                         traverse(operand);
                     }
                     return;
-                case 255:
-                case 253:
-                case 256:
-                case 254:
+                case 259:
+                case 257:
+                case 260:
+                case 258:
                     return;
                 default:
                     if (ts.isFunctionLike(node)) {
-                        if (node.name && node.name.kind === 158) {
+                        if (node.name && node.name.kind === 161) {
                             traverse(node.name.expression);
                             return;
                         }
@@ -11205,10 +11704,10 @@ var ts;
     }
     ts.forEachYieldExpression = forEachYieldExpression;
     function getRestParameterElementType(node) {
-        if (node && node.kind === 178) {
+        if (node && node.kind === 182) {
             return node.elementType;
         }
-        else if (node && node.kind === 173) {
+        else if (node && node.kind === 177) {
             return ts.singleOrUndefined(node.typeArguments);
         }
         else {
@@ -11218,12 +11717,12 @@ var ts;
     ts.getRestParameterElementType = getRestParameterElementType;
     function getMembersOfDeclaration(node) {
         switch (node.kind) {
-            case 253:
-            case 252:
-            case 221:
-            case 177:
+            case 257:
+            case 256:
+            case 225:
+            case 181:
                 return node.members;
-            case 200:
+            case 204:
                 return node.properties;
         }
     }
@@ -11231,14 +11730,14 @@ var ts;
     function isVariableLike(node) {
         if (node) {
             switch (node.kind) {
-                case 198:
-                case 291:
-                case 160:
-                case 288:
+                case 202:
+                case 297:
                 case 163:
-                case 162:
-                case 289:
-                case 249:
+                case 294:
+                case 166:
+                case 165:
+                case 295:
+                case 253:
                     return true;
             }
         }
@@ -11250,8 +11749,8 @@ var ts;
     }
     ts.isVariableLikeOrAccessor = isVariableLikeOrAccessor;
     function isVariableDeclarationInVariableStatement(node) {
-        return node.parent.kind === 250
-            && node.parent.parent.kind === 232;
+        return node.parent.kind === 254
+            && node.parent.parent.kind === 236;
     }
     ts.isVariableDeclarationInVariableStatement = isVariableDeclarationInVariableStatement;
     function isValidESSymbolDeclaration(node) {
@@ -11262,13 +11761,13 @@ var ts;
     ts.isValidESSymbolDeclaration = isValidESSymbolDeclaration;
     function introducesArgumentsExoticObject(node) {
         switch (node.kind) {
-            case 165:
-            case 164:
-            case 166:
-            case 167:
             case 168:
-            case 251:
-            case 208:
+            case 167:
+            case 170:
+            case 171:
+            case 172:
+            case 255:
+            case 212:
                 return true;
         }
         return false;
@@ -11279,7 +11778,7 @@ var ts;
             if (beforeUnwrapLabelCallback) {
                 beforeUnwrapLabelCallback(node);
             }
-            if (node.statement.kind !== 245) {
+            if (node.statement.kind !== 249) {
                 return node.statement;
             }
             node = node.statement;
@@ -11287,19 +11786,19 @@ var ts;
     }
     ts.unwrapInnermostStatementOfLabel = unwrapInnermostStatementOfLabel;
     function isFunctionBlock(node) {
-        return node && node.kind === 230 && ts.isFunctionLike(node.parent);
+        return node && node.kind === 234 && ts.isFunctionLike(node.parent);
     }
     ts.isFunctionBlock = isFunctionBlock;
     function isObjectLiteralMethod(node) {
-        return node && node.kind === 165 && node.parent.kind === 200;
+        return node && node.kind === 168 && node.parent.kind === 204;
     }
     ts.isObjectLiteralMethod = isObjectLiteralMethod;
-    function isObjectLiteralOrClassExpressionMethod(node) {
-        return node.kind === 165 &&
-            (node.parent.kind === 200 ||
-                node.parent.kind === 221);
+    function isObjectLiteralOrClassExpressionMethodOrAccessor(node) {
+        return (node.kind === 168 || node.kind === 171 || node.kind === 172) &&
+            (node.parent.kind === 204 ||
+                node.parent.kind === 225);
     }
-    ts.isObjectLiteralOrClassExpressionMethod = isObjectLiteralOrClassExpressionMethod;
+    ts.isObjectLiteralOrClassExpressionMethodOrAccessor = isObjectLiteralOrClassExpressionMethodOrAccessor;
     function isIdentifierTypePredicate(predicate) {
         return predicate && predicate.kind === 1;
     }
@@ -11310,7 +11809,7 @@ var ts;
     ts.isThisTypePredicate = isThisTypePredicate;
     function getPropertyAssignment(objectLiteral, key, key2) {
         return objectLiteral.properties.filter(function (property) {
-            if (property.kind === 288) {
+            if (property.kind === 294) {
                 var propName = getTextOfPropertyName(property.name);
                 return key === propName || (!!key2 && key2 === propName);
             }
@@ -11358,47 +11857,61 @@ var ts;
         return ts.findAncestor(node.parent, ts.isClassLike);
     }
     ts.getContainingClass = getContainingClass;
+    function getContainingClassStaticBlock(node) {
+        return ts.findAncestor(node.parent, function (n) {
+            if (ts.isClassLike(n) || ts.isFunctionLike(n)) {
+                return "quit";
+            }
+            return ts.isClassStaticBlockDeclaration(n);
+        });
+    }
+    ts.getContainingClassStaticBlock = getContainingClassStaticBlock;
+    function getContainingFunctionOrClassStaticBlock(node) {
+        return ts.findAncestor(node.parent, ts.isFunctionLikeOrClassStaticBlockDeclaration);
+    }
+    ts.getContainingFunctionOrClassStaticBlock = getContainingFunctionOrClassStaticBlock;
     function getThisContainer(node, includeArrowFunctions) {
-        ts.Debug.assert(node.kind !== 297);
+        ts.Debug.assert(node.kind !== 303);
         while (true) {
             node = node.parent;
             if (!node) {
                 return ts.Debug.fail();
             }
             switch (node.kind) {
-                case 158:
+                case 161:
                     if (ts.isClassLike(node.parent.parent)) {
                         return node;
                     }
                     node = node.parent;
                     break;
-                case 161:
-                    if (node.parent.kind === 160 && ts.isClassElement(node.parent.parent)) {
+                case 164:
+                    if (node.parent.kind === 163 && ts.isClassElement(node.parent.parent)) {
                         node = node.parent.parent;
                     }
                     else if (ts.isClassElement(node.parent)) {
                         node = node.parent;
                     }
                     break;
-                case 209:
+                case 213:
                     if (!includeArrowFunctions) {
                         continue;
                     }
-                case 251:
-                case 208:
-                case 256:
-                case 163:
-                case 162:
-                case 165:
-                case 164:
+                case 255:
+                case 212:
+                case 260:
+                case 169:
                 case 166:
-                case 167:
+                case 165:
                 case 168:
-                case 169:
+                case 167:
                 case 170:
                 case 171:
-                case 255:
-                case 297:
+                case 172:
+                case 173:
+                case 174:
+                case 175:
+                case 259:
+                case 303:
                     return node;
             }
         }
@@ -11416,9 +11929,9 @@ var ts;
         var container = getThisContainer(node, false);
         if (container) {
             switch (container.kind) {
-                case 166:
-                case 251:
-                case 208:
+                case 170:
+                case 255:
+                case 212:
                     return container;
             }
         }
@@ -11432,25 +11945,26 @@ var ts;
                 return node;
             }
             switch (node.kind) {
-                case 158:
+                case 161:
                     node = node.parent;
                     break;
-                case 251:
-                case 208:
-                case 209:
+                case 255:
+                case 212:
+                case 213:
                     if (!stopOnFunctions) {
                         continue;
                     }
-                case 163:
-                case 162:
-                case 165:
-                case 164:
                 case 166:
-                case 167:
+                case 165:
                 case 168:
+                case 167:
+                case 170:
+                case 171:
+                case 172:
+                case 169:
                     return node;
-                case 161:
-                    if (node.parent.kind === 160 && ts.isClassElement(node.parent.parent)) {
+                case 164:
+                    if (node.parent.kind === 163 && ts.isClassElement(node.parent.parent)) {
                         node = node.parent.parent;
                     }
                     else if (ts.isClassElement(node.parent)) {
@@ -11462,51 +11976,59 @@ var ts;
     }
     ts.getSuperContainer = getSuperContainer;
     function getImmediatelyInvokedFunctionExpression(func) {
-        if (func.kind === 208 || func.kind === 209) {
+        if (func.kind === 212 || func.kind === 213) {
             var prev = func;
             var parent = func.parent;
-            while (parent.kind === 207) {
+            while (parent.kind === 211) {
                 prev = parent;
                 parent = parent.parent;
             }
-            if (parent.kind === 203 && parent.expression === prev) {
+            if (parent.kind === 207 && parent.expression === prev) {
                 return parent;
             }
         }
     }
     ts.getImmediatelyInvokedFunctionExpression = getImmediatelyInvokedFunctionExpression;
     function isSuperOrSuperProperty(node) {
-        return node.kind === 105
+        return node.kind === 106
             || isSuperProperty(node);
     }
     ts.isSuperOrSuperProperty = isSuperOrSuperProperty;
     function isSuperProperty(node) {
         var kind = node.kind;
-        return (kind === 201 || kind === 202)
-            && node.expression.kind === 105;
+        return (kind === 205 || kind === 206)
+            && node.expression.kind === 106;
     }
     ts.isSuperProperty = isSuperProperty;
     function isThisProperty(node) {
         var kind = node.kind;
-        return (kind === 201 || kind === 202)
-            && node.expression.kind === 107;
+        return (kind === 205 || kind === 206)
+            && node.expression.kind === 108;
     }
     ts.isThisProperty = isThisProperty;
     function isThisInitializedDeclaration(node) {
         var _a;
-        return !!node && ts.isVariableDeclaration(node) && ((_a = node.initializer) === null || _a === void 0 ? void 0 : _a.kind) === 107;
+        return !!node && ts.isVariableDeclaration(node) && ((_a = node.initializer) === null || _a === void 0 ? void 0 : _a.kind) === 108;
     }
     ts.isThisInitializedDeclaration = isThisInitializedDeclaration;
+    function isThisInitializedObjectBindingExpression(node) {
+        return !!node
+            && (ts.isShorthandPropertyAssignment(node) || ts.isPropertyAssignment(node))
+            && ts.isBinaryExpression(node.parent.parent)
+            && node.parent.parent.operatorToken.kind === 63
+            && node.parent.parent.right.kind === 108;
+    }
+    ts.isThisInitializedObjectBindingExpression = isThisInitializedObjectBindingExpression;
     function getEntityNameFromTypeNode(node) {
         switch (node.kind) {
-            case 173:
+            case 177:
                 return node.typeName;
-            case 223:
+            case 227:
                 return isEntityNameExpression(node.expression)
                     ? node.expression
                     : undefined;
-            case 78:
-            case 157:
+            case 79:
+            case 160:
                 return node;
         }
         return undefined;
@@ -11514,10 +12036,10 @@ var ts;
     ts.getEntityNameFromTypeNode = getEntityNameFromTypeNode;
     function getInvokedExpression(node) {
         switch (node.kind) {
-            case 205:
+            case 209:
                 return node.tag;
-            case 275:
-            case 274:
+            case 279:
+            case 278:
                 return node.tagName;
             default:
                 return node.expression;
@@ -11529,21 +12051,21 @@ var ts;
             return false;
         }
         switch (node.kind) {
-            case 252:
+            case 256:
                 return true;
-            case 163:
-                return parent.kind === 252;
-            case 167:
+            case 166:
+                return parent.kind === 256;
+            case 171:
+            case 172:
             case 168:
-            case 165:
                 return node.body !== undefined
-                    && parent.kind === 252;
-            case 160:
+                    && parent.kind === 256;
+            case 163:
                 return parent.body !== undefined
-                    && (parent.kind === 166
-                        || parent.kind === 165
-                        || parent.kind === 168)
-                    && grandparent.kind === 252;
+                    && (parent.kind === 170
+                        || parent.kind === 168
+                        || parent.kind === 172)
+                    && grandparent.kind === 256;
         }
         return false;
     }
@@ -11559,21 +12081,29 @@ var ts;
     ts.nodeOrChildIsDecorated = nodeOrChildIsDecorated;
     function childIsDecorated(node, parent) {
         switch (node.kind) {
-            case 252:
+            case 256:
                 return ts.some(node.members, function (m) { return nodeOrChildIsDecorated(m, node, parent); });
-            case 165:
             case 168:
+            case 172:
+            case 170:
                 return ts.some(node.parameters, function (p) { return nodeIsDecorated(p, node, parent); });
             default:
                 return false;
         }
     }
     ts.childIsDecorated = childIsDecorated;
+    function classOrConstructorParameterIsDecorated(node) {
+        if (nodeIsDecorated(node))
+            return true;
+        var constructor = getFirstConstructorWithBody(node);
+        return !!constructor && childIsDecorated(constructor, node);
+    }
+    ts.classOrConstructorParameterIsDecorated = classOrConstructorParameterIsDecorated;
     function isJSXTagName(node) {
         var parent = node.parent;
-        if (parent.kind === 275 ||
-            parent.kind === 274 ||
-            parent.kind === 276) {
+        if (parent.kind === 279 ||
+            parent.kind === 278 ||
+            parent.kind === 280) {
             return parent.tagName === node;
         }
         return false;
@@ -11581,56 +12111,63 @@ var ts;
     ts.isJSXTagName = isJSXTagName;
     function isExpressionNode(node) {
         switch (node.kind) {
-            case 105:
-            case 103:
-            case 109:
-            case 94:
+            case 106:
+            case 104:
+            case 110:
+            case 95:
             case 13:
-            case 199:
-            case 200:
-            case 201:
-            case 202:
             case 203:
             case 204:
             case 205:
-            case 224:
             case 206:
-            case 225:
             case 207:
             case 208:
-            case 221:
             case 209:
-            case 212:
+            case 228:
             case 210:
+            case 229:
             case 211:
+            case 212:
+            case 225:
+            case 213:
+            case 216:
             case 214:
             case 215:
-            case 216:
-            case 217:
-            case 220:
             case 218:
-            case 222:
-            case 273:
-            case 274:
-            case 277:
             case 219:
-            case 213:
+            case 220:
+            case 221:
+            case 224:
+            case 222:
             case 226:
+            case 277:
+            case 278:
+            case 281:
+            case 223:
+            case 217:
+            case 230:
                 return true;
-            case 157:
-                while (node.parent.kind === 157) {
+            case 160:
+                while (node.parent.kind === 160) {
+                    node = node.parent;
+                }
+                return node.parent.kind === 180 || ts.isJSDocLinkLike(node.parent) || ts.isJSDocNameReference(node.parent) || ts.isJSDocMemberName(node.parent) || isJSXTagName(node);
+            case 309:
+                while (ts.isJSDocMemberName(node.parent)) {
                     node = node.parent;
                 }
-                return node.parent.kind === 176 || isJSXTagName(node);
-            case 78:
-                if (node.parent.kind === 176 || isJSXTagName(node)) {
+                return node.parent.kind === 180 || ts.isJSDocLinkLike(node.parent) || ts.isJSDocNameReference(node.parent) || ts.isJSDocMemberName(node.parent) || isJSXTagName(node);
+            case 80:
+                return ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 101;
+            case 79:
+                if (node.parent.kind === 180 || ts.isJSDocLinkLike(node.parent) || ts.isJSDocNameReference(node.parent) || ts.isJSDocMemberName(node.parent) || isJSXTagName(node)) {
                     return true;
                 }
             case 8:
             case 9:
             case 10:
             case 14:
-            case 107:
+            case 108:
                 return isInExpressionContext(node);
             default:
                 return false;
@@ -11640,49 +12177,49 @@ var ts;
     function isInExpressionContext(node) {
         var parent = node.parent;
         switch (parent.kind) {
-            case 249:
-            case 160:
+            case 253:
             case 163:
-            case 162:
-            case 291:
-            case 288:
-            case 198:
+            case 166:
+            case 165:
+            case 297:
+            case 294:
+            case 202:
                 return parent.initializer === node;
-            case 233:
-            case 234:
-            case 235:
-            case 236:
-            case 242:
-            case 243:
-            case 244:
-            case 284:
+            case 237:
+            case 238:
+            case 239:
+            case 240:
             case 246:
+            case 247:
+            case 248:
+            case 288:
+            case 250:
                 return parent.expression === node;
-            case 237:
+            case 241:
                 var forStatement = parent;
-                return (forStatement.initializer === node && forStatement.initializer.kind !== 250) ||
+                return (forStatement.initializer === node && forStatement.initializer.kind !== 254) ||
                     forStatement.condition === node ||
                     forStatement.incrementor === node;
-            case 238:
-            case 239:
+            case 242:
+            case 243:
                 var forInStatement = parent;
-                return (forInStatement.initializer === node && forInStatement.initializer.kind !== 250) ||
+                return (forInStatement.initializer === node && forInStatement.initializer.kind !== 254) ||
                     forInStatement.expression === node;
-            case 206:
-            case 224:
-                return node === parent.expression;
+            case 210:
             case 228:
                 return node === parent.expression;
-            case 158:
+            case 232:
                 return node === parent.expression;
             case 161:
-            case 283:
-            case 282:
-            case 290:
+                return node === parent.expression;
+            case 164:
+            case 287:
+            case 286:
+            case 296:
                 return true;
-            case 223:
+            case 227:
                 return parent.expression === node && isExpressionWithTypeArgumentsInClassExtendsClause(parent);
-            case 289:
+            case 295:
                 return parent.objectAssignmentInitializer === node;
             default:
                 return isExpressionNode(parent);
@@ -11690,14 +12227,18 @@ var ts;
     }
     ts.isInExpressionContext = isInExpressionContext;
     function isPartOfTypeQuery(node) {
-        while (node.kind === 157 || node.kind === 78) {
+        while (node.kind === 160 || node.kind === 79) {
             node = node.parent;
         }
-        return node.kind === 176;
+        return node.kind === 180;
     }
     ts.isPartOfTypeQuery = isPartOfTypeQuery;
+    function isNamespaceReexportDeclaration(node) {
+        return ts.isNamespaceExport(node) && !!node.parent.moduleSpecifier;
+    }
+    ts.isNamespaceReexportDeclaration = isNamespaceReexportDeclaration;
     function isExternalModuleImportEqualsDeclaration(node) {
-        return node.kind === 260 && node.moduleReference.kind === 272;
+        return node.kind === 264 && node.moduleReference.kind === 276;
     }
     ts.isExternalModuleImportEqualsDeclaration = isExternalModuleImportEqualsDeclaration;
     function getExternalModuleImportEqualsDeclarationExpression(node) {
@@ -11706,12 +12247,11 @@ var ts;
     }
     ts.getExternalModuleImportEqualsDeclarationExpression = getExternalModuleImportEqualsDeclarationExpression;
     function getExternalModuleRequireArgument(node) {
-        return isRequireVariableDeclaration(node, true)
-            && getLeftmostAccessExpression(node.initializer).arguments[0];
+        return isRequireVariableDeclaration(node) && getLeftmostAccessExpression(node.initializer).arguments[0];
     }
     ts.getExternalModuleRequireArgument = getExternalModuleRequireArgument;
     function isInternalModuleImportEqualsDeclaration(node) {
-        return node.kind === 260 && node.moduleReference.kind !== 272;
+        return node.kind === 264 && node.moduleReference.kind !== 276;
     }
     ts.isInternalModuleImportEqualsDeclaration = isInternalModuleImportEqualsDeclaration;
     function isSourceFileJS(file) {
@@ -11743,15 +12283,15 @@ var ts;
             ts.isIdentifier(node.typeName) &&
             node.typeName.escapedText === "Object" &&
             node.typeArguments && node.typeArguments.length === 2 &&
-            (node.typeArguments[0].kind === 147 || node.typeArguments[0].kind === 144);
+            (node.typeArguments[0].kind === 149 || node.typeArguments[0].kind === 146);
     }
     ts.isJSDocIndexSignature = isJSDocIndexSignature;
     function isRequireCall(callExpression, requireStringLiteralLikeArgument) {
-        if (callExpression.kind !== 203) {
+        if (callExpression.kind !== 207) {
             return false;
         }
         var _a = callExpression, expression = _a.expression, args = _a.arguments;
-        if (expression.kind !== 78 || expression.escapedText !== "require") {
+        if (expression.kind !== 79 || expression.escapedText !== "require") {
             return false;
         }
         if (args.length !== 1) {
@@ -11761,18 +12301,17 @@ var ts;
         return !requireStringLiteralLikeArgument || ts.isStringLiteralLike(arg);
     }
     ts.isRequireCall = isRequireCall;
-    function isRequireVariableDeclaration(node, requireStringLiteralLikeArgument) {
-        if (node.kind === 198) {
+    function isRequireVariableDeclaration(node) {
+        if (node.kind === 202) {
             node = node.parent.parent;
         }
-        return ts.isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), requireStringLiteralLikeArgument);
+        return ts.isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), true);
     }
     ts.isRequireVariableDeclaration = isRequireVariableDeclaration;
-    function isRequireVariableStatement(node, requireStringLiteralLikeArgument) {
-        if (requireStringLiteralLikeArgument === void 0) { requireStringLiteralLikeArgument = true; }
+    function isRequireVariableStatement(node) {
         return ts.isVariableStatement(node)
             && node.declarationList.declarations.length > 0
-            && ts.every(node.declarationList.declarations, function (decl) { return isRequireVariableDeclaration(decl, requireStringLiteralLikeArgument); });
+            && ts.every(node.declarationList.declarations, function (decl) { return isRequireVariableDeclaration(decl); });
     }
     ts.isRequireVariableStatement = isRequireVariableStatement;
     function isSingleOrDoubleQuote(charCode) {
@@ -11812,7 +12351,7 @@ var ts;
         });
     }
     function getAssignedExpandoInitializer(node) {
-        if (node && node.parent && ts.isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 62) {
+        if (node && node.parent && ts.isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 63) {
             var isPrototypeAssignment = isPrototypeAccess(node.parent.left);
             return getExpandoInitializer(node.parent.right, isPrototypeAssignment) ||
                 getDefaultedExpandoInitializer(node.parent.left, node.parent.right, isPrototypeAssignment);
@@ -11828,11 +12367,11 @@ var ts;
     function getExpandoInitializer(initializer, isPrototypeAssignment) {
         if (ts.isCallExpression(initializer)) {
             var e = skipParentheses(initializer.expression);
-            return e.kind === 208 || e.kind === 209 ? initializer : undefined;
+            return e.kind === 212 || e.kind === 213 ? initializer : undefined;
         }
-        if (initializer.kind === 208 ||
-            initializer.kind === 221 ||
-            initializer.kind === 209) {
+        if (initializer.kind === 212 ||
+            initializer.kind === 225 ||
+            initializer.kind === 213) {
             return initializer;
         }
         if (ts.isObjectLiteralExpression(initializer) && (initializer.properties.length === 0 || isPrototypeAssignment)) {
@@ -11850,7 +12389,7 @@ var ts;
     }
     function isDefaultedExpandoInitializer(node) {
         var name = ts.isVariableDeclaration(node.parent) ? node.parent.name :
-            ts.isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 62 ? node.parent.left :
+            ts.isBinaryExpression(node.parent) && node.parent.operatorToken.kind === 63 ? node.parent.left :
                 undefined;
         return name && getExpandoInitializer(node.right, isPrototypeAccess(name)) && isEntityNameExpression(name) && isSameEntityName(name, node.left);
     }
@@ -11858,7 +12397,7 @@ var ts;
     function getNameOfExpando(node) {
         if (ts.isBinaryExpression(node.parent)) {
             var parent = ((node.parent.operatorToken.kind === 56 || node.parent.operatorToken.kind === 60) && ts.isBinaryExpression(node.parent.parent)) ? node.parent.parent : node.parent;
-            if (parent.operatorToken.kind === 62 && ts.isIdentifier(parent.left)) {
+            if (parent.operatorToken.kind === 63 && ts.isIdentifier(parent.left)) {
                 return parent.left;
             }
         }
@@ -11872,7 +12411,7 @@ var ts;
             return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer);
         }
         if (ts.isIdentifier(name) && isLiteralLikeAccess(initializer) &&
-            (initializer.expression.kind === 107 ||
+            (initializer.expression.kind === 108 ||
                 ts.isIdentifier(initializer.expression) &&
                     (initializer.expression.escapedText === "window" ||
                         initializer.expression.escapedText === "self" ||
@@ -11931,18 +12470,17 @@ var ts;
     }
     ts.isLiteralLikeAccess = isLiteralLikeAccess;
     function isLiteralLikeElementAccess(node) {
-        return ts.isElementAccessExpression(node) && (isStringOrNumericLiteralLike(node.argumentExpression) ||
-            isWellKnownSymbolSyntactically(node.argumentExpression));
+        return ts.isElementAccessExpression(node) && isStringOrNumericLiteralLike(node.argumentExpression);
     }
     ts.isLiteralLikeElementAccess = isLiteralLikeElementAccess;
     function isBindableStaticAccessExpression(node, excludeThisKeyword) {
-        return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 107 || ts.isIdentifier(node.name) && isBindableStaticNameExpression(node.expression, true))
+        return ts.isPropertyAccessExpression(node) && (!excludeThisKeyword && node.expression.kind === 108 || ts.isIdentifier(node.name) && isBindableStaticNameExpression(node.expression, true))
             || isBindableStaticElementAccessExpression(node, excludeThisKeyword);
     }
     ts.isBindableStaticAccessExpression = isBindableStaticAccessExpression;
     function isBindableStaticElementAccessExpression(node, excludeThisKeyword) {
         return isLiteralLikeElementAccess(node)
-            && ((!excludeThisKeyword && node.expression.kind === 107) ||
+            && ((!excludeThisKeyword && node.expression.kind === 108) ||
                 isEntityNameExpression(node.expression) ||
                 isBindableStaticAccessExpression(node.expression, true));
     }
@@ -11972,7 +12510,7 @@ var ts;
             }
             return 7;
         }
-        if (expr.operatorToken.kind !== 62 || !isAccessExpression(expr.left) || isVoidZero(getRightMostAssignedExpression(expr))) {
+        if (expr.operatorToken.kind !== 63 || !isAccessExpression(expr.left) || isVoidZero(getRightMostAssignedExpression(expr))) {
             return 0;
         }
         if (isBindableStaticNameExpression(expr.left.expression, true) && getElementOrPropertyAccessName(expr.left) === "prototype" && ts.isObjectLiteralExpression(getInitializerOfBinaryExpression(expr))) {
@@ -12004,14 +12542,11 @@ var ts;
                 return ts.escapeLeadingUnderscores(name.text);
             }
         }
-        if (ts.isElementAccessExpression(node) && isWellKnownSymbolSyntactically(node.argumentExpression)) {
-            return getPropertyNameForKnownSymbolName(ts.idText(node.argumentExpression.name));
-        }
         return undefined;
     }
     ts.getElementOrPropertyAccessName = getElementOrPropertyAccessName;
     function getAssignmentDeclarationPropertyAccessKind(lhs) {
-        if (lhs.expression.kind === 107) {
+        if (lhs.expression.kind === 108) {
             return 4;
         }
         else if (isModuleExportsAccessExpression(lhs)) {
@@ -12051,7 +12586,7 @@ var ts;
     ts.isPrototypePropertyAssignment = isPrototypePropertyAssignment;
     function isSpecialPropertyDeclaration(expr) {
         return isInJSFile(expr) &&
-            expr.parent && expr.parent.kind === 233 &&
+            expr.parent && expr.parent.kind === 237 &&
             (!ts.isElementAccessExpression(expr) || isLiteralLikeElementAccess(expr)) &&
             !!ts.getJSDocTypeTag(expr.parent);
     }
@@ -12071,23 +12606,37 @@ var ts;
             return false;
         }
         var decl = symbol.valueDeclaration;
-        return decl.kind === 251 || ts.isVariableDeclaration(decl) && decl.initializer && ts.isFunctionLike(decl.initializer);
+        return decl.kind === 255 || ts.isVariableDeclaration(decl) && decl.initializer && ts.isFunctionLike(decl.initializer);
     }
     ts.isFunctionSymbol = isFunctionSymbol;
+    function tryGetModuleSpecifierFromDeclaration(node) {
+        var _a, _b, _c;
+        switch (node.kind) {
+            case 253:
+                return node.initializer.arguments[0].text;
+            case 265:
+                return (_a = ts.tryCast(node.moduleSpecifier, ts.isStringLiteralLike)) === null || _a === void 0 ? void 0 : _a.text;
+            case 264:
+                return (_c = ts.tryCast((_b = ts.tryCast(node.moduleReference, ts.isExternalModuleReference)) === null || _b === void 0 ? void 0 : _b.expression, ts.isStringLiteralLike)) === null || _c === void 0 ? void 0 : _c.text;
+            default:
+                ts.Debug.assertNever(node);
+        }
+    }
+    ts.tryGetModuleSpecifierFromDeclaration = tryGetModuleSpecifierFromDeclaration;
     function importFromModuleSpecifier(node) {
         return tryGetImportFromModuleSpecifier(node) || ts.Debug.failBadSyntaxKind(node.parent);
     }
     ts.importFromModuleSpecifier = importFromModuleSpecifier;
     function tryGetImportFromModuleSpecifier(node) {
         switch (node.parent.kind) {
-            case 261:
-            case 267:
+            case 265:
+            case 271:
                 return node.parent;
-            case 272:
+            case 276:
                 return node.parent.parent;
-            case 203:
+            case 207:
                 return isImportCall(node.parent) || isRequireCall(node.parent, false) ? node.parent : undefined;
-            case 191:
+            case 195:
                 ts.Debug.assert(ts.isStringLiteral(node));
                 return ts.tryCast(node.parent.parent, ts.isImportTypeNode);
             default:
@@ -12097,16 +12646,16 @@ var ts;
     ts.tryGetImportFromModuleSpecifier = tryGetImportFromModuleSpecifier;
     function getExternalModuleName(node) {
         switch (node.kind) {
-            case 261:
-            case 267:
+            case 265:
+            case 271:
                 return node.moduleSpecifier;
-            case 260:
-                return node.moduleReference.kind === 272 ? node.moduleReference.expression : undefined;
-            case 195:
+            case 264:
+                return node.moduleReference.kind === 276 ? node.moduleReference.expression : undefined;
+            case 199:
                 return isLiteralImportTypeNode(node) ? node.argument.literal : undefined;
-            case 203:
+            case 207:
                 return node.arguments[0];
-            case 256:
+            case 260:
                 return node.name.kind === 10 ? node.name : undefined;
             default:
                 return ts.Debug.assertNever(node);
@@ -12115,11 +12664,11 @@ var ts;
     ts.getExternalModuleName = getExternalModuleName;
     function getNamespaceDeclarationNode(node) {
         switch (node.kind) {
-            case 261:
+            case 265:
                 return node.importClause && ts.tryCast(node.importClause.namedBindings, ts.isNamespaceImport);
-            case 260:
+            case 264:
                 return node;
-            case 267:
+            case 271:
                 return node.exportClause && ts.tryCast(node.exportClause, ts.isNamespaceExport);
             default:
                 return ts.Debug.assertNever(node);
@@ -12127,7 +12676,7 @@ var ts;
     }
     ts.getNamespaceDeclarationNode = getNamespaceDeclarationNode;
     function isDefaultImport(node) {
-        return node.kind === 261 && !!node.importClause && !!node.importClause.name;
+        return node.kind === 265 && !!node.importClause && !!node.importClause.name;
     }
     ts.isDefaultImport = isDefaultImport;
     function forEachImportClauseDeclaration(node, action) {
@@ -12148,13 +12697,13 @@ var ts;
     function hasQuestionToken(node) {
         if (node) {
             switch (node.kind) {
-                case 160:
-                case 165:
-                case 164:
-                case 289:
-                case 288:
                 case 163:
-                case 162:
+                case 168:
+                case 167:
+                case 295:
+                case 294:
+                case 166:
+                case 165:
                     return node.questionToken !== undefined;
             }
         }
@@ -12168,7 +12717,7 @@ var ts;
     }
     ts.isJSDocConstructSignature = isJSDocConstructSignature;
     function isJSDocTypeAlias(node) {
-        return node.kind === 331 || node.kind === 324 || node.kind === 325;
+        return node.kind === 343 || node.kind === 336 || node.kind === 337;
     }
     ts.isJSDocTypeAlias = isJSDocTypeAlias;
     function isTypeAlias(node) {
@@ -12178,7 +12727,7 @@ var ts;
     function getSourceOfAssignment(node) {
         return ts.isExpressionStatement(node) &&
             ts.isBinaryExpression(node.expression) &&
-            node.expression.operatorToken.kind === 62
+            node.expression.operatorToken.kind === 63
             ? getRightMostAssignedExpression(node.expression)
             : undefined;
     }
@@ -12193,12 +12742,12 @@ var ts;
     }
     function getSingleInitializerOfVariableStatementOrPropertyDeclaration(node) {
         switch (node.kind) {
-            case 232:
+            case 236:
                 var v = getSingleVariableOfVariableStatement(node);
                 return v && v.initializer;
-            case 163:
+            case 166:
                 return node.initializer;
-            case 288:
+            case 294:
                 return node.initializer;
         }
     }
@@ -12210,25 +12759,25 @@ var ts;
     function getNestedModuleDeclaration(node) {
         return ts.isModuleDeclaration(node) &&
             node.body &&
-            node.body.kind === 256
+            node.body.kind === 260
             ? node.body
             : undefined;
     }
     function getJSDocCommentsAndTags(hostNode, noCache) {
         var result;
         if (isVariableLike(hostNode) && ts.hasInitializer(hostNode) && ts.hasJSDocNodes(hostNode.initializer)) {
-            result = ts.append(result, ts.last(hostNode.initializer.jsDoc));
+            result = ts.addRange(result, filterOwnedJSDocTags(hostNode, ts.last(hostNode.initializer.jsDoc)));
         }
         var node = hostNode;
         while (node && node.parent) {
             if (ts.hasJSDocNodes(node)) {
-                result = ts.append(result, ts.last(node.jsDoc));
+                result = ts.addRange(result, filterOwnedJSDocTags(hostNode, ts.last(node.jsDoc)));
             }
-            if (node.kind === 160) {
+            if (node.kind === 163) {
                 result = ts.addRange(result, (noCache ? ts.getJSDocParameterTagsNoCache : ts.getJSDocParameterTags)(node));
                 break;
             }
-            if (node.kind === 159) {
+            if (node.kind === 162) {
                 result = ts.addRange(result, (noCache ? ts.getJSDocTypeParameterTagsNoCache : ts.getJSDocTypeParameterTags)(node));
                 break;
             }
@@ -12237,19 +12786,34 @@ var ts;
         return result || ts.emptyArray;
     }
     ts.getJSDocCommentsAndTags = getJSDocCommentsAndTags;
+    function filterOwnedJSDocTags(hostNode, jsDoc) {
+        if (ts.isJSDoc(jsDoc)) {
+            var ownedTags = ts.filter(jsDoc.tags, function (tag) { return ownsJSDocTag(hostNode, tag); });
+            return jsDoc.tags === ownedTags ? [jsDoc] : ownedTags;
+        }
+        return ownsJSDocTag(hostNode, jsDoc) ? [jsDoc] : undefined;
+    }
+    function ownsJSDocTag(hostNode, tag) {
+        return !ts.isJSDocTypeTag(tag)
+            || !tag.parent
+            || !ts.isJSDoc(tag.parent)
+            || !ts.isParenthesizedExpression(tag.parent.parent)
+            || tag.parent.parent === hostNode;
+    }
     function getNextJSDocCommentLocation(node) {
         var parent = node.parent;
-        if (parent.kind === 288 ||
-            parent.kind === 266 ||
-            parent.kind === 163 ||
-            parent.kind === 233 && node.kind === 201 ||
+        if (parent.kind === 294 ||
+            parent.kind === 270 ||
+            parent.kind === 166 ||
+            parent.kind === 237 && node.kind === 205 ||
+            parent.kind === 246 ||
             getNestedModuleDeclaration(parent) ||
-            ts.isBinaryExpression(node) && node.operatorToken.kind === 62) {
+            ts.isBinaryExpression(node) && node.operatorToken.kind === 63) {
             return parent;
         }
         else if (parent.parent &&
             (getSingleVariableOfVariableStatement(parent.parent) === node ||
-                ts.isBinaryExpression(parent) && parent.operatorToken.kind === 62)) {
+                ts.isBinaryExpression(parent) && parent.operatorToken.kind === 63)) {
             return parent.parent;
         }
         else if (parent.parent && parent.parent.parent &&
@@ -12272,10 +12836,20 @@ var ts;
         if (!decl) {
             return undefined;
         }
-        var parameter = ts.find(decl.parameters, function (p) { return p.name.kind === 78 && p.name.escapedText === name; });
+        var parameter = ts.find(decl.parameters, function (p) { return p.name.kind === 79 && p.name.escapedText === name; });
         return parameter && parameter.symbol;
     }
     ts.getParameterSymbolFromJSDoc = getParameterSymbolFromJSDoc;
+    function getEffectiveContainerForJSDocTemplateTag(node) {
+        if (ts.isJSDoc(node.parent) && node.parent.tags) {
+            var typeAlias = ts.find(node.parent.tags, isJSDocTypeAlias);
+            if (typeAlias) {
+                return typeAlias;
+            }
+        }
+        return getHostSignatureFromJSDoc(node);
+    }
+    ts.getEffectiveContainerForJSDocTemplateTag = getEffectiveContainerForJSDocTemplateTag;
     function getHostSignatureFromJSDoc(node) {
         var host = getEffectiveJSDocHost(node);
         return host && ts.isFunctionLike(host) ? host : undefined;
@@ -12321,7 +12895,7 @@ var ts;
     ts.hasRestParameter = hasRestParameter;
     function isRestParameter(node) {
         var type = ts.isJSDocParameterTag(node) ? (node.typeExpression && node.typeExpression.type) : node.type;
-        return node.dotDotDotToken !== undefined || !!type && type.kind === 309;
+        return node.dotDotDotToken !== undefined || !!type && type.kind === 316;
     }
     ts.isRestParameter = isRestParameter;
     function hasTypeArguments(node) {
@@ -12332,31 +12906,34 @@ var ts;
         var parent = node.parent;
         while (true) {
             switch (parent.kind) {
-                case 216:
+                case 220:
                     var binaryOperator = parent.operatorToken.kind;
                     return isAssignmentOperator(binaryOperator) && parent.left === node ?
-                        binaryOperator === 62 || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 : 2 :
+                        binaryOperator === 63 || isLogicalOrCoalescingAssignmentOperator(binaryOperator) ? 1 : 2 :
                         0;
-                case 214:
-                case 215:
+                case 218:
+                case 219:
                     var unaryOperator = parent.operator;
                     return unaryOperator === 45 || unaryOperator === 46 ? 2 : 0;
-                case 238:
-                case 239:
+                case 242:
+                case 243:
                     return parent.initializer === node ? 1 : 0;
-                case 207:
-                case 199:
-                case 220:
-                case 225:
+                case 211:
+                case 203:
+                case 224:
+                case 229:
                     node = parent;
                     break;
-                case 289:
+                case 296:
+                    node = parent.parent;
+                    break;
+                case 295:
                     if (parent.name !== node) {
                         return 0;
                     }
                     node = parent.parent;
                     break;
-                case 288:
+                case 294:
                     if (parent.name === node) {
                         return 0;
                     }
@@ -12375,22 +12952,22 @@ var ts;
     ts.isAssignmentTarget = isAssignmentTarget;
     function isNodeWithPossibleHoistedDeclaration(node) {
         switch (node.kind) {
-            case 230:
-            case 232:
-            case 243:
             case 234:
-            case 244:
-            case 258:
-            case 284:
-            case 285:
-            case 245:
-            case 237:
-            case 238:
-            case 239:
-            case 235:
             case 236:
             case 247:
-            case 287:
+            case 238:
+            case 248:
+            case 262:
+            case 288:
+            case 289:
+            case 249:
+            case 241:
+            case 242:
+            case 243:
+            case 239:
+            case 240:
+            case 251:
+            case 291:
                 return true;
         }
         return false;
@@ -12407,38 +12984,35 @@ var ts;
         return node;
     }
     function walkUpParenthesizedTypes(node) {
-        return walkUp(node, 186);
+        return walkUp(node, 190);
     }
     ts.walkUpParenthesizedTypes = walkUpParenthesizedTypes;
     function walkUpParenthesizedExpressions(node) {
-        return walkUp(node, 207);
+        return walkUp(node, 211);
     }
     ts.walkUpParenthesizedExpressions = walkUpParenthesizedExpressions;
     function walkUpParenthesizedTypesAndGetParentAndChild(node) {
         var child;
-        while (node && node.kind === 186) {
+        while (node && node.kind === 190) {
             child = node;
             node = node.parent;
         }
         return [child, node];
     }
     ts.walkUpParenthesizedTypesAndGetParentAndChild = walkUpParenthesizedTypesAndGetParentAndChild;
-    function skipParentheses(node) {
-        return ts.skipOuterExpressions(node, 1);
+    function skipParentheses(node, excludeJSDocTypeAssertions) {
+        var flags = excludeJSDocTypeAssertions ?
+            1 | 16 :
+            1;
+        return ts.skipOuterExpressions(node, flags);
     }
     ts.skipParentheses = skipParentheses;
-    function skipParenthesesUp(node) {
-        while (node.kind === 207) {
-            node = node.parent;
-        }
-        return node;
-    }
     function isDeleteTarget(node) {
-        if (node.kind !== 201 && node.kind !== 202) {
+        if (node.kind !== 205 && node.kind !== 206) {
             return false;
         }
         node = walkUpParenthesizedExpressions(node.parent);
-        return node && node.kind === 210;
+        return node && node.kind === 214;
     }
     ts.isDeleteTarget = isDeleteTarget;
     function isNodeDescendantOf(node, ancestor) {
@@ -12462,7 +13036,7 @@ var ts;
             case 8:
                 if (ts.isComputedPropertyName(parent))
                     return parent.parent;
-            case 78:
+            case 79:
                 if (ts.isDeclaration(parent)) {
                     return parent.name === name ? parent : undefined;
                 }
@@ -12479,7 +13053,7 @@ var ts;
                         ? binExp
                         : undefined;
                 }
-            case 79:
+            case 80:
                 return ts.isDeclaration(parent) && parent.name === name ? parent : undefined;
             default:
                 return undefined;
@@ -12488,63 +13062,63 @@ var ts;
     ts.getDeclarationFromName = getDeclarationFromName;
     function isLiteralComputedPropertyDeclarationName(node) {
         return isStringOrNumericLiteralLike(node) &&
-            node.parent.kind === 158 &&
+            node.parent.kind === 161 &&
             ts.isDeclaration(node.parent.parent);
     }
     ts.isLiteralComputedPropertyDeclarationName = isLiteralComputedPropertyDeclarationName;
     function isIdentifierName(node) {
         var parent = node.parent;
         switch (parent.kind) {
-            case 163:
-            case 162:
+            case 166:
             case 165:
-            case 164:
-            case 167:
             case 168:
-            case 291:
-            case 288:
-            case 201:
+            case 167:
+            case 171:
+            case 172:
+            case 297:
+            case 294:
+            case 205:
                 return parent.name === node;
-            case 157:
+            case 160:
                 return parent.right === node;
-            case 198:
-            case 265:
+            case 202:
+            case 269:
                 return parent.propertyName === node;
-            case 270:
-            case 280:
+            case 274:
+            case 284:
                 return true;
         }
         return false;
     }
     ts.isIdentifierName = isIdentifierName;
     function isAliasSymbolDeclaration(node) {
-        return node.kind === 260 ||
-            node.kind === 259 ||
-            node.kind === 262 && !!node.name ||
+        return node.kind === 264 ||
             node.kind === 263 ||
+            node.kind === 266 && !!node.name ||
+            node.kind === 267 ||
+            node.kind === 273 ||
             node.kind === 269 ||
-            node.kind === 265 ||
-            node.kind === 270 ||
-            node.kind === 266 && exportAssignmentIsAlias(node) ||
+            node.kind === 274 ||
+            node.kind === 270 && exportAssignmentIsAlias(node) ||
             ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 && exportAssignmentIsAlias(node) ||
-            ts.isPropertyAccessExpression(node) && ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 62 && isAliasableExpression(node.parent.right) ||
-            node.kind === 289 ||
-            node.kind === 288 && isAliasableExpression(node.initializer);
+            ts.isPropertyAccessExpression(node) && ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63 && isAliasableExpression(node.parent.right) ||
+            node.kind === 295 ||
+            node.kind === 294 && isAliasableExpression(node.initializer);
     }
     ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
     function getAliasDeclarationFromName(node) {
         switch (node.parent.kind) {
-            case 262:
-            case 265:
-            case 263:
-            case 270:
             case 266:
-            case 260:
+            case 269:
+            case 267:
+            case 274:
+            case 270:
+            case 264:
                 return node.parent;
-            case 157:
+            case 160:
                 do {
                     node = node.parent;
-                } while (node.parent.kind === 157);
+                } while (node.parent.kind === 160);
                 return getAliasDeclarationFromName(node);
         }
     }
@@ -12563,7 +13137,7 @@ var ts;
     }
     ts.getExportAssignmentExpression = getExportAssignmentExpression;
     function getPropertyAssignmentAliasLikeExpression(node) {
-        return node.kind === 289 ? node.name : node.kind === 288 ? node.initializer :
+        return node.kind === 295 ? node.name : node.kind === 294 ? node.initializer :
             node.parent.right;
     }
     ts.getPropertyAssignmentAliasLikeExpression = getPropertyAssignmentAliasLikeExpression;
@@ -12579,7 +13153,7 @@ var ts;
     }
     ts.getEffectiveBaseTypeNode = getEffectiveBaseTypeNode;
     function getClassExtendsHeritageElement(node) {
-        var heritageClause = getHeritageClause(node.heritageClauses, 93);
+        var heritageClause = getHeritageClause(node.heritageClauses, 94);
         return heritageClause && heritageClause.types.length > 0 ? heritageClause.types[0] : undefined;
     }
     ts.getClassExtendsHeritageElement = getClassExtendsHeritageElement;
@@ -12588,7 +13162,7 @@ var ts;
             return ts.getJSDocImplementsTags(node).map(function (n) { return n.class; });
         }
         else {
-            var heritageClause = getHeritageClause(node.heritageClauses, 116);
+            var heritageClause = getHeritageClause(node.heritageClauses, 117);
             return heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.types;
         }
     }
@@ -12600,7 +13174,7 @@ var ts;
     }
     ts.getAllSuperTypeNodes = getAllSuperTypeNodes;
     function getInterfaceBaseTypeNodes(node) {
-        var heritageClause = getHeritageClause(node.heritageClauses, 93);
+        var heritageClause = getHeritageClause(node.heritageClauses, 94);
         return heritageClause ? heritageClause.types : undefined;
     }
     ts.getInterfaceBaseTypeNodes = getInterfaceBaseTypeNodes;
@@ -12627,11 +13201,11 @@ var ts;
     }
     ts.getAncestor = getAncestor;
     function isKeyword(token) {
-        return 80 <= token && token <= 156;
+        return 81 <= token && token <= 159;
     }
     ts.isKeyword = isKeyword;
     function isContextualKeyword(token) {
-        return 125 <= token && token <= 156;
+        return 126 <= token && token <= 159;
     }
     ts.isContextualKeyword = isContextualKeyword;
     function isNonContextualKeyword(token) {
@@ -12639,7 +13213,7 @@ var ts;
     }
     ts.isNonContextualKeyword = isNonContextualKeyword;
     function isFutureReservedKeyword(token) {
-        return 116 <= token && token <= 124;
+        return 117 <= token && token <= 125;
     }
     ts.isFutureReservedKeyword = isFutureReservedKeyword;
     function isStringANonContextualKeyword(name) {
@@ -12667,13 +13241,13 @@ var ts;
         }
         var flags = 0;
         switch (node.kind) {
-            case 251:
-            case 208:
-            case 165:
+            case 255:
+            case 212:
+            case 168:
                 if (node.asteriskToken) {
                     flags |= 1;
                 }
-            case 209:
+            case 213:
                 if (hasSyntacticModifier(node, 256)) {
                     flags |= 2;
                 }
@@ -12687,10 +13261,10 @@ var ts;
     ts.getFunctionFlags = getFunctionFlags;
     function isAsyncFunction(node) {
         switch (node.kind) {
-            case 251:
-            case 208:
-            case 209:
-            case 165:
+            case 255:
+            case 212:
+            case 213:
+            case 168:
                 return node.body !== undefined
                     && node.asteriskToken === undefined
                     && hasSyntacticModifier(node, 256);
@@ -12712,33 +13286,25 @@ var ts;
     }
     ts.hasDynamicName = hasDynamicName;
     function isDynamicName(name) {
-        if (!(name.kind === 158 || name.kind === 202)) {
+        if (!(name.kind === 161 || name.kind === 206)) {
             return false;
         }
         var expr = ts.isElementAccessExpression(name) ? skipParentheses(name.argumentExpression) : name.expression;
         return !isStringOrNumericLiteralLike(expr) &&
-            !isSignedNumericLiteral(expr) &&
-            !isWellKnownSymbolSyntactically(expr);
+            !isSignedNumericLiteral(expr);
     }
     ts.isDynamicName = isDynamicName;
-    function isWellKnownSymbolSyntactically(node) {
-        return ts.isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
-    }
-    ts.isWellKnownSymbolSyntactically = isWellKnownSymbolSyntactically;
     function getPropertyNameForPropertyNameNode(name) {
         switch (name.kind) {
-            case 78:
             case 79:
+            case 80:
                 return name.escapedText;
             case 10:
             case 8:
                 return ts.escapeLeadingUnderscores(name.text);
-            case 158:
+            case 161:
                 var nameExpression = name.expression;
-                if (isWellKnownSymbolSyntactically(nameExpression)) {
-                    return getPropertyNameForKnownSymbolName(ts.idText(nameExpression.name));
-                }
-                else if (isStringOrNumericLiteralLike(nameExpression)) {
+                if (isStringOrNumericLiteralLike(nameExpression)) {
                     return ts.escapeLeadingUnderscores(nameExpression.text);
                 }
                 else if (isSignedNumericLiteral(nameExpression)) {
@@ -12755,7 +13321,7 @@ var ts;
     ts.getPropertyNameForPropertyNameNode = getPropertyNameForPropertyNameNode;
     function isPropertyNameLiteral(node) {
         switch (node.kind) {
-            case 78:
+            case 79:
             case 10:
             case 14:
             case 8:
@@ -12766,31 +13332,31 @@ var ts;
     }
     ts.isPropertyNameLiteral = isPropertyNameLiteral;
     function getTextOfIdentifierOrLiteral(node) {
-        return ts.isIdentifierOrPrivateIdentifier(node) ? ts.idText(node) : node.text;
+        return ts.isMemberName(node) ? ts.idText(node) : node.text;
     }
     ts.getTextOfIdentifierOrLiteral = getTextOfIdentifierOrLiteral;
     function getEscapedTextOfIdentifierOrLiteral(node) {
-        return ts.isIdentifierOrPrivateIdentifier(node) ? node.escapedText : ts.escapeLeadingUnderscores(node.text);
+        return ts.isMemberName(node) ? node.escapedText : ts.escapeLeadingUnderscores(node.text);
     }
     ts.getEscapedTextOfIdentifierOrLiteral = getEscapedTextOfIdentifierOrLiteral;
     function getPropertyNameForUniqueESSymbol(symbol) {
-        return "__@" + ts.getSymbolId(symbol) + "@" + symbol.escapedName;
+        return "__@".concat(ts.getSymbolId(symbol), "@").concat(symbol.escapedName);
     }
     ts.getPropertyNameForUniqueESSymbol = getPropertyNameForUniqueESSymbol;
-    function getPropertyNameForKnownSymbolName(symbolName) {
-        return "__@" + symbolName;
-    }
-    ts.getPropertyNameForKnownSymbolName = getPropertyNameForKnownSymbolName;
     function getSymbolNameForPrivateIdentifier(containingClassSymbol, description) {
-        return "__#" + ts.getSymbolId(containingClassSymbol) + "@" + description;
+        return "__#".concat(ts.getSymbolId(containingClassSymbol), "@").concat(description);
     }
     ts.getSymbolNameForPrivateIdentifier = getSymbolNameForPrivateIdentifier;
     function isKnownSymbol(symbol) {
         return ts.startsWith(symbol.escapedName, "__@");
     }
     ts.isKnownSymbol = isKnownSymbol;
+    function isPrivateIdentifierSymbol(symbol) {
+        return ts.startsWith(symbol.escapedName, "__#");
+    }
+    ts.isPrivateIdentifierSymbol = isPrivateIdentifierSymbol;
     function isESSymbolIdentifier(node) {
-        return node.kind === 78 && node.escapedText === "Symbol";
+        return node.kind === 79 && node.escapedText === "Symbol";
     }
     ts.isESSymbolIdentifier = isESSymbolIdentifier;
     function isPushOrUnshiftIdentifier(node) {
@@ -12799,11 +13365,11 @@ var ts;
     ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
     function isParameterDeclaration(node) {
         var root = getRootDeclaration(node);
-        return root.kind === 160;
+        return root.kind === 163;
     }
     ts.isParameterDeclaration = isParameterDeclaration;
     function getRootDeclaration(node) {
-        while (node.kind === 198) {
+        while (node.kind === 202) {
             node = node.parent.parent;
         }
         return node;
@@ -12811,15 +13377,15 @@ var ts;
     ts.getRootDeclaration = getRootDeclaration;
     function nodeStartsNewLexicalEnvironment(node) {
         var kind = node.kind;
-        return kind === 166
-            || kind === 208
-            || kind === 251
-            || kind === 209
-            || kind === 165
-            || kind === 167
+        return kind === 170
+            || kind === 212
+            || kind === 255
+            || kind === 213
             || kind === 168
-            || kind === 256
-            || kind === 297;
+            || kind === 171
+            || kind === 172
+            || kind === 260
+            || kind === 303;
     }
     ts.nodeStartsNewLexicalEnvironment = nodeStartsNewLexicalEnvironment;
     function nodeIsSynthesized(range) {
@@ -12833,41 +13399,41 @@ var ts;
     ts.getOriginalSourceFile = getOriginalSourceFile;
     function getExpressionAssociativity(expression) {
         var operator = getOperator(expression);
-        var hasArguments = expression.kind === 204 && expression.arguments !== undefined;
+        var hasArguments = expression.kind === 208 && expression.arguments !== undefined;
         return getOperatorAssociativity(expression.kind, operator, hasArguments);
     }
     ts.getExpressionAssociativity = getExpressionAssociativity;
     function getOperatorAssociativity(kind, operator, hasArguments) {
         switch (kind) {
-            case 204:
+            case 208:
                 return hasArguments ? 0 : 1;
+            case 218:
+            case 215:
+            case 216:
             case 214:
-            case 211:
-            case 212:
-            case 210:
-            case 213:
             case 217:
-            case 219:
+            case 221:
+            case 223:
                 return 1;
-            case 216:
+            case 220:
                 switch (operator) {
                     case 42:
-                    case 62:
                     case 63:
                     case 64:
-                    case 66:
                     case 65:
                     case 67:
+                    case 66:
                     case 68:
                     case 69:
                     case 70:
                     case 71:
                     case 72:
-                    case 77:
                     case 73:
+                    case 78:
                     case 74:
                     case 75:
                     case 76:
+                    case 77:
                         return 1;
                 }
         }
@@ -12876,15 +13442,15 @@ var ts;
     ts.getOperatorAssociativity = getOperatorAssociativity;
     function getExpressionPrecedence(expression) {
         var operator = getOperator(expression);
-        var hasArguments = expression.kind === 204 && expression.arguments !== undefined;
+        var hasArguments = expression.kind === 208 && expression.arguments !== undefined;
         return getOperatorPrecedence(expression.kind, operator, hasArguments);
     }
     ts.getExpressionPrecedence = getExpressionPrecedence;
     function getOperator(expression) {
-        if (expression.kind === 216) {
+        if (expression.kind === 220) {
             return expression.operatorToken.kind;
         }
-        else if (expression.kind === 214 || expression.kind === 215) {
+        else if (expression.kind === 218 || expression.kind === 219) {
             return expression.operator;
         }
         else {
@@ -12894,80 +13460,82 @@ var ts;
     ts.getOperator = getOperator;
     function getOperatorPrecedence(nodeKind, operatorKind, hasArguments) {
         switch (nodeKind) {
-            case 337:
+            case 349:
                 return 0;
-            case 220:
+            case 224:
                 return 1;
-            case 219:
+            case 223:
                 return 2;
-            case 217:
+            case 221:
                 return 4;
-            case 216:
+            case 220:
                 switch (operatorKind) {
                     case 27:
                         return 0;
-                    case 62:
                     case 63:
                     case 64:
-                    case 66:
                     case 65:
                     case 67:
+                    case 66:
                     case 68:
                     case 69:
                     case 70:
                     case 71:
                     case 72:
-                    case 77:
                     case 73:
+                    case 78:
                     case 74:
                     case 75:
                     case 76:
+                    case 77:
                         return 3;
                     default:
                         return getBinaryOperatorPrecedence(operatorKind);
                 }
-            case 206:
-            case 225:
-            case 214:
-            case 211:
-            case 212:
             case 210:
-            case 213:
-                return 16;
+            case 229:
+            case 218:
             case 215:
+            case 216:
+            case 214:
+            case 217:
+                return 16;
+            case 219:
                 return 17;
-            case 203:
+            case 207:
                 return 18;
-            case 204:
+            case 208:
                 return hasArguments ? 19 : 18;
+            case 209:
             case 205:
-            case 201:
-            case 202:
+            case 206:
+            case 230:
                 return 19;
-            case 224:
+            case 228:
                 return 11;
-            case 107:
-            case 105:
-            case 78:
-            case 103:
-            case 109:
-            case 94:
+            case 108:
+            case 106:
+            case 79:
+            case 80:
+            case 104:
+            case 110:
+            case 95:
             case 8:
             case 9:
             case 10:
-            case 199:
-            case 200:
-            case 208:
-            case 209:
-            case 221:
+            case 203:
+            case 204:
+            case 212:
+            case 213:
+            case 225:
             case 13:
             case 14:
-            case 218:
-            case 207:
             case 222:
-            case 273:
-            case 274:
+            case 211:
+            case 226:
             case 277:
+            case 278:
+            case 281:
                 return 20;
             default:
                 return -1;
@@ -12997,9 +13565,9 @@ var ts;
             case 31:
             case 32:
             case 33:
+            case 102:
             case 101:
-            case 100:
-            case 126:
+            case 127:
                 return 11;
             case 47:
             case 48:
@@ -13021,7 +13589,7 @@ var ts;
     function getSemanticJsxChildren(children) {
         return ts.filter(children, function (i) {
             switch (i.kind) {
-                case 283:
+                case 287:
                     return !!i.expression;
                 case 11:
                     return !i.containsOnlyTriviaWhiteSpaces;
@@ -13107,7 +13675,7 @@ var ts;
     ts.hasInvalidEscape = hasInvalidEscape;
     var doubleQuoteEscapedCharsRegExp = /[\\\"\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
     var singleQuoteEscapedCharsRegExp = /[\\\'\u0000-\u001f\t\v\f\b\r\n\u2028\u2029\u0085]/g;
-    var backtickQuoteEscapedCharsRegExp = /[\\`]/g;
+    var backtickQuoteEscapedCharsRegExp = /\r\n|[\\\`\u0000-\u001f\t\v\f\b\r\u2028\u2029\u0085]/g;
     var escapedCharsMap = new ts.Map(ts.getEntries({
         "\t": "\\t",
         "\v": "\\v",
@@ -13121,7 +13689,8 @@ var ts;
         "\`": "\\\`",
         "\u2028": "\\u2028",
         "\u2029": "\\u2029",
-        "\u0085": "\\u0085"
+        "\u0085": "\\u0085",
+        "\r\n": "\\r\\n",
     }));
     function encodeUtf16EscapeSequence(charCode) {
         var hexCharCode = charCode.toString(16).toUpperCase();
@@ -13296,7 +13865,7 @@ var ts;
             reportInaccessibleThisError: ts.noop,
             reportPrivateInBaseOfClassExpression: ts.noop,
             reportInaccessibleUniqueSymbolError: ts.noop,
-            trackSymbol: ts.noop,
+            trackSymbol: function () { return false; },
             writeKeyword: write,
             writeOperator: write,
             writeParameter: write,
@@ -13321,56 +13890,43 @@ var ts;
         }
         return __assign(__assign({}, writer), { writeTrailingSemicolon: function () {
                 pendingTrailingSemicolon = true;
-            },
-            writeLiteral: function (s) {
+            }, writeLiteral: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeLiteral(s);
-            },
-            writeStringLiteral: function (s) {
+            }, writeStringLiteral: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeStringLiteral(s);
-            },
-            writeSymbol: function (s, sym) {
+            }, writeSymbol: function (s, sym) {
                 commitPendingTrailingSemicolon();
                 writer.writeSymbol(s, sym);
-            },
-            writePunctuation: function (s) {
+            }, writePunctuation: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writePunctuation(s);
-            },
-            writeKeyword: function (s) {
+            }, writeKeyword: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeKeyword(s);
-            },
-            writeOperator: function (s) {
+            }, writeOperator: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeOperator(s);
-            },
-            writeParameter: function (s) {
+            }, writeParameter: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeParameter(s);
-            },
-            writeSpace: function (s) {
+            }, writeSpace: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeSpace(s);
-            },
-            writeProperty: function (s) {
+            }, writeProperty: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeProperty(s);
-            },
-            writeComment: function (s) {
+            }, writeComment: function (s) {
                 commitPendingTrailingSemicolon();
                 writer.writeComment(s);
-            },
-            writeLine: function () {
+            }, writeLine: function () {
                 commitPendingTrailingSemicolon();
                 writer.writeLine();
-            },
-            increaseIndent: function () {
+            }, increaseIndent: function () {
                 commitPendingTrailingSemicolon();
                 writer.increaseIndent();
-            },
-            decreaseIndent: function () {
+            }, decreaseIndent: function () {
                 commitPendingTrailingSemicolon();
                 writer.decreaseIndent();
             } });
@@ -13434,9 +13990,17 @@ var ts;
         var path = outputDir
             ? getSourceFilePathInNewDirWorker(fileName, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName)
             : fileName;
-        return removeFileExtension(path) + ".d.ts";
+        var declarationExtension = getDeclarationEmitExtensionForPath(path);
+        return removeFileExtension(path) + declarationExtension;
     }
     ts.getDeclarationEmitOutputFilePathWorker = getDeclarationEmitOutputFilePathWorker;
+    function getDeclarationEmitExtensionForPath(path) {
+        return ts.fileExtensionIsOneOf(path, [".mjs", ".mts"]) ? ".d.mts" :
+            ts.fileExtensionIsOneOf(path, [".cjs", ".cts"]) ? ".d.cts" :
+                ts.fileExtensionIsOneOf(path, [".json"]) ? ".json.d.ts" :
+                    ".d.ts";
+    }
+    ts.getDeclarationEmitExtensionForPath = getDeclarationEmitExtensionForPath;
     function outFile(options) {
         return options.outFile || options.out;
     }
@@ -13469,8 +14033,8 @@ var ts;
         return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) &&
             !sourceFile.isDeclarationFile &&
             !host.isSourceFileFromExternalLibrary(sourceFile) &&
-            !(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) &&
-            (forceDtsEmit || !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName));
+            (forceDtsEmit || (!(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) &&
+                !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName)));
     }
     ts.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
     function getSourceFilePathInNewDir(fileName, host, newDirPath) {
@@ -13546,11 +14110,21 @@ var ts;
     }
     ts.parameterIsThisKeyword = parameterIsThisKeyword;
     function isThisIdentifier(node) {
-        return !!node && node.kind === 78 && identifierIsThisKeyword(node);
+        return !!node && node.kind === 79 && identifierIsThisKeyword(node);
     }
     ts.isThisIdentifier = isThisIdentifier;
+    function isThisInTypeQuery(node) {
+        if (!isThisIdentifier(node)) {
+            return false;
+        }
+        while (ts.isQualifiedName(node.parent) && node.parent.left === node) {
+            node = node.parent;
+        }
+        return node.parent.kind === 180;
+    }
+    ts.isThisInTypeQuery = isThisInTypeQuery;
     function identifierIsThisKeyword(id) {
-        return id.originalKeywordKind === 107;
+        return id.originalKeywordKind === 108;
     }
     ts.identifierIsThisKeyword = identifierIsThisKeyword;
     function getAllAccessorDeclarations(declarations, accessor) {
@@ -13560,10 +14134,10 @@ var ts;
         var setAccessor;
         if (hasDynamicName(accessor)) {
             firstAccessor = accessor;
-            if (accessor.kind === 167) {
+            if (accessor.kind === 171) {
                 getAccessor = accessor;
             }
-            else if (accessor.kind === 168) {
+            else if (accessor.kind === 172) {
                 setAccessor = accessor;
             }
             else {
@@ -13573,7 +14147,7 @@ var ts;
         else {
             ts.forEach(declarations, function (member) {
                 if (ts.isAccessor(member)
-                    && hasSyntacticModifier(member, 32) === hasSyntacticModifier(accessor, 32)) {
+                    && isStatic(member) === isStatic(accessor)) {
                     var memberName = getPropertyNameForPropertyNameNode(member.name);
                     var accessorName = getPropertyNameForPropertyNameNode(accessor.name);
                     if (memberName === accessorName) {
@@ -13583,10 +14157,10 @@ var ts;
                         else if (!secondAccessor) {
                             secondAccessor = member;
                         }
-                        if (member.kind === 167 && !getAccessor) {
+                        if (member.kind === 171 && !getAccessor) {
                             getAccessor = member;
                         }
-                        if (member.kind === 168 && !setAccessor) {
+                        if (member.kind === 172 && !setAccessor) {
                             setAccessor = member;
                         }
                     }
@@ -13625,7 +14199,7 @@ var ts;
     }
     ts.getJSDocTypeParameterDeclarations = getJSDocTypeParameterDeclarations;
     function isNonTypeAliasTemplate(tag) {
-        return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 311 && tag.parent.tags.some(isJSDocTypeAlias));
+        return ts.isJSDocTemplateTag(tag) && !(tag.parent.kind === 318 && tag.parent.tags.some(isJSDocTypeAlias));
     }
     function getEffectiveSetAccessorTypeAnnotationNode(node) {
         var parameter = getSetAccessorValueParameter(node);
@@ -13757,7 +14331,7 @@ var ts;
     ts.writeCommentRange = writeCommentRange;
     function writeTrimmedCurrentLine(text, commentEnd, writer, newLine, pos, nextLineStart) {
         var end = Math.min(commentEnd, nextLineStart - 1);
-        var currentLineText = text.substring(pos, end).replace(/^\s+|\s+$/g, "");
+        var currentLineText = ts.trimString(text.substring(pos, end));
         if (currentLineText) {
             writer.writeComment(currentLineText);
             if (end !== commentEnd) {
@@ -13796,10 +14370,26 @@ var ts;
         return !!getSelectedSyntacticModifierFlags(node, flags);
     }
     ts.hasSyntacticModifier = hasSyntacticModifier;
+    function isStatic(node) {
+        return ts.isClassElement(node) && hasStaticModifier(node) || ts.isClassStaticBlockDeclaration(node);
+    }
+    ts.isStatic = isStatic;
     function hasStaticModifier(node) {
         return hasSyntacticModifier(node, 32);
     }
     ts.hasStaticModifier = hasStaticModifier;
+    function hasOverrideModifier(node) {
+        return hasEffectiveModifier(node, 16384);
+    }
+    ts.hasOverrideModifier = hasOverrideModifier;
+    function hasAbstractModifier(node) {
+        return hasSyntacticModifier(node, 128);
+    }
+    ts.hasAbstractModifier = hasAbstractModifier;
+    function hasAmbientModifier(node) {
+        return hasSyntacticModifier(node, 2);
+    }
+    ts.hasAmbientModifier = hasAmbientModifier;
     function hasEffectiveReadonlyModifier(node) {
         return hasEffectiveModifier(node, 64);
     }
@@ -13813,7 +14403,7 @@ var ts;
     }
     ts.getSelectedSyntacticModifierFlags = getSelectedSyntacticModifierFlags;
     function getModifierFlagsWorker(node, includeJSDoc, alwaysIncludeJSDoc) {
-        if (node.kind >= 0 && node.kind <= 156) {
+        if (node.kind >= 0 && node.kind <= 159) {
             return 0;
         }
         if (!(node.modifierFlagsCache & 536870912)) {
@@ -13848,6 +14438,8 @@ var ts;
                     flags |= 16;
                 if (ts.getJSDocReadonlyTagNoCache(node))
                     flags |= 64;
+                if (ts.getJSDocOverrideTagNoCache(node))
+                    flags |= 16384;
             }
             if (ts.getJSDocDeprecatedTagNoCache(node))
                 flags |= 8192;
@@ -13860,7 +14452,7 @@ var ts;
     ts.getEffectiveModifierFlagsNoCache = getEffectiveModifierFlagsNoCache;
     function getSyntacticModifierFlagsNoCache(node) {
         var flags = modifiersToFlags(node.modifiers);
-        if (node.flags & 4 || (node.kind === 78 && node.isInJSDocNamespace)) {
+        if (node.flags & 4 || (node.kind === 79 && node.isInJSDocNamespace)) {
             flags |= 1;
         }
         return flags;
@@ -13879,21 +14471,26 @@ var ts;
     ts.modifiersToFlags = modifiersToFlags;
     function modifierToFlag(token) {
         switch (token) {
-            case 123: return 32;
-            case 122: return 4;
-            case 121: return 16;
-            case 120: return 8;
-            case 125: return 128;
-            case 92: return 1;
-            case 133: return 2;
-            case 84: return 2048;
-            case 87: return 512;
-            case 129: return 256;
-            case 142: return 64;
+            case 124: return 32;
+            case 123: return 4;
+            case 122: return 16;
+            case 121: return 8;
+            case 126: return 128;
+            case 93: return 1;
+            case 135: return 2;
+            case 85: return 2048;
+            case 88: return 512;
+            case 131: return 256;
+            case 144: return 64;
+            case 158: return 16384;
         }
         return 0;
     }
     ts.modifierToFlag = modifierToFlag;
+    function createModifiers(modifierFlags) {
+        return modifierFlags ? ts.factory.createNodeArray(ts.factory.createModifiersFromModifierFlags(modifierFlags)) : undefined;
+    }
+    ts.createModifiers = createModifiers;
     function isLogicalOperator(token) {
         return token === 56
             || token === 55
@@ -13901,9 +14498,9 @@ var ts;
     }
     ts.isLogicalOperator = isLogicalOperator;
     function isLogicalOrCoalescingAssignmentOperator(token) {
-        return token === 74
-            || token === 75
-            || token === 76;
+        return token === 75
+            || token === 76
+            || token === 77;
     }
     ts.isLogicalOrCoalescingAssignmentOperator = isLogicalOrCoalescingAssignmentOperator;
     function isLogicalOrCoalescingAssignmentExpression(expr) {
@@ -13911,7 +14508,7 @@ var ts;
     }
     ts.isLogicalOrCoalescingAssignmentExpression = isLogicalOrCoalescingAssignmentExpression;
     function isAssignmentOperator(token) {
-        return token >= 62 && token <= 77;
+        return token >= 63 && token <= 78;
     }
     ts.isAssignmentOperator = isAssignmentOperator;
     function tryGetClassExtendingExpressionWithTypeArguments(node) {
@@ -13923,23 +14520,27 @@ var ts;
         return ts.isExpressionWithTypeArguments(node)
             && ts.isHeritageClause(node.parent)
             && ts.isClassLike(node.parent.parent)
-            ? { class: node.parent.parent, isImplements: node.parent.token === 116 }
+            ? { class: node.parent.parent, isImplements: node.parent.token === 117 }
             : undefined;
     }
     ts.tryGetClassImplementingOrExtendingExpressionWithTypeArguments = tryGetClassImplementingOrExtendingExpressionWithTypeArguments;
     function isAssignmentExpression(node, excludeCompoundAssignment) {
         return ts.isBinaryExpression(node)
             && (excludeCompoundAssignment
-                ? node.operatorToken.kind === 62
+                ? node.operatorToken.kind === 63
                 : isAssignmentOperator(node.operatorToken.kind))
             && ts.isLeftHandSideExpression(node.left);
     }
     ts.isAssignmentExpression = isAssignmentExpression;
+    function isLeftHandSideOfAssignment(node) {
+        return isAssignmentExpression(node.parent) && node.parent.left === node;
+    }
+    ts.isLeftHandSideOfAssignment = isLeftHandSideOfAssignment;
     function isDestructuringAssignment(node) {
         if (isAssignmentExpression(node, true)) {
             var kind = node.left.kind;
-            return kind === 200
-                || kind === 199;
+            return kind === 204
+                || kind === 203;
         }
         return false;
     }
@@ -13949,30 +14550,33 @@ var ts;
     }
     ts.isExpressionWithTypeArgumentsInClassExtendsClause = isExpressionWithTypeArgumentsInClassExtendsClause;
     function isEntityNameExpression(node) {
-        return node.kind === 78 || isPropertyAccessEntityNameExpression(node);
+        return node.kind === 79 || isPropertyAccessEntityNameExpression(node);
     }
     ts.isEntityNameExpression = isEntityNameExpression;
     function getFirstIdentifier(node) {
         switch (node.kind) {
-            case 78:
+            case 79:
                 return node;
-            case 157:
+            case 160:
                 do {
                     node = node.left;
-                } while (node.kind !== 78);
+                } while (node.kind !== 79);
                 return node;
-            case 201:
+            case 205:
                 do {
                     node = node.expression;
-                } while (node.kind !== 78);
+                } while (node.kind !== 79);
                 return node;
         }
     }
     ts.getFirstIdentifier = getFirstIdentifier;
     function isDottedName(node) {
-        return node.kind === 78 || node.kind === 107 || node.kind === 105 ||
-            node.kind === 201 && isDottedName(node.expression) ||
-            node.kind === 207 && isDottedName(node.expression);
+        return node.kind === 79
+            || node.kind === 108
+            || node.kind === 106
+            || node.kind === 230
+            || node.kind === 205 && isDottedName(node.expression)
+            || node.kind === 211 && isDottedName(node.expression);
     }
     ts.isDottedName = isDottedName;
     function isPropertyAccessEntityNameExpression(node) {
@@ -14003,22 +14607,28 @@ var ts;
     }
     ts.isPrototypeAccess = isPrototypeAccess;
     function isRightSideOfQualifiedNameOrPropertyAccess(node) {
-        return (node.parent.kind === 157 && node.parent.right === node) ||
-            (node.parent.kind === 201 && node.parent.name === node);
+        return (node.parent.kind === 160 && node.parent.right === node) ||
+            (node.parent.kind === 205 && node.parent.name === node);
     }
     ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
+    function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {
+        return ts.isQualifiedName(node.parent) && node.parent.right === node
+            || ts.isPropertyAccessExpression(node.parent) && node.parent.name === node
+            || ts.isJSDocMemberName(node.parent) && node.parent.right === node;
+    }
+    ts.isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName = isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName;
     function isEmptyObjectLiteral(expression) {
-        return expression.kind === 200 &&
+        return expression.kind === 204 &&
             expression.properties.length === 0;
     }
     ts.isEmptyObjectLiteral = isEmptyObjectLiteral;
     function isEmptyArrayLiteral(expression) {
-        return expression.kind === 199 &&
+        return expression.kind === 203 &&
             expression.elements.length === 0;
     }
     ts.isEmptyArrayLiteral = isEmptyArrayLiteral;
     function getLocalSymbolForExportDefault(symbol) {
-        if (!isExportDefaultSymbol(symbol))
+        if (!isExportDefaultSymbol(symbol) || !symbol.declarations)
             return undefined;
         for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
             var decl = _a[_i];
@@ -14032,7 +14642,7 @@ var ts;
         return symbol && ts.length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 512);
     }
     function tryExtractTSExtension(fileName) {
-        return ts.find(ts.supportedTSExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
+        return ts.find(supportedTSExtensionsForExtractExtension, function (extension) { return ts.fileExtensionIs(fileName, extension); });
     }
     ts.tryExtractTSExtension = tryExtractTSExtension;
     function getExpandedCharCodes(input) {
@@ -14285,8 +14895,8 @@ var ts;
         var parseNode = ts.getParseTreeNode(node);
         if (parseNode) {
             switch (parseNode.parent.kind) {
-                case 255:
-                case 256:
+                case 259:
+                case 260:
                     return parseNode === parseNode.parent.name;
             }
         }
@@ -14312,9 +14922,11 @@ var ts;
         return symbol.flags & 33554432 ? symbol.checkFlags : 0;
     }
     ts.getCheckFlags = getCheckFlags;
-    function getDeclarationModifierFlagsFromSymbol(s) {
+    function getDeclarationModifierFlagsFromSymbol(s, isWrite) {
+        if (isWrite === void 0) { isWrite = false; }
         if (s.valueDeclaration) {
-            var flags = ts.getCombinedModifierFlags(s.valueDeclaration);
+            var declaration = (isWrite && s.declarations && ts.find(s.declarations, function (d) { return d.kind === 172; })) || s.valueDeclaration;
+            var flags = ts.getCombinedModifierFlags(declaration);
             return s.parent && s.parent.flags & 32 ? flags : flags & ~28;
         }
         if (getCheckFlags(s) & 6) {
@@ -14352,32 +14964,32 @@ var ts;
         if (!parent)
             return 0;
         switch (parent.kind) {
-            case 207:
+            case 211:
                 return accessKind(parent);
-            case 215:
-            case 214:
+            case 219:
+            case 218:
                 var operator = parent.operator;
                 return operator === 45 || operator === 46 ? writeOrReadWrite() : 0;
-            case 216:
+            case 220:
                 var _a = parent, left = _a.left, operatorToken = _a.operatorToken;
                 return left === node && isAssignmentOperator(operatorToken.kind) ?
-                    operatorToken.kind === 62 ? 1 : writeOrReadWrite()
+                    operatorToken.kind === 63 ? 1 : writeOrReadWrite()
                     : 0;
-            case 201:
+            case 205:
                 return parent.name !== node ? 0 : accessKind(parent);
-            case 288: {
+            case 294: {
                 var parentAccess = accessKind(parent.parent);
                 return node === parent.name ? reverseAccessKind(parentAccess) : parentAccess;
             }
-            case 289:
+            case 295:
                 return node === parent.objectAssignmentInitializer ? 0 : accessKind(parent.parent);
-            case 199:
+            case 203:
                 return accessKind(parent);
             default:
                 return 0;
         }
         function writeOrReadWrite() {
-            return parent.parent && skipParenthesesUp(parent.parent).kind === 233 ? 1 : 2;
+            return parent.parent && walkUpParenthesizedExpressions(parent.parent).kind === 237 ? 1 : 2;
         }
     }
     function reverseAccessKind(a) {
@@ -14449,7 +15061,8 @@ var ts;
     }
     ts.isAbstractConstructorSymbol = isAbstractConstructorSymbol;
     function getClassLikeDeclarationOfSymbol(symbol) {
-        return ts.find(symbol.declarations, ts.isClassLike);
+        var _a;
+        return (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isClassLike);
     }
     ts.getClassLikeDeclarationOfSymbol = getClassLikeDeclarationOfSymbol;
     function getObjectFlags(type) {
@@ -14491,7 +15104,6 @@ var ts;
     ts.getLastChild = getLastChild;
     function addToSeen(seen, key, value) {
         if (value === void 0) { value = true; }
-        key = String(key);
         if (seen.has(key)) {
             return false;
         }
@@ -14504,37 +15116,37 @@ var ts;
     }
     ts.isObjectTypeDeclaration = isObjectTypeDeclaration;
     function isTypeNodeKind(kind) {
-        return (kind >= 172 && kind <= 195)
-            || kind === 128
-            || kind === 152
-            || kind === 144
-            || kind === 155
-            || kind === 145
-            || kind === 131
+        return (kind >= 176 && kind <= 199)
+            || kind === 130
+            || kind === 154
+            || kind === 146
+            || kind === 157
             || kind === 147
-            || kind === 148
-            || kind === 113
+            || kind === 133
+            || kind === 149
             || kind === 150
-            || kind === 141
-            || kind === 223
-            || kind === 303
-            || kind === 304
-            || kind === 305
-            || kind === 306
-            || kind === 307
-            || kind === 308
-            || kind === 309;
+            || kind === 114
+            || kind === 152
+            || kind === 143
+            || kind === 227
+            || kind === 310
+            || kind === 311
+            || kind === 312
+            || kind === 313
+            || kind === 314
+            || kind === 315
+            || kind === 316;
     }
     ts.isTypeNodeKind = isTypeNodeKind;
     function isAccessExpression(node) {
-        return node.kind === 201 || node.kind === 202;
+        return node.kind === 205 || node.kind === 206;
     }
     ts.isAccessExpression = isAccessExpression;
     function getNameOfAccessExpression(node) {
-        if (node.kind === 201) {
+        if (node.kind === 205) {
             return node.name;
         }
-        ts.Debug.assert(node.kind === 202);
+        ts.Debug.assert(node.kind === 206);
         return node.argumentExpression;
     }
     ts.getNameOfAccessExpression = getNameOfAccessExpression;
@@ -14549,7 +15161,7 @@ var ts;
     }
     ts.isBundleFileTextLike = isBundleFileTextLike;
     function isNamedImportsOrExports(node) {
-        return node.kind === 264 || node.kind === 268;
+        return node.kind === 268 || node.kind === 272;
     }
     ts.isNamedImportsOrExports = isNamedImportsOrExports;
     function getLeftmostAccessExpression(expr) {
@@ -14562,27 +15174,27 @@ var ts;
     function getLeftmostExpression(node, stopAtCallExpressions) {
         while (true) {
             switch (node.kind) {
-                case 215:
+                case 219:
                     node = node.operand;
                     continue;
-                case 216:
+                case 220:
                     node = node.left;
                     continue;
-                case 217:
+                case 221:
                     node = node.condition;
                     continue;
-                case 205:
+                case 209:
                     node = node.tag;
                     continue;
-                case 203:
+                case 207:
                     if (stopAtCallExpressions) {
                         return node;
                     }
-                case 224:
-                case 202:
-                case 201:
-                case 225:
-                case 336:
+                case 228:
+                case 206:
+                case 205:
+                case 229:
+                case 348:
                     node = node.expression;
                     continue;
             }
@@ -14888,7 +15500,10 @@ var ts;
     }
     ts.getLanguageVariant = getLanguageVariant;
     function getEmitScriptTarget(compilerOptions) {
-        return compilerOptions.target || 0;
+        return compilerOptions.target ||
+            (compilerOptions.module === ts.ModuleKind.Node12 && 7) ||
+            (compilerOptions.module === ts.ModuleKind.NodeNext && 99) ||
+            0;
     }
     ts.getEmitScriptTarget = getEmitScriptTarget;
     function getEmitModuleKind(compilerOptions) {
@@ -14900,7 +15515,20 @@ var ts;
     function getEmitModuleResolutionKind(compilerOptions) {
         var moduleResolution = compilerOptions.moduleResolution;
         if (moduleResolution === undefined) {
-            moduleResolution = getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+            switch (getEmitModuleKind(compilerOptions)) {
+                case ts.ModuleKind.CommonJS:
+                    moduleResolution = ts.ModuleResolutionKind.NodeJs;
+                    break;
+                case ts.ModuleKind.Node12:
+                    moduleResolution = ts.ModuleResolutionKind.Node12;
+                    break;
+                case ts.ModuleKind.NodeNext:
+                    moduleResolution = ts.ModuleResolutionKind.NodeNext;
+                    break;
+                default:
+                    moduleResolution = ts.ModuleResolutionKind.Classic;
+                    break;
+            }
         }
         return moduleResolution;
     }
@@ -14911,7 +15539,10 @@ var ts;
             case ts.ModuleKind.AMD:
             case ts.ModuleKind.ES2015:
             case ts.ModuleKind.ES2020:
+            case ts.ModuleKind.ES2022:
             case ts.ModuleKind.ESNext:
+            case ts.ModuleKind.Node12:
+            case ts.ModuleKind.NodeNext:
                 return true;
             default:
                 return false;
@@ -14930,11 +15561,23 @@ var ts;
         return !!(getEmitDeclarations(options) && options.declarationMap);
     }
     ts.getAreDeclarationMapsEnabled = getAreDeclarationMapsEnabled;
+    function getESModuleInterop(compilerOptions) {
+        if (compilerOptions.esModuleInterop !== undefined) {
+            return compilerOptions.esModuleInterop;
+        }
+        switch (getEmitModuleKind(compilerOptions)) {
+            case ts.ModuleKind.Node12:
+            case ts.ModuleKind.NodeNext:
+                return true;
+        }
+        return undefined;
+    }
+    ts.getESModuleInterop = getESModuleInterop;
     function getAllowSyntheticDefaultImports(compilerOptions) {
         var moduleKind = getEmitModuleKind(compilerOptions);
         return compilerOptions.allowSyntheticDefaultImports !== undefined
             ? compilerOptions.allowSyntheticDefaultImports
-            : compilerOptions.esModuleInterop ||
+            : getESModuleInterop(compilerOptions) ||
                 moduleKind === ts.ModuleKind.System;
     }
     ts.getAllowSyntheticDefaultImports = getAllowSyntheticDefaultImports;
@@ -14958,14 +15601,16 @@ var ts;
         return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs;
     }
     ts.getAllowJSCompilerOption = getAllowJSCompilerOption;
+    function getUseDefineForClassFields(compilerOptions) {
+        return compilerOptions.useDefineForClassFields === undefined ? getEmitScriptTarget(compilerOptions) === 99 : compilerOptions.useDefineForClassFields;
+    }
+    ts.getUseDefineForClassFields = getUseDefineForClassFields;
     function compilerOptionsAffectSemanticDiagnostics(newOptions, oldOptions) {
-        return oldOptions !== newOptions &&
-            ts.semanticDiagnosticsOptionDeclarations.some(function (option) { return !isJsonEqual(getCompilerOptionValue(oldOptions, option), getCompilerOptionValue(newOptions, option)); });
+        return optionsHaveChanges(oldOptions, newOptions, ts.semanticDiagnosticsOptionDeclarations);
     }
     ts.compilerOptionsAffectSemanticDiagnostics = compilerOptionsAffectSemanticDiagnostics;
     function compilerOptionsAffectEmit(newOptions, oldOptions) {
-        return oldOptions !== newOptions &&
-            ts.affectsEmitOptionDeclarations.some(function (option) { return !isJsonEqual(getCompilerOptionValue(oldOptions, option), getCompilerOptionValue(newOptions, option)); });
+        return optionsHaveChanges(oldOptions, newOptions, ts.affectsEmitOptionDeclarations);
     }
     ts.compilerOptionsAffectEmit = compilerOptionsAffectEmit;
     function getCompilerOptionValue(options, option) {
@@ -14979,7 +15624,7 @@ var ts;
     ts.getJSXTransformEnabled = getJSXTransformEnabled;
     function getJSXImplicitImportBase(compilerOptions, file) {
         var jsxImportSourcePragmas = file === null || file === void 0 ? void 0 : file.pragmas.get("jsximportsource");
-        var jsxImportSourcePragma = ts.isArray(jsxImportSourcePragmas) ? jsxImportSourcePragmas[0] : jsxImportSourcePragmas;
+        var jsxImportSourcePragma = ts.isArray(jsxImportSourcePragmas) ? jsxImportSourcePragmas[jsxImportSourcePragmas.length - 1] : jsxImportSourcePragmas;
         return compilerOptions.jsx === 4 ||
             compilerOptions.jsx === 5 ||
             compilerOptions.jsxImportSource ||
@@ -14989,7 +15634,7 @@ var ts;
     }
     ts.getJSXImplicitImportBase = getJSXImplicitImportBase;
     function getJSXRuntimeImport(base, options) {
-        return base ? base + "/" + (options.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
+        return base ? "".concat(base, "/").concat(options.jsx === 5 ? "jsx-dev-runtime" : "jsx-runtime") : undefined;
     }
     ts.getJSXRuntimeImport = getJSXRuntimeImport;
     function hasZeroOrOneAsteriskCharacter(str) {
@@ -15011,6 +15656,7 @@ var ts;
         var symlinkedDirectories;
         var symlinkedDirectoriesByRealpath;
         var symlinkedFiles;
+        var hasProcessedResolutions = false;
         return {
             getSymlinkedFiles: function () { return symlinkedFiles; },
             getSymlinkedDirectories: function () { return symlinkedDirectories; },
@@ -15025,32 +15671,48 @@ var ts;
                     }
                     (symlinkedDirectories || (symlinkedDirectories = new ts.Map())).set(symlinkPath, real);
                 }
-            }
+            },
+            setSymlinkedDirectoryFromSymlinkedFile: function (symlink, real) {
+                this.setSymlinkedFile(ts.toPath(symlink, cwd, getCanonicalFileName), real);
+                var _a = guessDirectorySymlink(real, symlink, cwd, getCanonicalFileName) || ts.emptyArray, commonResolved = _a[0], commonOriginal = _a[1];
+                if (commonResolved && commonOriginal) {
+                    this.setSymlinkedDirectory(commonOriginal, {
+                        real: commonResolved,
+                        realPath: ts.toPath(commonResolved, cwd, getCanonicalFileName),
+                    });
+                }
+            },
+            setSymlinksFromResolutions: function (files, typeReferenceDirectives) {
+                var _this = this;
+                var _a;
+                ts.Debug.assert(!hasProcessedResolutions);
+                hasProcessedResolutions = true;
+                for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
+                    var file = files_1[_i];
+                    (_a = file.resolvedModules) === null || _a === void 0 ? void 0 : _a.forEach(function (resolution) { return processResolution(_this, resolution); });
+                }
+                typeReferenceDirectives === null || typeReferenceDirectives === void 0 ? void 0 : typeReferenceDirectives.forEach(function (resolution) { return processResolution(_this, resolution); });
+            },
+            hasProcessedResolutions: function () { return hasProcessedResolutions; },
         };
-    }
-    ts.createSymlinkCache = createSymlinkCache;
-    function discoverProbableSymlinks(files, getCanonicalFileName, cwd) {
-        var cache = createSymlinkCache(cwd, getCanonicalFileName);
-        var symlinks = ts.flatten(ts.mapDefined(files, function (sf) {
-            return sf.resolvedModules && ts.compact(ts.arrayFrom(ts.mapIterator(sf.resolvedModules.values(), function (res) {
-                return res && res.originalPath && res.resolvedFileName !== res.originalPath ? [res.resolvedFileName, res.originalPath] : undefined;
-            })));
-        }));
-        for (var _i = 0, symlinks_1 = symlinks; _i < symlinks_1.length; _i++) {
-            var _a = symlinks_1[_i], resolvedPath = _a[0], originalPath = _a[1];
-            var _b = guessDirectorySymlink(resolvedPath, originalPath, cwd, getCanonicalFileName) || ts.emptyArray, commonResolved = _b[0], commonOriginal = _b[1];
+        function processResolution(cache, resolution) {
+            if (!resolution || !resolution.originalPath || !resolution.resolvedFileName)
+                return;
+            var resolvedFileName = resolution.resolvedFileName, originalPath = resolution.originalPath;
+            cache.setSymlinkedFile(ts.toPath(originalPath, cwd, getCanonicalFileName), resolvedFileName);
+            var _a = guessDirectorySymlink(resolvedFileName, originalPath, cwd, getCanonicalFileName) || ts.emptyArray, commonResolved = _a[0], commonOriginal = _a[1];
             if (commonResolved && commonOriginal) {
                 cache.setSymlinkedDirectory(commonOriginal, { real: commonResolved, realPath: ts.toPath(commonResolved, cwd, getCanonicalFileName) });
             }
         }
-        return cache;
     }
-    ts.discoverProbableSymlinks = discoverProbableSymlinks;
+    ts.createSymlinkCache = createSymlinkCache;
     function guessDirectorySymlink(a, b, cwd, getCanonicalFileName) {
         var aParts = ts.getPathComponents(ts.getNormalizedAbsolutePath(a, cwd));
         var bParts = ts.getPathComponents(ts.getNormalizedAbsolutePath(b, cwd));
         var isDirectory = false;
-        while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) &&
+        while (aParts.length >= 2 && bParts.length >= 2 &&
+            !isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) &&
             !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) &&
             getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) {
             aParts.pop();
@@ -15060,7 +15722,7 @@ var ts;
         return isDirectory ? [ts.getPathFromPathComponents(aParts), ts.getPathFromPathComponents(bParts)] : undefined;
     }
     function isNodeModulesOrScopedPackageDirectory(s, getCanonicalFileName) {
-        return getCanonicalFileName(s) === "node_modules" || ts.startsWith(s, "@");
+        return s !== undefined && (getCanonicalFileName(s) === "node_modules" || ts.startsWith(s, "@"));
     }
     function stripLeadingDirectorySeparator(s) {
         return ts.isAnyDirectorySeparator(s.charCodeAt(0)) ? s.slice(1) : undefined;
@@ -15080,15 +15742,15 @@ var ts;
     }
     var wildcardCharCodes = [42, 63];
     ts.commonPackageFolders = ["node_modules", "bower_components", "jspm_packages"];
-    var implicitExcludePathRegexPattern = "(?!(" + ts.commonPackageFolders.join("|") + ")(/|$))";
+    var implicitExcludePathRegexPattern = "(?!(".concat(ts.commonPackageFolders.join("|"), ")(/|$))");
     var filesMatcher = {
         singleAsteriskRegexFragment: "([^./]|(\\.(?!min\\.js$))?)*",
-        doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
+        doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
         replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, filesMatcher.singleAsteriskRegexFragment); }
     };
     var directoriesMatcher = {
         singleAsteriskRegexFragment: "[^/]*",
-        doubleAsteriskRegexFragment: "(/" + implicitExcludePathRegexPattern + "[^/.][^/]*)*?",
+        doubleAsteriskRegexFragment: "(/".concat(implicitExcludePathRegexPattern, "[^/.][^/]*)*?"),
         replaceWildcardCharacter: function (match) { return replaceWildcardCharacter(match, directoriesMatcher.singleAsteriskRegexFragment); }
     };
     var excludeMatcher = {
@@ -15106,9 +15768,9 @@ var ts;
         if (!patterns || !patterns.length) {
             return undefined;
         }
-        var pattern = patterns.map(function (pattern) { return "(" + pattern + ")"; }).join("|");
+        var pattern = patterns.map(function (pattern) { return "(".concat(pattern, ")"); }).join("|");
         var terminator = usage === "exclude" ? "($|/)" : "$";
-        return "^(" + pattern + ")" + terminator;
+        return "^(".concat(pattern, ")").concat(terminator);
     }
     ts.getRegularExpressionForWildcard = getRegularExpressionForWildcard;
     function getRegularExpressionsForWildcards(specs, basePath, usage) {
@@ -15126,7 +15788,7 @@ var ts;
     ts.isImplicitGlob = isImplicitGlob;
     function getPatternFromSpec(spec, basePath, usage) {
         var pattern = spec && getSubPatternFromSpec(spec, basePath, usage, wildcardMatchers[usage]);
-        return pattern && "^(" + pattern + ")" + (usage === "exclude" ? "($|/)" : "$");
+        return pattern && "^(".concat(pattern, ")").concat(usage === "exclude" ? "($|/)" : "$");
     }
     ts.getPatternFromSpec = getPatternFromSpec;
     function getSubPatternFromSpec(spec, basePath, usage, _a) {
@@ -15192,7 +15854,7 @@ var ts;
         currentDirectory = ts.normalizePath(currentDirectory);
         var absolutePath = ts.combinePaths(currentDirectory, path);
         return {
-            includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^" + pattern + "$"; }),
+            includeFilePatterns: ts.map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), function (pattern) { return "^".concat(pattern, "$"); }),
             includeFilePattern: getRegularExpressionForWildcard(includes, absolutePath, "files"),
             includeDirectoryPattern: getRegularExpressionForWildcard(includes, absolutePath, "directories"),
             excludePattern: getRegularExpressionForWildcard(excludes, absolutePath, "exclude"),
@@ -15303,10 +15965,14 @@ var ts;
         var ext = fileName.substr(fileName.lastIndexOf("."));
         switch (ext.toLowerCase()) {
             case ".js":
+            case ".cjs":
+            case ".mjs":
                 return 1;
             case ".jsx":
                 return 2;
             case ".ts":
+            case ".cts":
+            case ".mts":
                 return 3;
             case ".tsx":
                 return 4;
@@ -15317,52 +15983,51 @@ var ts;
         }
     }
     ts.getScriptKindFromFileName = getScriptKindFromFileName;
-    ts.supportedTSExtensions = [".ts", ".tsx", ".d.ts"];
-    ts.supportedTSExtensionsWithJson = [".ts", ".tsx", ".d.ts", ".json"];
-    ts.supportedTSExtensionsForExtractExtension = [".d.ts", ".ts", ".tsx"];
-    ts.supportedJSExtensions = [".js", ".jsx"];
-    ts.supportedJSAndJsonExtensions = [".js", ".jsx", ".json"];
-    var allSupportedExtensions = __spreadArray(__spreadArray([], ts.supportedTSExtensions), ts.supportedJSExtensions);
-    var allSupportedExtensionsWithJson = __spreadArray(__spreadArray(__spreadArray([], ts.supportedTSExtensions), ts.supportedJSExtensions), [".json"]);
+    ts.supportedTSExtensions = [[".ts", ".tsx", ".d.ts"], [".cts", ".d.cts"], [".mts", ".d.mts"]];
+    ts.supportedTSExtensionsFlat = ts.flatten(ts.supportedTSExtensions);
+    var supportedTSExtensionsWithJson = __spreadArray(__spreadArray([], ts.supportedTSExtensions, true), [[".json"]], false);
+    var supportedTSExtensionsForExtractExtension = [".d.ts", ".d.cts", ".d.mts", ".cts", ".mts", ".ts", ".tsx", ".cts", ".mts"];
+    ts.supportedJSExtensions = [[".js", ".jsx"], [".mjs"], [".cjs"]];
+    ts.supportedJSExtensionsFlat = ts.flatten(ts.supportedJSExtensions);
+    var allSupportedExtensions = [[".ts", ".tsx", ".d.ts", ".js", ".jsx"], [".cts", ".d.cts", ".cjs"], [".mts", ".d.mts", ".mjs"]];
+    var allSupportedExtensionsWithJson = __spreadArray(__spreadArray([], allSupportedExtensions, true), [[".json"]], false);
     function getSupportedExtensions(options, extraFileExtensions) {
         var needJsExtensions = options && getAllowJSCompilerOption(options);
         if (!extraFileExtensions || extraFileExtensions.length === 0) {
             return needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions;
         }
-        var extensions = __spreadArray(__spreadArray([], needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions), ts.mapDefined(extraFileExtensions, function (x) { return x.scriptKind === 7 || needJsExtensions && isJSLike(x.scriptKind) ? x.extension : undefined; }));
-        return ts.deduplicate(extensions, ts.equateStringsCaseSensitive, ts.compareStringsCaseSensitive);
+        var builtins = needJsExtensions ? allSupportedExtensions : ts.supportedTSExtensions;
+        var flatBuiltins = ts.flatten(builtins);
+        var extensions = __spreadArray(__spreadArray([], builtins, true), ts.mapDefined(extraFileExtensions, function (x) { return x.scriptKind === 7 || needJsExtensions && isJSLike(x.scriptKind) && flatBuiltins.indexOf(x.extension) === -1 ? [x.extension] : undefined; }), true);
+        return extensions;
     }
     ts.getSupportedExtensions = getSupportedExtensions;
-    function getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions) {
-        if (!options || !options.resolveJsonModule) {
+    function getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions) {
+        if (!options || !options.resolveJsonModule)
             return supportedExtensions;
-        }
-        if (supportedExtensions === allSupportedExtensions) {
+        if (supportedExtensions === allSupportedExtensions)
             return allSupportedExtensionsWithJson;
-        }
-        if (supportedExtensions === ts.supportedTSExtensions) {
-            return ts.supportedTSExtensionsWithJson;
-        }
-        return __spreadArray(__spreadArray([], supportedExtensions), [".json"]);
+        if (supportedExtensions === ts.supportedTSExtensions)
+            return supportedTSExtensionsWithJson;
+        return __spreadArray(__spreadArray([], supportedExtensions, true), [[".json"]], false);
     }
-    ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule = getSuppoertedExtensionsWithJsonIfResolveJsonModule;
+    ts.getSupportedExtensionsWithJsonIfResolveJsonModule = getSupportedExtensionsWithJsonIfResolveJsonModule;
     function isJSLike(scriptKind) {
         return scriptKind === 1 || scriptKind === 2;
     }
     function hasJSFileExtension(fileName) {
-        return ts.some(ts.supportedJSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); });
+        return ts.some(ts.supportedJSExtensionsFlat, function (extension) { return ts.fileExtensionIs(fileName, extension); });
     }
     ts.hasJSFileExtension = hasJSFileExtension;
     function hasTSFileExtension(fileName) {
-        return ts.some(ts.supportedTSExtensions, function (extension) { return ts.fileExtensionIs(fileName, extension); });
+        return ts.some(ts.supportedTSExtensionsFlat, function (extension) { return ts.fileExtensionIs(fileName, extension); });
     }
     ts.hasTSFileExtension = hasTSFileExtension;
     function isSupportedSourceFileName(fileName, compilerOptions, extraFileExtensions) {
-        if (!fileName) {
+        if (!fileName)
             return false;
-        }
         var supportedExtensions = getSupportedExtensions(compilerOptions, extraFileExtensions);
-        for (var _i = 0, _a = getSuppoertedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions); _i < _a.length; _i++) {
+        for (var _i = 0, _a = ts.flatten(getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions)); _i < _a.length; _i++) {
             var extension = _a[_i];
             if (ts.fileExtensionIs(fileName, extension)) {
                 return true;
@@ -15379,37 +16044,7 @@ var ts;
         return ts.compareValues(numberOfDirectorySeparators(path1), numberOfDirectorySeparators(path2));
     }
     ts.compareNumberOfDirectorySeparators = compareNumberOfDirectorySeparators;
-    function getExtensionPriority(path, supportedExtensions) {
-        for (var i = supportedExtensions.length - 1; i >= 0; i--) {
-            if (ts.fileExtensionIs(path, supportedExtensions[i])) {
-                return adjustExtensionPriority(i, supportedExtensions);
-            }
-        }
-        return 0;
-    }
-    ts.getExtensionPriority = getExtensionPriority;
-    function adjustExtensionPriority(extensionPriority, supportedExtensions) {
-        if (extensionPriority < 2) {
-            return 0;
-        }
-        else if (extensionPriority < supportedExtensions.length) {
-            return 2;
-        }
-        else {
-            return supportedExtensions.length;
-        }
-    }
-    ts.adjustExtensionPriority = adjustExtensionPriority;
-    function getNextLowestExtensionPriority(extensionPriority, supportedExtensions) {
-        if (extensionPriority < 2) {
-            return 2;
-        }
-        else {
-            return supportedExtensions.length;
-        }
-    }
-    ts.getNextLowestExtensionPriority = getNextLowestExtensionPriority;
-    var extensionsToRemove = [".d.ts", ".ts", ".js", ".tsx", ".jsx", ".json"];
+    var extensionsToRemove = [".d.ts", ".d.mts", ".d.cts", ".mjs", ".mts", ".cjs", ".cts", ".ts", ".js", ".tsx", ".jsx", ".json"];
     function removeFileExtension(path) {
         for (var _i = 0, extensionsToRemove_1 = extensionsToRemove; _i < extensionsToRemove_1.length; _i++) {
             var ext = extensionsToRemove_1[_i];
@@ -15434,20 +16069,28 @@ var ts;
     }
     ts.changeExtension = changeExtension;
     function tryParsePattern(pattern) {
-        ts.Debug.assert(hasZeroOrOneAsteriskCharacter(pattern));
         var indexOfStar = pattern.indexOf("*");
-        return indexOfStar === -1 ? undefined : {
-            prefix: pattern.substr(0, indexOfStar),
-            suffix: pattern.substr(indexOfStar + 1)
-        };
+        if (indexOfStar === -1) {
+            return pattern;
+        }
+        return pattern.indexOf("*", indexOfStar + 1) !== -1
+            ? undefined
+            : {
+                prefix: pattern.substr(0, indexOfStar),
+                suffix: pattern.substr(indexOfStar + 1)
+            };
     }
     ts.tryParsePattern = tryParsePattern;
+    function tryParsePatterns(paths) {
+        return ts.mapDefined(ts.getOwnKeys(paths), function (path) { return tryParsePattern(path); });
+    }
+    ts.tryParsePatterns = tryParsePatterns;
     function positionIsSynthesized(pos) {
         return !(pos >= 0);
     }
     ts.positionIsSynthesized = positionIsSynthesized;
     function extensionIsTS(ext) {
-        return ext === ".ts" || ext === ".tsx" || ext === ".d.ts";
+        return ext === ".ts" || ext === ".tsx" || ext === ".d.ts" || ext === ".cts" || ext === ".mts" || ext === ".d.mts" || ext === ".d.cts";
     }
     ts.extensionIsTS = extensionIsTS;
     function resolutionExtensionIsTSOrJson(ext) {
@@ -15456,7 +16099,7 @@ var ts;
     ts.resolutionExtensionIsTSOrJson = resolutionExtensionIsTSOrJson;
     function extensionFromPath(path) {
         var ext = tryGetExtensionFromPath(path);
-        return ext !== undefined ? ext : ts.Debug.fail("File " + path + " has unknown extension.");
+        return ext !== undefined ? ext : ts.Debug.fail("File ".concat(path, " has unknown extension."));
     }
     ts.extensionFromPath = extensionFromPath;
     function isAnySupportedFileExtension(path) {
@@ -15475,18 +16118,15 @@ var ts;
         files: ts.emptyArray,
         directories: ts.emptyArray
     };
-    function matchPatternOrExact(patternStrings, candidate) {
+    function matchPatternOrExact(patternOrStrings, candidate) {
         var patterns = [];
-        for (var _i = 0, patternStrings_1 = patternStrings; _i < patternStrings_1.length; _i++) {
-            var patternString = patternStrings_1[_i];
-            if (!hasZeroOrOneAsteriskCharacter(patternString))
-                continue;
-            var pattern = tryParsePattern(patternString);
-            if (pattern) {
-                patterns.push(pattern);
+        for (var _i = 0, patternOrStrings_1 = patternOrStrings; _i < patternOrStrings_1.length; _i++) {
+            var patternOrString = patternOrStrings_1[_i];
+            if (patternOrString === candidate) {
+                return candidate;
             }
-            else if (patternString === candidate) {
-                return patternString;
+            if (!ts.isString(patternOrString)) {
+                patterns.push(patternOrString);
             }
         }
         return ts.findBestPatternMatch(patterns, function (_) { return _; }, candidate);
@@ -15621,41 +16261,40 @@ var ts;
             || isPartOfTypeQuery(useSite)
             || isIdentifierInNonEmittingHeritageClause(useSite)
             || isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(useSite)
-            || !isExpressionNode(useSite);
+            || !(isExpressionNode(useSite) || isShorthandPropertyNameUseSite(useSite));
     }
     ts.isValidTypeOnlyAliasUseSite = isValidTypeOnlyAliasUseSite;
-    function typeOnlyDeclarationIsExport(typeOnlyDeclaration) {
-        return typeOnlyDeclaration.kind === 270;
+    function isShorthandPropertyNameUseSite(useSite) {
+        return ts.isIdentifier(useSite) && ts.isShorthandPropertyAssignment(useSite.parent) && useSite.parent.name === useSite;
     }
-    ts.typeOnlyDeclarationIsExport = typeOnlyDeclarationIsExport;
     function isPartOfPossiblyValidTypeOrAbstractComputedPropertyName(node) {
-        while (node.kind === 78 || node.kind === 201) {
+        while (node.kind === 79 || node.kind === 205) {
             node = node.parent;
         }
-        if (node.kind !== 158) {
+        if (node.kind !== 161) {
             return false;
         }
         if (hasSyntacticModifier(node.parent, 128)) {
             return true;
         }
         var containerKind = node.parent.parent.kind;
-        return containerKind === 253 || containerKind === 177;
+        return containerKind === 257 || containerKind === 181;
     }
     function isIdentifierInNonEmittingHeritageClause(node) {
-        if (node.kind !== 78)
+        if (node.kind !== 79)
             return false;
         var heritageClause = ts.findAncestor(node.parent, function (parent) {
             switch (parent.kind) {
-                case 286:
+                case 290:
                     return true;
-                case 201:
-                case 223:
+                case 205:
+                case 227:
                     return false;
                 default:
                     return "quit";
             }
         });
-        return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 116 || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 253;
+        return (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.token) === 117 || (heritageClause === null || heritageClause === void 0 ? void 0 : heritageClause.parent.kind) === 257;
     }
     function isIdentifierTypeReference(node) {
         return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName);
@@ -15781,6 +16420,108 @@ var ts;
         return ts.some(ts.ignoredPaths, function (p) { return ts.stringContains(path, p); });
     }
     ts.containsIgnoredPath = containsIgnoredPath;
+    function getContainingNodeArray(node) {
+        if (!node.parent)
+            return undefined;
+        switch (node.kind) {
+            case 162:
+                var parent_1 = node.parent;
+                return parent_1.kind === 189 ? undefined : parent_1.typeParameters;
+            case 163:
+                return node.parent.parameters;
+            case 198:
+                return node.parent.templateSpans;
+            case 232:
+                return node.parent.templateSpans;
+            case 164:
+                return node.parent.decorators;
+            case 290:
+                return node.parent.heritageClauses;
+        }
+        var parent = node.parent;
+        if (ts.isJSDocTag(node)) {
+            return ts.isJSDocTypeLiteral(node.parent) ? undefined : node.parent.tags;
+        }
+        switch (parent.kind) {
+            case 181:
+            case 257:
+                return ts.isTypeElement(node) ? parent.members : undefined;
+            case 186:
+            case 187:
+                return parent.types;
+            case 183:
+            case 203:
+            case 349:
+            case 268:
+            case 272:
+                return parent.elements;
+            case 204:
+            case 285:
+                return parent.properties;
+            case 207:
+            case 208:
+                return ts.isTypeNode(node) ? parent.typeArguments :
+                    parent.expression === node ? undefined :
+                        parent.arguments;
+            case 277:
+            case 281:
+                return ts.isJsxChild(node) ? parent.children : undefined;
+            case 279:
+            case 278:
+                return ts.isTypeNode(node) ? parent.typeArguments : undefined;
+            case 234:
+            case 288:
+            case 289:
+            case 261:
+                return parent.statements;
+            case 262:
+                return parent.clauses;
+            case 256:
+            case 225:
+                return ts.isClassElement(node) ? parent.members : undefined;
+            case 259:
+                return ts.isEnumMember(node) ? parent.members : undefined;
+            case 303:
+                return parent.statements;
+        }
+    }
+    ts.getContainingNodeArray = getContainingNodeArray;
+    function hasContextSensitiveParameters(node) {
+        if (!node.typeParameters) {
+            if (ts.some(node.parameters, function (p) { return !getEffectiveTypeAnnotationNode(p); })) {
+                return true;
+            }
+            if (node.kind !== 213) {
+                var parameter = ts.firstOrUndefined(node.parameters);
+                if (!(parameter && parameterIsThisKeyword(parameter))) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+    ts.hasContextSensitiveParameters = hasContextSensitiveParameters;
+    function isInfinityOrNaNString(name) {
+        return name === "Infinity" || name === "-Infinity" || name === "NaN";
+    }
+    ts.isInfinityOrNaNString = isInfinityOrNaNString;
+    function isCatchClauseVariableDeclaration(node) {
+        return node.kind === 253 && node.parent.kind === 291;
+    }
+    ts.isCatchClauseVariableDeclaration = isCatchClauseVariableDeclaration;
+    function isParameterOrCatchClauseVariable(symbol) {
+        var declaration = symbol.valueDeclaration && getRootDeclaration(symbol.valueDeclaration);
+        return !!declaration && (ts.isParameter(declaration) || isCatchClauseVariableDeclaration(declaration));
+    }
+    ts.isParameterOrCatchClauseVariable = isParameterOrCatchClauseVariable;
+    function isFunctionExpressionOrArrowFunction(node) {
+        return node.kind === 212 || node.kind === 213;
+    }
+    ts.isFunctionExpressionOrArrowFunction = isFunctionExpressionOrArrowFunction;
+    function escapeSnippetText(text) {
+        return text.replace(/\$/gm, "\\$");
+    }
+    ts.escapeSnippetText = escapeSnippetText;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -15818,7 +16559,11 @@ var ts;
 var ts;
 (function (ts) {
     function createParenthesizerRules(factory) {
+        var binaryLeftOperandParenthesizerCache;
+        var binaryRightOperandParenthesizerCache;
         return {
+            getParenthesizeLeftSideOfBinaryForOperator: getParenthesizeLeftSideOfBinaryForOperator,
+            getParenthesizeRightSideOfBinaryForOperator: getParenthesizeRightSideOfBinaryForOperator,
             parenthesizeLeftSideOfBinary: parenthesizeLeftSideOfBinary,
             parenthesizeRightSideOfBinary: parenthesizeRightSideOfBinary,
             parenthesizeExpressionOfComputedPropertyName: parenthesizeExpressionOfComputedPropertyName,
@@ -15839,11 +16584,29 @@ var ts;
             parenthesizeConstituentTypesOfUnionOrIntersectionType: parenthesizeConstituentTypesOfUnionOrIntersectionType,
             parenthesizeTypeArguments: parenthesizeTypeArguments,
         };
+        function getParenthesizeLeftSideOfBinaryForOperator(operatorKind) {
+            binaryLeftOperandParenthesizerCache || (binaryLeftOperandParenthesizerCache = new ts.Map());
+            var parenthesizerRule = binaryLeftOperandParenthesizerCache.get(operatorKind);
+            if (!parenthesizerRule) {
+                parenthesizerRule = function (node) { return parenthesizeLeftSideOfBinary(operatorKind, node); };
+                binaryLeftOperandParenthesizerCache.set(operatorKind, parenthesizerRule);
+            }
+            return parenthesizerRule;
+        }
+        function getParenthesizeRightSideOfBinaryForOperator(operatorKind) {
+            binaryRightOperandParenthesizerCache || (binaryRightOperandParenthesizerCache = new ts.Map());
+            var parenthesizerRule = binaryRightOperandParenthesizerCache.get(operatorKind);
+            if (!parenthesizerRule) {
+                parenthesizerRule = function (node) { return parenthesizeRightSideOfBinary(operatorKind, undefined, node); };
+                binaryRightOperandParenthesizerCache.set(operatorKind, parenthesizerRule);
+            }
+            return parenthesizerRule;
+        }
         function binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
-            var binaryOperatorPrecedence = ts.getOperatorPrecedence(216, binaryOperator);
-            var binaryOperatorAssociativity = ts.getOperatorAssociativity(216, binaryOperator);
+            var binaryOperatorPrecedence = ts.getOperatorPrecedence(220, binaryOperator);
+            var binaryOperatorAssociativity = ts.getOperatorAssociativity(220, binaryOperator);
             var emittedOperand = ts.skipPartiallyEmittedExpressions(operand);
-            if (!isLeftSideOfBinary && operand.kind === 209 && binaryOperatorPrecedence > 3) {
+            if (!isLeftSideOfBinary && operand.kind === 213 && binaryOperatorPrecedence > 3) {
                 return true;
             }
             var operandPrecedence = ts.getExpressionPrecedence(emittedOperand);
@@ -15851,7 +16614,7 @@ var ts;
                 case -1:
                     if (!isLeftSideOfBinary
                         && binaryOperatorAssociativity === 1
-                        && operand.kind === 219) {
+                        && operand.kind === 223) {
                         return false;
                     }
                     return true;
@@ -15890,7 +16653,7 @@ var ts;
             if (ts.isLiteralKind(node.kind)) {
                 return node.kind;
             }
-            if (node.kind === 216 && node.operatorToken.kind === 39) {
+            if (node.kind === 220 && node.operatorToken.kind === 39) {
                 if (node.cachedLiteralKind !== undefined) {
                     return node.cachedLiteralKind;
                 }
@@ -15906,7 +16669,7 @@ var ts;
         }
         function parenthesizeBinaryOperand(binaryOperator, operand, isLeftSideOfBinary, leftOperand) {
             var skipped = ts.skipPartiallyEmittedExpressions(operand);
-            if (skipped.kind === 207) {
+            if (skipped.kind === 211) {
                 return operand;
             }
             return binaryOperandNeedsParentheses(binaryOperator, operand, isLeftSideOfBinary, leftOperand)
@@ -15923,7 +16686,7 @@ var ts;
             return ts.isCommaSequence(expression) ? factory.createParenthesizedExpression(expression) : expression;
         }
         function parenthesizeConditionOfConditionalExpression(condition) {
-            var conditionalPrecedence = ts.getOperatorPrecedence(217, 57);
+            var conditionalPrecedence = ts.getOperatorPrecedence(221, 57);
             var emittedCondition = ts.skipPartiallyEmittedExpressions(condition);
             var conditionPrecedence = ts.getExpressionPrecedence(emittedCondition);
             if (ts.compareValues(conditionPrecedence, conditionalPrecedence) !== 1) {
@@ -15942,8 +16705,8 @@ var ts;
             var needsParens = ts.isCommaSequence(check);
             if (!needsParens) {
                 switch (ts.getLeftmostExpression(check, false).kind) {
-                    case 221:
-                    case 208:
+                    case 225:
+                    case 212:
                         needsParens = true;
                 }
             }
@@ -15952,9 +16715,9 @@ var ts;
         function parenthesizeExpressionOfNew(expression) {
             var leftmostExpr = ts.getLeftmostExpression(expression, true);
             switch (leftmostExpr.kind) {
-                case 203:
+                case 207:
                     return factory.createParenthesizedExpression(expression);
-                case 204:
+                case 208:
                     return !leftmostExpr.arguments
                         ? factory.createParenthesizedExpression(expression)
                         : expression;
@@ -15964,7 +16727,7 @@ var ts;
         function parenthesizeLeftSideOfAccess(expression) {
             var emittedExpression = ts.skipPartiallyEmittedExpressions(expression);
             if (ts.isLeftHandSideExpression(emittedExpression)
-                && (emittedExpression.kind !== 204 || emittedExpression.arguments)) {
+                && (emittedExpression.kind !== 208 || emittedExpression.arguments)) {
                 return expression;
             }
             return ts.setTextRange(factory.createParenthesizedExpression(expression), expression);
@@ -15982,7 +16745,7 @@ var ts;
         function parenthesizeExpressionForDisallowedComma(expression) {
             var emittedExpression = ts.skipPartiallyEmittedExpressions(expression);
             var expressionPrecedence = ts.getExpressionPrecedence(emittedExpression);
-            var commaPrecedence = ts.getOperatorPrecedence(216, 27);
+            var commaPrecedence = ts.getOperatorPrecedence(220, 27);
             return expressionPrecedence > commaPrecedence ? expression : ts.setTextRange(factory.createParenthesizedExpression(expression), expression);
         }
         function parenthesizeExpressionOfExpressionStatement(expression) {
@@ -15990,41 +16753,41 @@ var ts;
             if (ts.isCallExpression(emittedExpression)) {
                 var callee = emittedExpression.expression;
                 var kind = ts.skipPartiallyEmittedExpressions(callee).kind;
-                if (kind === 208 || kind === 209) {
+                if (kind === 212 || kind === 213) {
                     var updated = factory.updateCallExpression(emittedExpression, ts.setTextRange(factory.createParenthesizedExpression(callee), callee), emittedExpression.typeArguments, emittedExpression.arguments);
                     return factory.restoreOuterExpressions(expression, updated, 8);
                 }
             }
             var leftmostExpressionKind = ts.getLeftmostExpression(emittedExpression, false).kind;
-            if (leftmostExpressionKind === 200 || leftmostExpressionKind === 208) {
+            if (leftmostExpressionKind === 204 || leftmostExpressionKind === 212) {
                 return ts.setTextRange(factory.createParenthesizedExpression(expression), expression);
             }
             return expression;
         }
         function parenthesizeConciseBodyOfArrowFunction(body) {
-            if (!ts.isBlock(body) && (ts.isCommaSequence(body) || ts.getLeftmostExpression(body, false).kind === 200)) {
+            if (!ts.isBlock(body) && (ts.isCommaSequence(body) || ts.getLeftmostExpression(body, false).kind === 204)) {
                 return ts.setTextRange(factory.createParenthesizedExpression(body), body);
             }
             return body;
         }
         function parenthesizeMemberOfConditionalType(member) {
-            return member.kind === 184 ? factory.createParenthesizedType(member) : member;
+            return member.kind === 188 ? factory.createParenthesizedType(member) : member;
         }
         function parenthesizeMemberOfElementType(member) {
             switch (member.kind) {
-                case 182:
-                case 183:
-                case 174:
-                case 175:
+                case 186:
+                case 187:
+                case 178:
+                case 179:
                     return factory.createParenthesizedType(member);
             }
             return parenthesizeMemberOfConditionalType(member);
         }
         function parenthesizeElementTypeOfArrayType(member) {
             switch (member.kind) {
-                case 176:
-                case 188:
-                case 185:
+                case 180:
+                case 192:
+                case 189:
                     return factory.createParenthesizedType(member);
             }
             return parenthesizeMemberOfElementType(member);
@@ -16043,6 +16806,8 @@ var ts;
     }
     ts.createParenthesizerRules = createParenthesizerRules;
     ts.nullParenthesizerRules = {
+        getParenthesizeLeftSideOfBinaryForOperator: function (_) { return ts.identity; },
+        getParenthesizeRightSideOfBinaryForOperator: function (_) { return ts.identity; },
         parenthesizeLeftSideOfBinary: function (_binaryOperator, leftSide) { return leftSide; },
         parenthesizeRightSideOfBinary: function (_binaryOperator, _leftSide, rightSide) { return rightSide; },
         parenthesizeExpressionOfComputedPropertyName: ts.identity,
@@ -16127,11 +16892,11 @@ var ts;
         }
         function convertToAssignmentPattern(node) {
             switch (node.kind) {
-                case 197:
-                case 199:
+                case 201:
+                case 203:
                     return convertToArrayAssignmentPattern(node);
-                case 196:
                 case 200:
+                case 204:
                     return convertToObjectAssignmentPattern(node);
             }
         }
@@ -16238,6 +17003,8 @@ var ts;
             updateConstructSignature: updateConstructSignature,
             createIndexSignature: createIndexSignature,
             updateIndexSignature: updateIndexSignature,
+            createClassStaticBlockDeclaration: createClassStaticBlockDeclaration,
+            updateClassStaticBlockDeclaration: updateClassStaticBlockDeclaration,
             createTemplateLiteralTypeSpan: createTemplateLiteralTypeSpan,
             updateTemplateLiteralTypeSpan: updateTemplateLiteralTypeSpan,
             createKeywordTypeNode: createKeywordTypeNode,
@@ -16431,6 +17198,10 @@ var ts;
             updateImportDeclaration: updateImportDeclaration,
             createImportClause: createImportClause,
             updateImportClause: updateImportClause,
+            createAssertClause: createAssertClause,
+            updateAssertClause: updateAssertClause,
+            createAssertEntry: createAssertEntry,
+            updateAssertEntry: updateAssertEntry,
             createNamespaceImport: createNamespaceImport,
             updateNamespaceImport: updateNamespaceImport,
             createNamespaceExport: createNamespaceExport,
@@ -16450,18 +17221,18 @@ var ts;
             createMissingDeclaration: createMissingDeclaration,
             createExternalModuleReference: createExternalModuleReference,
             updateExternalModuleReference: updateExternalModuleReference,
-            get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(303); },
-            get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(304); },
-            get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(306); },
-            get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(306); },
-            get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(305); },
-            get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(305); },
-            get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(307); },
-            get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(307); },
-            get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(309); },
-            get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(309); },
-            get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(310); },
-            get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(310); },
+            get createJSDocAllType() { return getJSDocPrimaryTypeCreateFunction(310); },
+            get createJSDocUnknownType() { return getJSDocPrimaryTypeCreateFunction(311); },
+            get createJSDocNonNullableType() { return getJSDocUnaryTypeCreateFunction(313); },
+            get updateJSDocNonNullableType() { return getJSDocUnaryTypeUpdateFunction(313); },
+            get createJSDocNullableType() { return getJSDocUnaryTypeCreateFunction(312); },
+            get updateJSDocNullableType() { return getJSDocUnaryTypeUpdateFunction(312); },
+            get createJSDocOptionalType() { return getJSDocUnaryTypeCreateFunction(314); },
+            get updateJSDocOptionalType() { return getJSDocUnaryTypeUpdateFunction(314); },
+            get createJSDocVariadicType() { return getJSDocUnaryTypeCreateFunction(316); },
+            get updateJSDocVariadicType() { return getJSDocUnaryTypeUpdateFunction(316); },
+            get createJSDocNamepathType() { return getJSDocUnaryTypeCreateFunction(317); },
+            get updateJSDocNamepathType() { return getJSDocUnaryTypeUpdateFunction(317); },
             createJSDocFunctionType: createJSDocFunctionType,
             updateJSDocFunctionType: updateJSDocFunctionType,
             createJSDocTypeLiteral: createJSDocTypeLiteral,
@@ -16488,30 +17259,42 @@ var ts;
             updateJSDocSeeTag: updateJSDocSeeTag,
             createJSDocNameReference: createJSDocNameReference,
             updateJSDocNameReference: updateJSDocNameReference,
-            get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(329); },
-            get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(329); },
-            get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(327); },
-            get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(327); },
-            get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(328); },
-            get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(328); },
-            get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(325); },
-            get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(325); },
-            get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(317); },
-            get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(317); },
-            get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(319); },
-            get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(319); },
-            get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(320); },
-            get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(320); },
-            get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(321); },
-            get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(321); },
-            get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(322); },
-            get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(322); },
-            get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(323); },
-            get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(323); },
-            get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(318); },
-            get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(318); },
+            createJSDocMemberName: createJSDocMemberName,
+            updateJSDocMemberName: updateJSDocMemberName,
+            createJSDocLink: createJSDocLink,
+            updateJSDocLink: updateJSDocLink,
+            createJSDocLinkCode: createJSDocLinkCode,
+            updateJSDocLinkCode: updateJSDocLinkCode,
+            createJSDocLinkPlain: createJSDocLinkPlain,
+            updateJSDocLinkPlain: updateJSDocLinkPlain,
+            get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(341); },
+            get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(341); },
+            get createJSDocReturnTag() { return getJSDocTypeLikeTagCreateFunction(339); },
+            get updateJSDocReturnTag() { return getJSDocTypeLikeTagUpdateFunction(339); },
+            get createJSDocThisTag() { return getJSDocTypeLikeTagCreateFunction(340); },
+            get updateJSDocThisTag() { return getJSDocTypeLikeTagUpdateFunction(340); },
+            get createJSDocEnumTag() { return getJSDocTypeLikeTagCreateFunction(337); },
+            get updateJSDocEnumTag() { return getJSDocTypeLikeTagUpdateFunction(337); },
+            get createJSDocAuthorTag() { return getJSDocSimpleTagCreateFunction(328); },
+            get updateJSDocAuthorTag() { return getJSDocSimpleTagUpdateFunction(328); },
+            get createJSDocClassTag() { return getJSDocSimpleTagCreateFunction(330); },
+            get updateJSDocClassTag() { return getJSDocSimpleTagUpdateFunction(330); },
+            get createJSDocPublicTag() { return getJSDocSimpleTagCreateFunction(331); },
+            get updateJSDocPublicTag() { return getJSDocSimpleTagUpdateFunction(331); },
+            get createJSDocPrivateTag() { return getJSDocSimpleTagCreateFunction(332); },
+            get updateJSDocPrivateTag() { return getJSDocSimpleTagUpdateFunction(332); },
+            get createJSDocProtectedTag() { return getJSDocSimpleTagCreateFunction(333); },
+            get updateJSDocProtectedTag() { return getJSDocSimpleTagUpdateFunction(333); },
+            get createJSDocReadonlyTag() { return getJSDocSimpleTagCreateFunction(334); },
+            get updateJSDocReadonlyTag() { return getJSDocSimpleTagUpdateFunction(334); },
+            get createJSDocOverrideTag() { return getJSDocSimpleTagCreateFunction(335); },
+            get updateJSDocOverrideTag() { return getJSDocSimpleTagUpdateFunction(335); },
+            get createJSDocDeprecatedTag() { return getJSDocSimpleTagCreateFunction(329); },
+            get updateJSDocDeprecatedTag() { return getJSDocSimpleTagUpdateFunction(329); },
             createJSDocUnknownTag: createJSDocUnknownTag,
             updateJSDocUnknownTag: updateJSDocUnknownTag,
+            createJSDocText: createJSDocText,
+            updateJSDocText: updateJSDocText,
             createJSDocComment: createJSDocComment,
             updateJSDocComment: updateJSDocComment,
             createJsxElement: createJsxElement,
@@ -16575,7 +17358,7 @@ var ts;
             updateSyntheticReferenceExpression: updateSyntheticReferenceExpression,
             cloneNode: cloneNode,
             get createComma() { return getBinaryCreateFunction(27); },
-            get createAssignment() { return getBinaryCreateFunction(62); },
+            get createAssignment() { return getBinaryCreateFunction(63); },
             get createLogicalOr() { return getBinaryCreateFunction(56); },
             get createLogicalAnd() { return getBinaryCreateFunction(55); },
             get createBitwiseOr() { return getBinaryCreateFunction(51); },
@@ -16620,8 +17403,11 @@ var ts;
             createArraySliceCall: createArraySliceCall,
             createArrayConcatCall: createArrayConcatCall,
             createObjectDefinePropertyCall: createObjectDefinePropertyCall,
+            createReflectGetCall: createReflectGetCall,
+            createReflectSetCall: createReflectSetCall,
             createPropertyDescriptor: createPropertyDescriptor,
             createCallBinding: createCallBinding,
+            createAssignmentTargetWrapper: createAssignmentTargetWrapper,
             inlineExpressions: inlineExpressions,
             getInternalName: getInternalName,
             getLocalName: getLocalName,
@@ -16646,11 +17432,20 @@ var ts;
                 elements = [];
             }
             else if (ts.isNodeArray(elements)) {
-                if (elements.transformFlags === undefined) {
-                    aggregateChildrenFlags(elements);
+                if (hasTrailingComma === undefined || elements.hasTrailingComma === hasTrailingComma) {
+                    if (elements.transformFlags === undefined) {
+                        aggregateChildrenFlags(elements);
+                    }
+                    ts.Debug.attachNodeArrayDebugInfo(elements);
+                    return elements;
                 }
-                ts.Debug.attachNodeArrayDebugInfo(elements);
-                return elements;
+                var array_8 = elements.slice();
+                array_8.pos = elements.pos;
+                array_8.end = elements.end;
+                array_8.hasTrailingComma = hasTrailingComma;
+                array_8.transformFlags = elements.transformFlags;
+                ts.Debug.attachNodeArrayDebugInfo(array_8);
+                return array_8;
             }
             var length = elements.length;
             var array = (length >= 1 && length <= 4 ? elements.slice() : elements);
@@ -16682,11 +17477,11 @@ var ts;
             node.name = name;
             if (name) {
                 switch (node.kind) {
-                    case 165:
-                    case 167:
                     case 168:
-                    case 163:
-                    case 288:
+                    case 171:
+                    case 172:
+                    case 166:
+                    case 294:
                         if (ts.isIdentifier(name)) {
                             node.transformFlags |= propagateIdentifierNameFlags(name);
                             break;
@@ -16725,7 +17520,7 @@ var ts;
         function createBaseFunctionLikeDeclaration(kind, decorators, modifiers, name, typeParameters, parameters, type, body) {
             var node = createBaseSignatureDeclaration(kind, decorators, modifiers, name, typeParameters, parameters, type);
             node.body = body;
-            node.transformFlags |= propagateChildFlags(node.body) & ~8388608;
+            node.transformFlags |= propagateChildFlags(node.body) & ~16777216;
             if (!body)
                 node.transformFlags |= 1;
             return node;
@@ -16773,7 +17568,7 @@ var ts;
             var node = createBaseLiteral(8, typeof value === "number" ? value + "" : value);
             node.numericLiteralFlags = numericLiteralFlags;
             if (numericLiteralFlags & 384)
-                node.transformFlags |= 256;
+                node.transformFlags |= 512;
             return node;
         }
         function createBigIntLiteral(value) {
@@ -16790,7 +17585,7 @@ var ts;
             var node = createBaseStringLiteral(text, isSingleQuote);
             node.hasExtendedUnicodeEscape = hasExtendedUnicodeEscape;
             if (hasExtendedUnicodeEscape)
-                node.transformFlags |= 256;
+                node.transformFlags |= 512;
             return node;
         }
         function createStringLiteralFromNode(sourceNode) {
@@ -16817,10 +17612,10 @@ var ts;
             if (originalKeywordKind === undefined && text) {
                 originalKeywordKind = ts.stringToToken(text);
             }
-            if (originalKeywordKind === 78) {
+            if (originalKeywordKind === 79) {
                 originalKeywordKind = undefined;
             }
-            var node = baseFactory.createBaseIdentifierNode(78);
+            var node = baseFactory.createBaseIdentifierNode(79);
             node.originalKeywordKind = originalKeywordKind;
             node.escapedText = ts.escapeLeadingUnderscores(text);
             return node;
@@ -16837,8 +17632,8 @@ var ts;
             if (typeArguments) {
                 node.typeArguments = createNodeArray(typeArguments);
             }
-            if (node.originalKeywordKind === 130) {
-                node.transformFlags |= 8388608;
+            if (node.originalKeywordKind === 132) {
+                node.transformFlags |= 16777216;
             }
             return node;
         }
@@ -16857,8 +17652,11 @@ var ts;
             }
             return name;
         }
-        function createLoopVariable() {
-            return createBaseGeneratedIdentifier("", 2);
+        function createLoopVariable(reservedInNestedScopes) {
+            var flags = 2;
+            if (reservedInNestedScopes)
+                flags |= 8;
+            return createBaseGeneratedIdentifier("", flags);
         }
         function createUniqueName(text, flags) {
             if (flags === void 0) { flags = 0; }
@@ -16876,53 +17674,56 @@ var ts;
         function createPrivateIdentifier(text) {
             if (!ts.startsWith(text, "#"))
                 ts.Debug.fail("First character of private identifier must be #: " + text);
-            var node = baseFactory.createBasePrivateIdentifierNode(79);
+            var node = baseFactory.createBasePrivateIdentifierNode(80);
             node.escapedText = ts.escapeLeadingUnderscores(text);
-            node.transformFlags |= 4194304;
+            node.transformFlags |= 8388608;
             return node;
         }
         function createBaseToken(kind) {
             return baseFactory.createBaseTokenNode(kind);
         }
         function createToken(token) {
-            ts.Debug.assert(token >= 0 && token <= 156, "Invalid token");
+            ts.Debug.assert(token >= 0 && token <= 159, "Invalid token");
             ts.Debug.assert(token <= 14 || token >= 17, "Invalid token. Use 'createTemplateLiteralLikeNode' to create template literals.");
             ts.Debug.assert(token <= 8 || token >= 14, "Invalid token. Use 'createLiteralLikeNode' to create literals.");
-            ts.Debug.assert(token !== 78, "Invalid token. Use 'createIdentifier' to create identifiers");
+            ts.Debug.assert(token !== 79, "Invalid token. Use 'createIdentifier' to create identifiers");
             var node = createBaseToken(token);
             var transformFlags = 0;
             switch (token) {
-                case 129:
+                case 131:
                     transformFlags =
-                        64 |
-                            32;
+                        128 |
+                            64;
                     break;
-                case 122:
-                case 120:
+                case 123:
                 case 121:
-                case 142:
-                case 125:
-                case 133:
-                case 84:
-                case 128:
+                case 122:
                 case 144:
-                case 155:
-                case 141:
-                case 145:
+                case 126:
+                case 135:
+                case 85:
+                case 130:
+                case 146:
+                case 157:
+                case 143:
                 case 147:
-                case 131:
-                case 148:
-                case 113:
-                case 152:
+                case 158:
+                case 149:
+                case 133:
                 case 150:
+                case 114:
+                case 154:
+                case 152:
                     transformFlags = 1;
                     break;
-                case 123:
-                case 105:
-                    transformFlags = 256;
+                case 106:
+                    transformFlags = 512 | 33554432;
                     break;
-                case 107:
-                    transformFlags = 4096;
+                case 124:
+                    transformFlags = 512;
+                    break;
+                case 108:
+                    transformFlags = 8192;
                     break;
             }
             if (transformFlags) {
@@ -16931,62 +17732,53 @@ var ts;
             return node;
         }
         function createSuper() {
-            return createToken(105);
+            return createToken(106);
         }
         function createThis() {
-            return createToken(107);
+            return createToken(108);
         }
         function createNull() {
-            return createToken(103);
+            return createToken(104);
         }
         function createTrue() {
-            return createToken(109);
+            return createToken(110);
         }
         function createFalse() {
-            return createToken(94);
+            return createToken(95);
         }
         function createModifier(kind) {
             return createToken(kind);
         }
         function createModifiersFromModifierFlags(flags) {
             var result = [];
-            if (flags & 1) {
-                result.push(createModifier(92));
-            }
-            if (flags & 2) {
-                result.push(createModifier(133));
-            }
-            if (flags & 512) {
-                result.push(createModifier(87));
-            }
-            if (flags & 2048) {
-                result.push(createModifier(84));
-            }
-            if (flags & 4) {
-                result.push(createModifier(122));
-            }
-            if (flags & 8) {
-                result.push(createModifier(120));
-            }
-            if (flags & 16) {
-                result.push(createModifier(121));
-            }
-            if (flags & 128) {
-                result.push(createModifier(125));
-            }
-            if (flags & 32) {
+            if (flags & 1)
+                result.push(createModifier(93));
+            if (flags & 2)
+                result.push(createModifier(135));
+            if (flags & 512)
+                result.push(createModifier(88));
+            if (flags & 2048)
+                result.push(createModifier(85));
+            if (flags & 4)
                 result.push(createModifier(123));
-            }
-            if (flags & 64) {
-                result.push(createModifier(142));
-            }
-            if (flags & 256) {
-                result.push(createModifier(129));
-            }
+            if (flags & 8)
+                result.push(createModifier(121));
+            if (flags & 16)
+                result.push(createModifier(122));
+            if (flags & 128)
+                result.push(createModifier(126));
+            if (flags & 32)
+                result.push(createModifier(124));
+            if (flags & 16384)
+                result.push(createModifier(158));
+            if (flags & 64)
+                result.push(createModifier(144));
+            if (flags & 256)
+                result.push(createModifier(131));
             return result;
         }
         function createQualifiedName(left, right) {
-            var node = createBaseNode(157);
+            var node = createBaseNode(160);
             node.left = left;
             node.right = asName(right);
             node.transformFlags |=
@@ -17001,12 +17793,12 @@ var ts;
                 : node;
         }
         function createComputedPropertyName(expression) {
-            var node = createBaseNode(158);
+            var node = createBaseNode(161);
             node.expression = parenthesizerRules().parenthesizeExpressionOfComputedPropertyName(expression);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
-                    256 |
-                    32768;
+                    512 |
+                    65536;
             return node;
         }
         function updateComputedPropertyName(node, expression) {
@@ -17015,7 +17807,7 @@ var ts;
                 : node;
         }
         function createTypeParameterDeclaration(name, constraint, defaultType) {
-            var node = createBaseNamedDeclaration(159, undefined, undefined, name);
+            var node = createBaseNamedDeclaration(162, undefined, undefined, name);
             node.constraint = constraint;
             node.default = defaultType;
             node.transformFlags = 1;
@@ -17029,7 +17821,7 @@ var ts;
                 : node;
         }
         function createParameterDeclaration(decorators, modifiers, dotDotDotToken, name, questionToken, type, initializer) {
-            var node = createBaseVariableLikeDeclaration(160, decorators, modifiers, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
+            var node = createBaseVariableLikeDeclaration(163, decorators, modifiers, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
             node.dotDotDotToken = dotDotDotToken;
             node.questionToken = questionToken;
             if (ts.isThisIdentifier(node.name)) {
@@ -17041,10 +17833,10 @@ var ts;
                         propagateChildFlags(node.questionToken);
                 if (questionToken)
                     node.transformFlags |= 1;
-                if (ts.modifiersToFlags(node.modifiers) & 92)
-                    node.transformFlags |= 2048;
+                if (ts.modifiersToFlags(node.modifiers) & 16476)
+                    node.transformFlags |= 4096;
                 if (initializer || dotDotDotToken)
-                    node.transformFlags |= 256;
+                    node.transformFlags |= 512;
             }
             return node;
         }
@@ -17060,12 +17852,12 @@ var ts;
                 : node;
         }
         function createDecorator(expression) {
-            var node = createBaseNode(161);
+            var node = createBaseNode(164);
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
                     1 |
-                    2048;
+                    4096;
             return node;
         }
         function updateDecorator(node, expression) {
@@ -17074,7 +17866,7 @@ var ts;
                 : node;
         }
         function createPropertySignature(modifiers, name, questionToken, type) {
-            var node = createBaseNamedDeclaration(162, undefined, modifiers, name);
+            var node = createBaseNamedDeclaration(165, undefined, modifiers, name);
             node.type = type;
             node.questionToken = questionToken;
             node.transformFlags = 1;
@@ -17089,15 +17881,15 @@ var ts;
                 : node;
         }
         function createPropertyDeclaration(decorators, modifiers, name, questionOrExclamationToken, type, initializer) {
-            var node = createBaseVariableLikeDeclaration(163, decorators, modifiers, name, type, initializer);
+            var node = createBaseVariableLikeDeclaration(166, decorators, modifiers, name, type, initializer);
             node.questionToken = questionOrExclamationToken && ts.isQuestionToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined;
             node.exclamationToken = questionOrExclamationToken && ts.isExclamationToken(questionOrExclamationToken) ? questionOrExclamationToken : undefined;
             node.transformFlags |=
                 propagateChildFlags(node.questionToken) |
                     propagateChildFlags(node.exclamationToken) |
-                    4194304;
+                    8388608;
             if (ts.isComputedPropertyName(node.name) || (ts.hasStaticModifier(node) && node.initializer)) {
-                node.transformFlags |= 2048;
+                node.transformFlags |= 4096;
             }
             if (questionOrExclamationToken || ts.modifiersToFlags(node.modifiers) & 2) {
                 node.transformFlags |= 1;
@@ -17116,7 +17908,7 @@ var ts;
                 : node;
         }
         function createMethodSignature(modifiers, name, questionToken, typeParameters, parameters, type) {
-            var node = createBaseSignatureDeclaration(164, undefined, modifiers, name, typeParameters, parameters, type);
+            var node = createBaseSignatureDeclaration(167, undefined, modifiers, name, typeParameters, parameters, type);
             node.questionToken = questionToken;
             node.transformFlags = 1;
             return node;
@@ -17132,26 +17924,26 @@ var ts;
                 : node;
         }
         function createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body) {
-            var node = createBaseFunctionLikeDeclaration(165, decorators, modifiers, name, typeParameters, parameters, type, body);
+            var node = createBaseFunctionLikeDeclaration(168, decorators, modifiers, name, typeParameters, parameters, type, body);
             node.asteriskToken = asteriskToken;
             node.questionToken = questionToken;
             node.transformFlags |=
                 propagateChildFlags(node.asteriskToken) |
                     propagateChildFlags(node.questionToken) |
-                    256;
+                    512;
             if (questionToken) {
                 node.transformFlags |= 1;
             }
             if (ts.modifiersToFlags(node.modifiers) & 256) {
                 if (asteriskToken) {
-                    node.transformFlags |= 32;
+                    node.transformFlags |= 64;
                 }
                 else {
-                    node.transformFlags |= 64;
+                    node.transformFlags |= 128;
                 }
             }
             else if (asteriskToken) {
-                node.transformFlags |= 512;
+                node.transformFlags |= 1024;
             }
             return node;
         }
@@ -17168,9 +17960,22 @@ var ts;
                 ? updateBaseFunctionLikeDeclaration(createMethodDeclaration(decorators, modifiers, asteriskToken, name, questionToken, typeParameters, parameters, type, body), node)
                 : node;
         }
+        function createClassStaticBlockDeclaration(decorators, modifiers, body) {
+            var node = createBaseGenericNamedDeclaration(169, decorators, modifiers, undefined, undefined);
+            node.body = body;
+            node.transformFlags = propagateChildFlags(body) | 8388608;
+            return node;
+        }
+        function updateClassStaticBlockDeclaration(node, decorators, modifiers, body) {
+            return node.decorators !== decorators
+                || node.modifier !== modifiers
+                || node.body !== body
+                ? update(createClassStaticBlockDeclaration(decorators, modifiers, body), node)
+                : node;
+        }
         function createConstructorDeclaration(decorators, modifiers, parameters, body) {
-            var node = createBaseFunctionLikeDeclaration(166, decorators, modifiers, undefined, undefined, parameters, undefined, body);
-            node.transformFlags |= 256;
+            var node = createBaseFunctionLikeDeclaration(170, decorators, modifiers, undefined, undefined, parameters, undefined, body);
+            node.transformFlags |= 512;
             return node;
         }
         function updateConstructorDeclaration(node, decorators, modifiers, parameters, body) {
@@ -17182,7 +17987,7 @@ var ts;
                 : node;
         }
         function createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body) {
-            return createBaseFunctionLikeDeclaration(167, decorators, modifiers, name, undefined, parameters, type, body);
+            return createBaseFunctionLikeDeclaration(171, decorators, modifiers, name, undefined, parameters, type, body);
         }
         function updateGetAccessorDeclaration(node, decorators, modifiers, name, parameters, type, body) {
             return node.decorators !== decorators
@@ -17195,7 +18000,7 @@ var ts;
                 : node;
         }
         function createSetAccessorDeclaration(decorators, modifiers, name, parameters, body) {
-            return createBaseFunctionLikeDeclaration(168, decorators, modifiers, name, undefined, parameters, undefined, body);
+            return createBaseFunctionLikeDeclaration(172, decorators, modifiers, name, undefined, parameters, undefined, body);
         }
         function updateSetAccessorDeclaration(node, decorators, modifiers, name, parameters, body) {
             return node.decorators !== decorators
@@ -17207,7 +18012,7 @@ var ts;
                 : node;
         }
         function createCallSignature(typeParameters, parameters, type) {
-            var node = createBaseSignatureDeclaration(169, undefined, undefined, undefined, typeParameters, parameters, type);
+            var node = createBaseSignatureDeclaration(173, undefined, undefined, undefined, typeParameters, parameters, type);
             node.transformFlags = 1;
             return node;
         }
@@ -17219,7 +18024,7 @@ var ts;
                 : node;
         }
         function createConstructSignature(typeParameters, parameters, type) {
-            var node = createBaseSignatureDeclaration(170, undefined, undefined, undefined, typeParameters, parameters, type);
+            var node = createBaseSignatureDeclaration(174, undefined, undefined, undefined, typeParameters, parameters, type);
             node.transformFlags = 1;
             return node;
         }
@@ -17231,7 +18036,7 @@ var ts;
                 : node;
         }
         function createIndexSignature(decorators, modifiers, parameters, type) {
-            var node = createBaseSignatureDeclaration(171, decorators, modifiers, undefined, undefined, parameters, type);
+            var node = createBaseSignatureDeclaration(175, decorators, modifiers, undefined, undefined, parameters, type);
             node.transformFlags = 1;
             return node;
         }
@@ -17244,7 +18049,7 @@ var ts;
                 : node;
         }
         function createTemplateLiteralTypeSpan(type, literal) {
-            var node = createBaseNode(194);
+            var node = createBaseNode(198);
             node.type = type;
             node.literal = literal;
             node.transformFlags = 1;
@@ -17260,7 +18065,7 @@ var ts;
             return createToken(kind);
         }
         function createTypePredicateNode(assertsModifier, parameterName, type) {
-            var node = createBaseNode(172);
+            var node = createBaseNode(176);
             node.assertsModifier = assertsModifier;
             node.parameterName = asName(parameterName);
             node.type = type;
@@ -17275,7 +18080,7 @@ var ts;
                 : node;
         }
         function createTypeReferenceNode(typeName, typeArguments) {
-            var node = createBaseNode(173);
+            var node = createBaseNode(177);
             node.typeName = asName(typeName);
             node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(createNodeArray(typeArguments));
             node.transformFlags = 1;
@@ -17288,7 +18093,7 @@ var ts;
                 : node;
         }
         function createFunctionTypeNode(typeParameters, parameters, type) {
-            var node = createBaseSignatureDeclaration(174, undefined, undefined, undefined, typeParameters, parameters, type);
+            var node = createBaseSignatureDeclaration(178, undefined, undefined, undefined, typeParameters, parameters, type);
             node.transformFlags = 1;
             return node;
         }
@@ -17309,7 +18114,7 @@ var ts;
                     ts.Debug.fail("Incorrect number of arguments specified.");
         }
         function createConstructorTypeNode1(modifiers, typeParameters, parameters, type) {
-            var node = createBaseSignatureDeclaration(175, undefined, modifiers, undefined, typeParameters, parameters, type);
+            var node = createBaseSignatureDeclaration(179, undefined, modifiers, undefined, typeParameters, parameters, type);
             node.transformFlags = 1;
             return node;
         }
@@ -17337,7 +18142,7 @@ var ts;
             return updateConstructorTypeNode1(node, node.modifiers, typeParameters, parameters, type);
         }
         function createTypeQueryNode(exprName) {
-            var node = createBaseNode(176);
+            var node = createBaseNode(180);
             node.exprName = exprName;
             node.transformFlags = 1;
             return node;
@@ -17348,7 +18153,7 @@ var ts;
                 : node;
         }
         function createTypeLiteralNode(members) {
-            var node = createBaseNode(177);
+            var node = createBaseNode(181);
             node.members = createNodeArray(members);
             node.transformFlags = 1;
             return node;
@@ -17359,7 +18164,7 @@ var ts;
                 : node;
         }
         function createArrayTypeNode(elementType) {
-            var node = createBaseNode(178);
+            var node = createBaseNode(182);
             node.elementType = parenthesizerRules().parenthesizeElementTypeOfArrayType(elementType);
             node.transformFlags = 1;
             return node;
@@ -17370,7 +18175,7 @@ var ts;
                 : node;
         }
         function createTupleTypeNode(elements) {
-            var node = createBaseNode(179);
+            var node = createBaseNode(183);
             node.elements = createNodeArray(elements);
             node.transformFlags = 1;
             return node;
@@ -17381,7 +18186,7 @@ var ts;
                 : node;
         }
         function createNamedTupleMember(dotDotDotToken, name, questionToken, type) {
-            var node = createBaseNode(192);
+            var node = createBaseNode(196);
             node.dotDotDotToken = dotDotDotToken;
             node.name = name;
             node.questionToken = questionToken;
@@ -17398,7 +18203,7 @@ var ts;
                 : node;
         }
         function createOptionalTypeNode(type) {
-            var node = createBaseNode(180);
+            var node = createBaseNode(184);
             node.type = parenthesizerRules().parenthesizeElementTypeOfArrayType(type);
             node.transformFlags = 1;
             return node;
@@ -17409,7 +18214,7 @@ var ts;
                 : node;
         }
         function createRestTypeNode(type) {
-            var node = createBaseNode(181);
+            var node = createBaseNode(185);
             node.type = type;
             node.transformFlags = 1;
             return node;
@@ -17431,19 +18236,19 @@ var ts;
                 : node;
         }
         function createUnionTypeNode(types) {
-            return createUnionOrIntersectionTypeNode(182, types);
+            return createUnionOrIntersectionTypeNode(186, types);
         }
         function updateUnionTypeNode(node, types) {
             return updateUnionOrIntersectionTypeNode(node, types);
         }
         function createIntersectionTypeNode(types) {
-            return createUnionOrIntersectionTypeNode(183, types);
+            return createUnionOrIntersectionTypeNode(187, types);
         }
         function updateIntersectionTypeNode(node, types) {
             return updateUnionOrIntersectionTypeNode(node, types);
         }
         function createConditionalTypeNode(checkType, extendsType, trueType, falseType) {
-            var node = createBaseNode(184);
+            var node = createBaseNode(188);
             node.checkType = parenthesizerRules().parenthesizeMemberOfConditionalType(checkType);
             node.extendsType = parenthesizerRules().parenthesizeMemberOfConditionalType(extendsType);
             node.trueType = trueType;
@@ -17460,7 +18265,7 @@ var ts;
                 : node;
         }
         function createInferTypeNode(typeParameter) {
-            var node = createBaseNode(185);
+            var node = createBaseNode(189);
             node.typeParameter = typeParameter;
             node.transformFlags = 1;
             return node;
@@ -17471,7 +18276,7 @@ var ts;
                 : node;
         }
         function createTemplateLiteralType(head, templateSpans) {
-            var node = createBaseNode(193);
+            var node = createBaseNode(197);
             node.head = head;
             node.templateSpans = createNodeArray(templateSpans);
             node.transformFlags = 1;
@@ -17485,7 +18290,7 @@ var ts;
         }
         function createImportTypeNode(argument, qualifier, typeArguments, isTypeOf) {
             if (isTypeOf === void 0) { isTypeOf = false; }
-            var node = createBaseNode(195);
+            var node = createBaseNode(199);
             node.argument = argument;
             node.qualifier = qualifier;
             node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
@@ -17503,7 +18308,7 @@ var ts;
                 : node;
         }
         function createParenthesizedType(type) {
-            var node = createBaseNode(186);
+            var node = createBaseNode(190);
             node.type = type;
             node.transformFlags = 1;
             return node;
@@ -17514,12 +18319,12 @@ var ts;
                 : node;
         }
         function createThisTypeNode() {
-            var node = createBaseNode(187);
+            var node = createBaseNode(191);
             node.transformFlags = 1;
             return node;
         }
         function createTypeOperatorNode(operator, type) {
-            var node = createBaseNode(188);
+            var node = createBaseNode(192);
             node.operator = operator;
             node.type = parenthesizerRules().parenthesizeMemberOfElementType(type);
             node.transformFlags = 1;
@@ -17531,7 +18336,7 @@ var ts;
                 : node;
         }
         function createIndexedAccessTypeNode(objectType, indexType) {
-            var node = createBaseNode(189);
+            var node = createBaseNode(193);
             node.objectType = parenthesizerRules().parenthesizeMemberOfElementType(objectType);
             node.indexType = indexType;
             node.transformFlags = 1;
@@ -17543,27 +18348,29 @@ var ts;
                 ? update(createIndexedAccessTypeNode(objectType, indexType), node)
                 : node;
         }
-        function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type) {
-            var node = createBaseNode(190);
+        function createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members) {
+            var node = createBaseNode(194);
             node.readonlyToken = readonlyToken;
             node.typeParameter = typeParameter;
             node.nameType = nameType;
             node.questionToken = questionToken;
             node.type = type;
+            node.members = members && createNodeArray(members);
             node.transformFlags = 1;
             return node;
         }
-        function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type) {
+        function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type, members) {
             return node.readonlyToken !== readonlyToken
                 || node.typeParameter !== typeParameter
                 || node.nameType !== nameType
                 || node.questionToken !== questionToken
                 || node.type !== type
-                ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), node)
+                || node.members !== members
+                ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), node)
                 : node;
         }
         function createLiteralTypeNode(literal) {
-            var node = createBaseNode(191);
+            var node = createBaseNode(195);
             node.literal = literal;
             node.transformFlags = 1;
             return node;
@@ -17574,16 +18381,16 @@ var ts;
                 : node;
         }
         function createObjectBindingPattern(elements) {
-            var node = createBaseNode(196);
+            var node = createBaseNode(200);
             node.elements = createNodeArray(elements);
             node.transformFlags |=
                 propagateChildrenFlags(node.elements) |
-                    256 |
-                    131072;
-            if (node.transformFlags & 8192) {
+                    512 |
+                    262144;
+            if (node.transformFlags & 16384) {
                 node.transformFlags |=
-                    32 |
-                        16384;
+                    64 |
+                        32768;
             }
             return node;
         }
@@ -17593,12 +18400,12 @@ var ts;
                 : node;
         }
         function createArrayBindingPattern(elements) {
-            var node = createBaseNode(197);
+            var node = createBaseNode(201);
             node.elements = createNodeArray(elements);
             node.transformFlags |=
                 propagateChildrenFlags(node.elements) |
-                    256 |
-                    131072;
+                    512 |
+                    262144;
             return node;
         }
         function updateArrayBindingPattern(node, elements) {
@@ -17607,19 +18414,19 @@ var ts;
                 : node;
         }
         function createBindingElement(dotDotDotToken, propertyName, name, initializer) {
-            var node = createBaseBindingLikeDeclaration(198, undefined, undefined, name, initializer);
+            var node = createBaseBindingLikeDeclaration(202, undefined, undefined, name, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
             node.propertyName = asName(propertyName);
             node.dotDotDotToken = dotDotDotToken;
             node.transformFlags |=
                 propagateChildFlags(node.dotDotDotToken) |
-                    256;
+                    512;
             if (node.propertyName) {
                 node.transformFlags |= ts.isIdentifier(node.propertyName) ?
                     propagateIdentifierNameFlags(node.propertyName) :
                     propagateChildFlags(node.propertyName);
             }
             if (dotDotDotToken)
-                node.transformFlags |= 8192;
+                node.transformFlags |= 16384;
             return node;
         }
         function updateBindingElement(node, dotDotDotToken, propertyName, name, initializer) {
@@ -17635,8 +18442,10 @@ var ts;
             return node;
         }
         function createArrayLiteralExpression(elements, multiLine) {
-            var node = createBaseExpression(199);
-            node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(elements));
+            var node = createBaseExpression(203);
+            var lastElement = elements && ts.lastOrUndefined(elements);
+            var elementsArray = createNodeArray(elements, lastElement && ts.isOmittedExpression(lastElement) ? true : undefined);
+            node.elements = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(elementsArray);
             node.multiLine = multiLine;
             node.transformFlags |= propagateChildrenFlags(node.elements);
             return node;
@@ -17647,7 +18456,7 @@ var ts;
                 : node;
         }
         function createObjectLiteralExpression(properties, multiLine) {
-            var node = createBaseExpression(200);
+            var node = createBaseExpression(204);
             node.properties = createNodeArray(properties);
             node.multiLine = multiLine;
             node.transformFlags |= propagateChildrenFlags(node.properties);
@@ -17659,7 +18468,7 @@ var ts;
                 : node;
         }
         function createPropertyAccessExpression(expression, name) {
-            var node = createBaseExpression(201);
+            var node = createBaseExpression(205);
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.name = asName(name);
             node.transformFlags =
@@ -17669,8 +18478,8 @@ var ts;
                         propagateChildFlags(node.name));
             if (ts.isSuperKeyword(expression)) {
                 node.transformFlags |=
-                    64 |
-                        32;
+                    128 |
+                        64;
             }
             return node;
         }
@@ -17684,13 +18493,13 @@ var ts;
                 : node;
         }
         function createPropertyAccessChain(expression, questionDotToken, name) {
-            var node = createBaseExpression(201);
+            var node = createBaseExpression(205);
             node.flags |= 32;
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.questionDotToken = questionDotToken;
             node.name = asName(name);
             node.transformFlags |=
-                8 |
+                16 |
                     propagateChildFlags(node.expression) |
                     propagateChildFlags(node.questionDotToken) |
                     (ts.isIdentifier(node.name) ?
@@ -17707,7 +18516,7 @@ var ts;
                 : node;
         }
         function createElementAccessExpression(expression, index) {
-            var node = createBaseExpression(202);
+            var node = createBaseExpression(206);
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.argumentExpression = asExpression(index);
             node.transformFlags |=
@@ -17715,8 +18524,8 @@ var ts;
                     propagateChildFlags(node.argumentExpression);
             if (ts.isSuperKeyword(expression)) {
                 node.transformFlags |=
-                    64 |
-                        32;
+                    128 |
+                        64;
             }
             return node;
         }
@@ -17730,7 +18539,7 @@ var ts;
                 : node;
         }
         function createElementAccessChain(expression, questionDotToken, index) {
-            var node = createBaseExpression(202);
+            var node = createBaseExpression(206);
             node.flags |= 32;
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.questionDotToken = questionDotToken;
@@ -17739,7 +18548,7 @@ var ts;
                 propagateChildFlags(node.expression) |
                     propagateChildFlags(node.questionDotToken) |
                     propagateChildFlags(node.argumentExpression) |
-                    8;
+                    16;
             return node;
         }
         function updateElementAccessChain(node, expression, questionDotToken, argumentExpression) {
@@ -17751,7 +18560,7 @@ var ts;
                 : node;
         }
         function createCallExpression(expression, typeArguments, argumentsArray) {
-            var node = createBaseExpression(203);
+            var node = createBaseExpression(207);
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.typeArguments = asNodeArray(typeArguments);
             node.arguments = parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(createNodeArray(argumentsArray));
@@ -17763,10 +18572,10 @@ var ts;
                 node.transformFlags |= 1;
             }
             if (ts.isImportKeyword(node.expression)) {
-                node.transformFlags |= 2097152;
+                node.transformFlags |= 4194304;
             }
             else if (ts.isSuperProperty(node.expression)) {
-                node.transformFlags |= 4096;
+                node.transformFlags |= 8192;
             }
             return node;
         }
@@ -17781,7 +18590,7 @@ var ts;
                 : node;
         }
         function createCallChain(expression, questionDotToken, typeArguments, argumentsArray) {
-            var node = createBaseExpression(203);
+            var node = createBaseExpression(207);
             node.flags |= 32;
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.questionDotToken = questionDotToken;
@@ -17792,12 +18601,12 @@ var ts;
                     propagateChildFlags(node.questionDotToken) |
                     propagateChildrenFlags(node.typeArguments) |
                     propagateChildrenFlags(node.arguments) |
-                    8;
+                    16;
             if (node.typeArguments) {
                 node.transformFlags |= 1;
             }
             if (ts.isSuperProperty(node.expression)) {
-                node.transformFlags |= 4096;
+                node.transformFlags |= 8192;
             }
             return node;
         }
@@ -17811,7 +18620,7 @@ var ts;
                 : node;
         }
         function createNewExpression(expression, typeArguments, argumentsArray) {
-            var node = createBaseExpression(204);
+            var node = createBaseExpression(208);
             node.expression = parenthesizerRules().parenthesizeExpressionOfNew(expression);
             node.typeArguments = asNodeArray(typeArguments);
             node.arguments = argumentsArray ? parenthesizerRules().parenthesizeExpressionsOfCommaDelimitedList(argumentsArray) : undefined;
@@ -17819,7 +18628,7 @@ var ts;
                 propagateChildFlags(node.expression) |
                     propagateChildrenFlags(node.typeArguments) |
                     propagateChildrenFlags(node.arguments) |
-                    8;
+                    16;
             if (node.typeArguments) {
                 node.transformFlags |= 1;
             }
@@ -17833,7 +18642,7 @@ var ts;
                 : node;
         }
         function createTaggedTemplateExpression(tag, typeArguments, template) {
-            var node = createBaseExpression(205);
+            var node = createBaseExpression(209);
             node.tag = parenthesizerRules().parenthesizeLeftSideOfAccess(tag);
             node.typeArguments = asNodeArray(typeArguments);
             node.template = template;
@@ -17841,12 +18650,12 @@ var ts;
                 propagateChildFlags(node.tag) |
                     propagateChildrenFlags(node.typeArguments) |
                     propagateChildFlags(node.template) |
-                    256;
+                    512;
             if (node.typeArguments) {
                 node.transformFlags |= 1;
             }
             if (ts.hasInvalidEscape(node.template)) {
-                node.transformFlags |= 32;
+                node.transformFlags |= 64;
             }
             return node;
         }
@@ -17858,7 +18667,7 @@ var ts;
                 : node;
         }
         function createTypeAssertion(type, expression) {
-            var node = createBaseExpression(206);
+            var node = createBaseExpression(210);
             node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
             node.type = type;
             node.transformFlags |=
@@ -17874,7 +18683,7 @@ var ts;
                 : node;
         }
         function createParenthesizedExpression(expression) {
-            var node = createBaseExpression(207);
+            var node = createBaseExpression(211);
             node.expression = expression;
             node.transformFlags = propagateChildFlags(node.expression);
             return node;
@@ -17885,7 +18694,7 @@ var ts;
                 : node;
         }
         function createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
-            var node = createBaseFunctionLikeDeclaration(208, undefined, modifiers, name, typeParameters, parameters, type, body);
+            var node = createBaseFunctionLikeDeclaration(212, undefined, modifiers, name, typeParameters, parameters, type, body);
             node.asteriskToken = asteriskToken;
             node.transformFlags |= propagateChildFlags(node.asteriskToken);
             if (node.typeParameters) {
@@ -17893,14 +18702,14 @@ var ts;
             }
             if (ts.modifiersToFlags(node.modifiers) & 256) {
                 if (node.asteriskToken) {
-                    node.transformFlags |= 32;
+                    node.transformFlags |= 64;
                 }
                 else {
-                    node.transformFlags |= 64;
+                    node.transformFlags |= 128;
                 }
             }
             else if (node.asteriskToken) {
-                node.transformFlags |= 512;
+                node.transformFlags |= 1024;
             }
             return node;
         }
@@ -17916,13 +18725,13 @@ var ts;
                 : node;
         }
         function createArrowFunction(modifiers, typeParameters, parameters, type, equalsGreaterThanToken, body) {
-            var node = createBaseFunctionLikeDeclaration(209, undefined, modifiers, undefined, typeParameters, parameters, type, parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body));
+            var node = createBaseFunctionLikeDeclaration(213, undefined, modifiers, undefined, typeParameters, parameters, type, parenthesizerRules().parenthesizeConciseBodyOfArrowFunction(body));
             node.equalsGreaterThanToken = equalsGreaterThanToken !== null && equalsGreaterThanToken !== void 0 ? equalsGreaterThanToken : createToken(38);
             node.transformFlags |=
                 propagateChildFlags(node.equalsGreaterThanToken) |
-                    256;
+                    512;
             if (ts.modifiersToFlags(node.modifiers) & 256) {
-                node.transformFlags |= 64;
+                node.transformFlags |= 128 | 8192;
             }
             return node;
         }
@@ -17937,7 +18746,7 @@ var ts;
                 : node;
         }
         function createDeleteExpression(expression) {
-            var node = createBaseExpression(210);
+            var node = createBaseExpression(214);
             node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
             node.transformFlags |= propagateChildFlags(node.expression);
             return node;
@@ -17948,7 +18757,7 @@ var ts;
                 : node;
         }
         function createTypeOfExpression(expression) {
-            var node = createBaseExpression(211);
+            var node = createBaseExpression(215);
             node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
             node.transformFlags |= propagateChildFlags(node.expression);
             return node;
@@ -17959,7 +18768,7 @@ var ts;
                 : node;
         }
         function createVoidExpression(expression) {
-            var node = createBaseExpression(212);
+            var node = createBaseExpression(216);
             node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
             node.transformFlags |= propagateChildFlags(node.expression);
             return node;
@@ -17970,13 +18779,13 @@ var ts;
                 : node;
         }
         function createAwaitExpression(expression) {
-            var node = createBaseExpression(213);
+            var node = createBaseExpression(217);
             node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
+                    128 |
                     64 |
-                    32 |
-                    524288;
+                    1048576;
             return node;
         }
         function updateAwaitExpression(node, expression) {
@@ -17985,10 +18794,16 @@ var ts;
                 : node;
         }
         function createPrefixUnaryExpression(operator, operand) {
-            var node = createBaseExpression(214);
+            var node = createBaseExpression(218);
             node.operator = operator;
             node.operand = parenthesizerRules().parenthesizeOperandOfPrefixUnary(operand);
             node.transformFlags |= propagateChildFlags(node.operand);
+            if ((operator === 45 || operator === 46) &&
+                ts.isIdentifier(node.operand) &&
+                !ts.isGeneratedIdentifier(node.operand) &&
+                !ts.isLocalName(node.operand)) {
+                node.transformFlags |= 67108864;
+            }
             return node;
         }
         function updatePrefixUnaryExpression(node, operand) {
@@ -17997,10 +18812,15 @@ var ts;
                 : node;
         }
         function createPostfixUnaryExpression(operand, operator) {
-            var node = createBaseExpression(215);
+            var node = createBaseExpression(219);
             node.operator = operator;
             node.operand = parenthesizerRules().parenthesizeOperandOfPostfixUnary(operand);
-            node.transformFlags = propagateChildFlags(node.operand);
+            node.transformFlags |= propagateChildFlags(node.operand);
+            if (ts.isIdentifier(node.operand) &&
+                !ts.isGeneratedIdentifier(node.operand) &&
+                !ts.isLocalName(node.operand)) {
+                node.transformFlags |= 67108864;
+            }
             return node;
         }
         function updatePostfixUnaryExpression(node, operand) {
@@ -18009,7 +18829,7 @@ var ts;
                 : node;
         }
         function createBinaryExpression(left, operator, right) {
-            var node = createBaseExpression(216);
+            var node = createBaseExpression(220);
             var operatorToken = asToken(operator);
             var operatorKind = operatorToken.kind;
             node.left = parenthesizerRules().parenthesizeLeftSideOfBinary(operatorKind, left);
@@ -18020,43 +18840,43 @@ var ts;
                     propagateChildFlags(node.operatorToken) |
                     propagateChildFlags(node.right);
             if (operatorKind === 60) {
-                node.transformFlags |= 8;
+                node.transformFlags |= 16;
             }
-            else if (operatorKind === 62) {
+            else if (operatorKind === 63) {
                 if (ts.isObjectLiteralExpression(node.left)) {
                     node.transformFlags |=
-                        256 |
-                            32 |
-                            1024 |
+                        512 |
+                            64 |
+                            2048 |
                             propagateAssignmentPatternFlags(node.left);
                 }
                 else if (ts.isArrayLiteralExpression(node.left)) {
                     node.transformFlags |=
-                        256 |
-                            1024 |
+                        512 |
+                            2048 |
                             propagateAssignmentPatternFlags(node.left);
                 }
             }
-            else if (operatorKind === 42 || operatorKind === 66) {
-                node.transformFlags |= 128;
+            else if (operatorKind === 42 || operatorKind === 67) {
+                node.transformFlags |= 256;
             }
             else if (ts.isLogicalOrCoalescingAssignmentOperator(operatorKind)) {
-                node.transformFlags |= 4;
+                node.transformFlags |= 8;
             }
             return node;
         }
         function propagateAssignmentPatternFlags(node) {
-            if (node.transformFlags & 16384)
-                return 16384;
-            if (node.transformFlags & 32) {
+            if (node.transformFlags & 32768)
+                return 32768;
+            if (node.transformFlags & 64) {
                 for (var _i = 0, _a = ts.getElementsOfBindingOrAssignmentPattern(node); _i < _a.length; _i++) {
                     var element = _a[_i];
                     var target = ts.getTargetOfBindingOrAssignmentElement(element);
                     if (target && ts.isAssignmentPattern(target)) {
-                        if (target.transformFlags & 16384) {
-                            return 16384;
+                        if (target.transformFlags & 32768) {
+                            return 32768;
                         }
-                        if (target.transformFlags & 32) {
+                        if (target.transformFlags & 64) {
                             var flags_1 = propagateAssignmentPatternFlags(target);
                             if (flags_1)
                                 return flags_1;
@@ -18074,7 +18894,7 @@ var ts;
                 : node;
         }
         function createConditionalExpression(condition, questionToken, whenTrue, colonToken, whenFalse) {
-            var node = createBaseExpression(217);
+            var node = createBaseExpression(221);
             node.condition = parenthesizerRules().parenthesizeConditionOfConditionalExpression(condition);
             node.questionToken = questionToken !== null && questionToken !== void 0 ? questionToken : createToken(57);
             node.whenTrue = parenthesizerRules().parenthesizeBranchOfConditionalExpression(whenTrue);
@@ -18098,13 +18918,13 @@ var ts;
                 : node;
         }
         function createTemplateExpression(head, templateSpans) {
-            var node = createBaseExpression(218);
+            var node = createBaseExpression(222);
             node.head = head;
             node.templateSpans = createNodeArray(templateSpans);
             node.transformFlags |=
                 propagateChildFlags(node.head) |
                     propagateChildrenFlags(node.templateSpans) |
-                    256;
+                    512;
             return node;
         }
         function updateTemplateExpression(node, head, templateSpans) {
@@ -18139,9 +18959,9 @@ var ts;
             node.text = text;
             node.rawText = rawText;
             node.templateFlags = templateFlags & 2048;
-            node.transformFlags |= 256;
+            node.transformFlags |= 512;
             if (node.templateFlags) {
-                node.transformFlags |= 32;
+                node.transformFlags |= 64;
             }
             return node;
         }
@@ -18159,15 +18979,15 @@ var ts;
         }
         function createYieldExpression(asteriskToken, expression) {
             ts.Debug.assert(!asteriskToken || !!expression, "A `YieldExpression` with an asteriskToken must have an expression.");
-            var node = createBaseExpression(219);
+            var node = createBaseExpression(223);
             node.expression = expression && parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
             node.asteriskToken = asteriskToken;
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
                     propagateChildFlags(node.asteriskToken) |
-                    256 |
-                    32 |
-                    262144;
+                    512 |
+                    64 |
+                    524288;
             return node;
         }
         function updateYieldExpression(node, asteriskToken, expression) {
@@ -18177,12 +18997,12 @@ var ts;
                 : node;
         }
         function createSpreadElement(expression) {
-            var node = createBaseExpression(220);
+            var node = createBaseExpression(224);
             node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
-                    256 |
-                    8192;
+                    512 |
+                    16384;
             return node;
         }
         function updateSpreadElement(node, expression) {
@@ -18191,8 +19011,8 @@ var ts;
                 : node;
         }
         function createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members) {
-            var node = createBaseClassLikeDeclaration(221, decorators, modifiers, name, typeParameters, heritageClauses, members);
-            node.transformFlags |= 256;
+            var node = createBaseClassLikeDeclaration(225, decorators, modifiers, name, typeParameters, heritageClauses, members);
+            node.transformFlags |= 512;
             return node;
         }
         function updateClassExpression(node, decorators, modifiers, name, typeParameters, heritageClauses, members) {
@@ -18206,16 +19026,16 @@ var ts;
                 : node;
         }
         function createOmittedExpression() {
-            return createBaseExpression(222);
+            return createBaseExpression(226);
         }
         function createExpressionWithTypeArguments(expression, typeArguments) {
-            var node = createBaseNode(223);
+            var node = createBaseNode(227);
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.typeArguments = typeArguments && parenthesizerRules().parenthesizeTypeArguments(typeArguments);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
                     propagateChildrenFlags(node.typeArguments) |
-                    256;
+                    512;
             return node;
         }
         function updateExpressionWithTypeArguments(node, expression, typeArguments) {
@@ -18225,7 +19045,7 @@ var ts;
                 : node;
         }
         function createAsExpression(expression, type) {
-            var node = createBaseExpression(224);
+            var node = createBaseExpression(228);
             node.expression = expression;
             node.type = type;
             node.transformFlags |=
@@ -18241,7 +19061,7 @@ var ts;
                 : node;
         }
         function createNonNullExpression(expression) {
-            var node = createBaseExpression(225);
+            var node = createBaseExpression(229);
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
@@ -18257,7 +19077,7 @@ var ts;
                 : node;
         }
         function createNonNullChain(expression) {
-            var node = createBaseExpression(225);
+            var node = createBaseExpression(229);
             node.flags |= 32;
             node.expression = parenthesizerRules().parenthesizeLeftSideOfAccess(expression);
             node.transformFlags |=
@@ -18272,15 +19092,15 @@ var ts;
                 : node;
         }
         function createMetaProperty(keywordToken, name) {
-            var node = createBaseExpression(226);
+            var node = createBaseExpression(230);
             node.keywordToken = keywordToken;
             node.name = name;
             node.transformFlags |= propagateChildFlags(node.name);
             switch (keywordToken) {
-                case 102:
-                    node.transformFlags |= 256;
+                case 103:
+                    node.transformFlags |= 512;
                     break;
-                case 99:
+                case 100:
                     node.transformFlags |= 4;
                     break;
                 default:
@@ -18294,13 +19114,13 @@ var ts;
                 : node;
         }
         function createTemplateSpan(expression, literal) {
-            var node = createBaseNode(228);
+            var node = createBaseNode(232);
             node.expression = expression;
             node.literal = literal;
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
                     propagateChildFlags(node.literal) |
-                    256;
+                    512;
             return node;
         }
         function updateTemplateSpan(node, expression, literal) {
@@ -18310,12 +19130,12 @@ var ts;
                 : node;
         }
         function createSemicolonClassElement() {
-            var node = createBaseNode(229);
-            node.transformFlags |= 256;
+            var node = createBaseNode(233);
+            node.transformFlags |= 512;
             return node;
         }
         function createBlock(statements, multiLine) {
-            var node = createBaseNode(230);
+            var node = createBaseNode(234);
             node.statements = createNodeArray(statements);
             node.multiLine = multiLine;
             node.transformFlags |= propagateChildrenFlags(node.statements);
@@ -18327,7 +19147,7 @@ var ts;
                 : node;
         }
         function createVariableStatement(modifiers, declarationList) {
-            var node = createBaseDeclaration(232, undefined, modifiers);
+            var node = createBaseDeclaration(236, undefined, modifiers);
             node.declarationList = ts.isArray(declarationList) ? createVariableDeclarationList(declarationList) : declarationList;
             node.transformFlags |=
                 propagateChildFlags(node.declarationList);
@@ -18343,10 +19163,10 @@ var ts;
                 : node;
         }
         function createEmptyStatement() {
-            return createBaseNode(231);
+            return createBaseNode(235);
         }
         function createExpressionStatement(expression) {
-            var node = createBaseNode(233);
+            var node = createBaseNode(237);
             node.expression = parenthesizerRules().parenthesizeExpressionOfExpressionStatement(expression);
             node.transformFlags |= propagateChildFlags(node.expression);
             return node;
@@ -18357,7 +19177,7 @@ var ts;
                 : node;
         }
         function createIfStatement(expression, thenStatement, elseStatement) {
-            var node = createBaseNode(234);
+            var node = createBaseNode(238);
             node.expression = expression;
             node.thenStatement = asEmbeddedStatement(thenStatement);
             node.elseStatement = asEmbeddedStatement(elseStatement);
@@ -18375,7 +19195,7 @@ var ts;
                 : node;
         }
         function createDoStatement(statement, expression) {
-            var node = createBaseNode(235);
+            var node = createBaseNode(239);
             node.statement = asEmbeddedStatement(statement);
             node.expression = expression;
             node.transformFlags |=
@@ -18390,7 +19210,7 @@ var ts;
                 : node;
         }
         function createWhileStatement(expression, statement) {
-            var node = createBaseNode(236);
+            var node = createBaseNode(240);
             node.expression = expression;
             node.statement = asEmbeddedStatement(statement);
             node.transformFlags |=
@@ -18405,7 +19225,7 @@ var ts;
                 : node;
         }
         function createForStatement(initializer, condition, incrementor, statement) {
-            var node = createBaseNode(237);
+            var node = createBaseNode(241);
             node.initializer = initializer;
             node.condition = condition;
             node.incrementor = incrementor;
@@ -18426,7 +19246,7 @@ var ts;
                 : node;
         }
         function createForInStatement(initializer, expression, statement) {
-            var node = createBaseNode(238);
+            var node = createBaseNode(242);
             node.initializer = initializer;
             node.expression = expression;
             node.statement = asEmbeddedStatement(statement);
@@ -18444,7 +19264,7 @@ var ts;
                 : node;
         }
         function createForOfStatement(awaitModifier, initializer, expression, statement) {
-            var node = createBaseNode(239);
+            var node = createBaseNode(243);
             node.awaitModifier = awaitModifier;
             node.initializer = initializer;
             node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
@@ -18454,9 +19274,9 @@ var ts;
                     propagateChildFlags(node.initializer) |
                     propagateChildFlags(node.expression) |
                     propagateChildFlags(node.statement) |
-                    256;
+                    512;
             if (awaitModifier)
-                node.transformFlags |= 32;
+                node.transformFlags |= 64;
             return node;
         }
         function updateForOfStatement(node, awaitModifier, initializer, expression, statement) {
@@ -18468,11 +19288,11 @@ var ts;
                 : node;
         }
         function createContinueStatement(label) {
-            var node = createBaseNode(240);
+            var node = createBaseNode(244);
             node.label = asName(label);
             node.transformFlags |=
                 propagateChildFlags(node.label) |
-                    1048576;
+                    2097152;
             return node;
         }
         function updateContinueStatement(node, label) {
@@ -18481,11 +19301,11 @@ var ts;
                 : node;
         }
         function createBreakStatement(label) {
-            var node = createBaseNode(241);
+            var node = createBaseNode(245);
             node.label = asName(label);
             node.transformFlags |=
                 propagateChildFlags(node.label) |
-                    1048576;
+                    2097152;
             return node;
         }
         function updateBreakStatement(node, label) {
@@ -18494,12 +19314,12 @@ var ts;
                 : node;
         }
         function createReturnStatement(expression) {
-            var node = createBaseNode(242);
+            var node = createBaseNode(246);
             node.expression = expression;
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
-                    32 |
-                    1048576;
+                    64 |
+                    2097152;
             return node;
         }
         function updateReturnStatement(node, expression) {
@@ -18508,7 +19328,7 @@ var ts;
                 : node;
         }
         function createWithStatement(expression, statement) {
-            var node = createBaseNode(243);
+            var node = createBaseNode(247);
             node.expression = expression;
             node.statement = asEmbeddedStatement(statement);
             node.transformFlags |=
@@ -18523,7 +19343,7 @@ var ts;
                 : node;
         }
         function createSwitchStatement(expression, caseBlock) {
-            var node = createBaseNode(244);
+            var node = createBaseNode(248);
             node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
             node.caseBlock = caseBlock;
             node.transformFlags |=
@@ -18538,7 +19358,7 @@ var ts;
                 : node;
         }
         function createLabeledStatement(label, statement) {
-            var node = createBaseNode(245);
+            var node = createBaseNode(249);
             node.label = asName(label);
             node.statement = asEmbeddedStatement(statement);
             node.transformFlags |=
@@ -18553,7 +19373,7 @@ var ts;
                 : node;
         }
         function createThrowStatement(expression) {
-            var node = createBaseNode(246);
+            var node = createBaseNode(250);
             node.expression = expression;
             node.transformFlags |= propagateChildFlags(node.expression);
             return node;
@@ -18564,7 +19384,7 @@ var ts;
                 : node;
         }
         function createTryStatement(tryBlock, catchClause, finallyBlock) {
-            var node = createBaseNode(247);
+            var node = createBaseNode(251);
             node.tryBlock = tryBlock;
             node.catchClause = catchClause;
             node.finallyBlock = finallyBlock;
@@ -18582,10 +19402,10 @@ var ts;
                 : node;
         }
         function createDebuggerStatement() {
-            return createBaseNode(248);
+            return createBaseNode(252);
         }
         function createVariableDeclaration(name, exclamationToken, type, initializer) {
-            var node = createBaseVariableLikeDeclaration(249, undefined, undefined, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
+            var node = createBaseVariableLikeDeclaration(253, undefined, undefined, name, type, initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer));
             node.exclamationToken = exclamationToken;
             node.transformFlags |= propagateChildFlags(node.exclamationToken);
             if (exclamationToken) {
@@ -18603,16 +19423,16 @@ var ts;
         }
         function createVariableDeclarationList(declarations, flags) {
             if (flags === void 0) { flags = 0; }
-            var node = createBaseNode(250);
+            var node = createBaseNode(254);
             node.flags |= flags & 3;
             node.declarations = createNodeArray(declarations);
             node.transformFlags |=
                 propagateChildrenFlags(node.declarations) |
-                    1048576;
+                    2097152;
             if (flags & 3) {
                 node.transformFlags |=
-                    256 |
-                        65536;
+                    512 |
+                        131072;
             }
             return node;
         }
@@ -18622,7 +19442,7 @@ var ts;
                 : node;
         }
         function createFunctionDeclaration(decorators, modifiers, asteriskToken, name, typeParameters, parameters, type, body) {
-            var node = createBaseFunctionLikeDeclaration(251, decorators, modifiers, name, typeParameters, parameters, type, body);
+            var node = createBaseFunctionLikeDeclaration(255, decorators, modifiers, name, typeParameters, parameters, type, body);
             node.asteriskToken = asteriskToken;
             if (!node.body || ts.modifiersToFlags(node.modifiers) & 2) {
                 node.transformFlags = 1;
@@ -18630,17 +19450,17 @@ var ts;
             else {
                 node.transformFlags |=
                     propagateChildFlags(node.asteriskToken) |
-                        1048576;
+                        2097152;
                 if (ts.modifiersToFlags(node.modifiers) & 256) {
                     if (node.asteriskToken) {
-                        node.transformFlags |= 32;
+                        node.transformFlags |= 64;
                     }
                     else {
-                        node.transformFlags |= 64;
+                        node.transformFlags |= 128;
                     }
                 }
                 else if (node.asteriskToken) {
-                    node.transformFlags |= 512;
+                    node.transformFlags |= 1024;
                 }
             }
             return node;
@@ -18658,13 +19478,13 @@ var ts;
                 : node;
         }
         function createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
-            var node = createBaseClassLikeDeclaration(252, decorators, modifiers, name, typeParameters, heritageClauses, members);
+            var node = createBaseClassLikeDeclaration(256, decorators, modifiers, name, typeParameters, heritageClauses, members);
             if (ts.modifiersToFlags(node.modifiers) & 2) {
                 node.transformFlags = 1;
             }
             else {
-                node.transformFlags |= 256;
-                if (node.transformFlags & 2048) {
+                node.transformFlags |= 512;
+                if (node.transformFlags & 4096) {
                     node.transformFlags |= 1;
                 }
             }
@@ -18681,7 +19501,7 @@ var ts;
                 : node;
         }
         function createInterfaceDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members) {
-            var node = createBaseInterfaceOrClassLikeDeclaration(253, decorators, modifiers, name, typeParameters, heritageClauses);
+            var node = createBaseInterfaceOrClassLikeDeclaration(257, decorators, modifiers, name, typeParameters, heritageClauses);
             node.members = createNodeArray(members);
             node.transformFlags = 1;
             return node;
@@ -18697,7 +19517,7 @@ var ts;
                 : node;
         }
         function createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type) {
-            var node = createBaseGenericNamedDeclaration(254, decorators, modifiers, name, typeParameters);
+            var node = createBaseGenericNamedDeclaration(258, decorators, modifiers, name, typeParameters);
             node.type = type;
             node.transformFlags = 1;
             return node;
@@ -18712,12 +19532,12 @@ var ts;
                 : node;
         }
         function createEnumDeclaration(decorators, modifiers, name, members) {
-            var node = createBaseNamedDeclaration(255, decorators, modifiers, name);
+            var node = createBaseNamedDeclaration(259, decorators, modifiers, name);
             node.members = createNodeArray(members);
             node.transformFlags |=
                 propagateChildrenFlags(node.members) |
                     1;
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateEnumDeclaration(node, decorators, modifiers, name, members) {
@@ -18730,7 +19550,7 @@ var ts;
         }
         function createModuleDeclaration(decorators, modifiers, name, body, flags) {
             if (flags === void 0) { flags = 0; }
-            var node = createBaseDeclaration(256, decorators, modifiers);
+            var node = createBaseDeclaration(260, decorators, modifiers);
             node.flags |= flags & (16 | 4 | 1024);
             node.name = name;
             node.body = body;
@@ -18743,7 +19563,7 @@ var ts;
                         propagateChildFlags(node.body) |
                         1;
             }
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateModuleDeclaration(node, decorators, modifiers, name, body) {
@@ -18755,7 +19575,7 @@ var ts;
                 : node;
         }
         function createModuleBlock(statements) {
-            var node = createBaseNode(257);
+            var node = createBaseNode(261);
             node.statements = createNodeArray(statements);
             node.transformFlags |= propagateChildrenFlags(node.statements);
             return node;
@@ -18766,7 +19586,7 @@ var ts;
                 : node;
         }
         function createCaseBlock(clauses) {
-            var node = createBaseNode(258);
+            var node = createBaseNode(262);
             node.clauses = createNodeArray(clauses);
             node.transformFlags |= propagateChildrenFlags(node.clauses);
             return node;
@@ -18777,7 +19597,7 @@ var ts;
                 : node;
         }
         function createNamespaceExportDeclaration(name) {
-            var node = createBaseNamedDeclaration(259, undefined, undefined, name);
+            var node = createBaseNamedDeclaration(263, undefined, undefined, name);
             node.transformFlags = 1;
             return node;
         }
@@ -18787,13 +19607,13 @@ var ts;
                 : node;
         }
         function createImportEqualsDeclaration(decorators, modifiers, isTypeOnly, name, moduleReference) {
-            var node = createBaseNamedDeclaration(260, decorators, modifiers, name);
+            var node = createBaseNamedDeclaration(264, decorators, modifiers, name);
             node.isTypeOnly = isTypeOnly;
             node.moduleReference = moduleReference;
             node.transformFlags |= propagateChildFlags(node.moduleReference);
             if (!ts.isExternalModuleReference(node.moduleReference))
                 node.transformFlags |= 1;
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateImportEqualsDeclaration(node, decorators, modifiers, isTypeOnly, name, moduleReference) {
@@ -18805,26 +19625,28 @@ var ts;
                 ? update(createImportEqualsDeclaration(decorators, modifiers, isTypeOnly, name, moduleReference), node)
                 : node;
         }
-        function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier) {
-            var node = createBaseDeclaration(261, decorators, modifiers);
+        function createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, assertClause) {
+            var node = createBaseDeclaration(265, decorators, modifiers);
             node.importClause = importClause;
             node.moduleSpecifier = moduleSpecifier;
+            node.assertClause = assertClause;
             node.transformFlags |=
                 propagateChildFlags(node.importClause) |
                     propagateChildFlags(node.moduleSpecifier);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
-        function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier) {
+        function updateImportDeclaration(node, decorators, modifiers, importClause, moduleSpecifier, assertClause) {
             return node.decorators !== decorators
                 || node.modifiers !== modifiers
                 || node.importClause !== importClause
                 || node.moduleSpecifier !== moduleSpecifier
-                ? update(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier), node)
+                || node.assertClause !== assertClause
+                ? update(createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, assertClause), node)
                 : node;
         }
         function createImportClause(isTypeOnly, name, namedBindings) {
-            var node = createBaseNode(262);
+            var node = createBaseNode(266);
             node.isTypeOnly = isTypeOnly;
             node.name = name;
             node.namedBindings = namedBindings;
@@ -18834,7 +19656,7 @@ var ts;
             if (isTypeOnly) {
                 node.transformFlags |= 1;
             }
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateImportClause(node, isTypeOnly, name, namedBindings) {
@@ -18844,11 +19666,37 @@ var ts;
                 ? update(createImportClause(isTypeOnly, name, namedBindings), node)
                 : node;
         }
+        function createAssertClause(elements, multiLine) {
+            var node = createBaseNode(292);
+            node.elements = elements;
+            node.multiLine = multiLine;
+            node.transformFlags |= 4;
+            return node;
+        }
+        function updateAssertClause(node, elements, multiLine) {
+            return node.elements !== elements
+                || node.multiLine !== multiLine
+                ? update(createAssertClause(elements, multiLine), node)
+                : node;
+        }
+        function createAssertEntry(name, value) {
+            var node = createBaseNode(293);
+            node.name = name;
+            node.value = value;
+            node.transformFlags |= 4;
+            return node;
+        }
+        function updateAssertEntry(node, name, value) {
+            return node.name !== name
+                || node.value !== value
+                ? update(createAssertEntry(name, value), node)
+                : node;
+        }
         function createNamespaceImport(name) {
-            var node = createBaseNode(263);
+            var node = createBaseNode(267);
             node.name = name;
             node.transformFlags |= propagateChildFlags(node.name);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateNamespaceImport(node, name) {
@@ -18857,12 +19705,12 @@ var ts;
                 : node;
         }
         function createNamespaceExport(name) {
-            var node = createBaseNode(269);
+            var node = createBaseNode(273);
             node.name = name;
             node.transformFlags |=
                 propagateChildFlags(node.name) |
                     4;
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateNamespaceExport(node, name) {
@@ -18871,10 +19719,10 @@ var ts;
                 : node;
         }
         function createNamedImports(elements) {
-            var node = createBaseNode(264);
+            var node = createBaseNode(268);
             node.elements = createNodeArray(elements);
             node.transformFlags |= propagateChildrenFlags(node.elements);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateNamedImports(node, elements) {
@@ -18882,30 +19730,32 @@ var ts;
                 ? update(createNamedImports(elements), node)
                 : node;
         }
-        function createImportSpecifier(propertyName, name) {
-            var node = createBaseNode(265);
+        function createImportSpecifier(isTypeOnly, propertyName, name) {
+            var node = createBaseNode(269);
+            node.isTypeOnly = isTypeOnly;
             node.propertyName = propertyName;
             node.name = name;
             node.transformFlags |=
                 propagateChildFlags(node.propertyName) |
                     propagateChildFlags(node.name);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
-        function updateImportSpecifier(node, propertyName, name) {
-            return node.propertyName !== propertyName
+        function updateImportSpecifier(node, isTypeOnly, propertyName, name) {
+            return node.isTypeOnly !== isTypeOnly
+                || node.propertyName !== propertyName
                 || node.name !== name
-                ? update(createImportSpecifier(propertyName, name), node)
+                ? update(createImportSpecifier(isTypeOnly, propertyName, name), node)
                 : node;
         }
         function createExportAssignment(decorators, modifiers, isExportEquals, expression) {
-            var node = createBaseDeclaration(266, decorators, modifiers);
+            var node = createBaseDeclaration(270, decorators, modifiers);
             node.isExportEquals = isExportEquals;
             node.expression = isExportEquals
-                ? parenthesizerRules().parenthesizeRightSideOfBinary(62, undefined, expression)
+                ? parenthesizerRules().parenthesizeRightSideOfBinary(63, undefined, expression)
                 : parenthesizerRules().parenthesizeExpressionOfExportDefault(expression);
             node.transformFlags |= propagateChildFlags(node.expression);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateExportAssignment(node, decorators, modifiers, expression) {
@@ -18915,31 +19765,33 @@ var ts;
                 ? update(createExportAssignment(decorators, modifiers, node.isExportEquals, expression), node)
                 : node;
         }
-        function createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier) {
-            var node = createBaseDeclaration(267, decorators, modifiers);
+        function createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
+            var node = createBaseDeclaration(271, decorators, modifiers);
             node.isTypeOnly = isTypeOnly;
             node.exportClause = exportClause;
             node.moduleSpecifier = moduleSpecifier;
+            node.assertClause = assertClause;
             node.transformFlags |=
                 propagateChildFlags(node.exportClause) |
                     propagateChildFlags(node.moduleSpecifier);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
-        function updateExportDeclaration(node, decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier) {
+        function updateExportDeclaration(node, decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause) {
             return node.decorators !== decorators
                 || node.modifiers !== modifiers
                 || node.isTypeOnly !== isTypeOnly
                 || node.exportClause !== exportClause
                 || node.moduleSpecifier !== moduleSpecifier
-                ? update(createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier), node)
+                || node.assertClause !== assertClause
+                ? update(createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause), node)
                 : node;
         }
         function createNamedExports(elements) {
-            var node = createBaseNode(268);
+            var node = createBaseNode(272);
             node.elements = createNodeArray(elements);
             node.transformFlags |= propagateChildrenFlags(node.elements);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateNamedExports(node, elements) {
@@ -18947,31 +19799,33 @@ var ts;
                 ? update(createNamedExports(elements), node)
                 : node;
         }
-        function createExportSpecifier(propertyName, name) {
-            var node = createBaseNode(270);
+        function createExportSpecifier(isTypeOnly, propertyName, name) {
+            var node = createBaseNode(274);
+            node.isTypeOnly = isTypeOnly;
             node.propertyName = asName(propertyName);
             node.name = asName(name);
             node.transformFlags |=
                 propagateChildFlags(node.propertyName) |
                     propagateChildFlags(node.name);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
-        function updateExportSpecifier(node, propertyName, name) {
-            return node.propertyName !== propertyName
+        function updateExportSpecifier(node, isTypeOnly, propertyName, name) {
+            return node.isTypeOnly !== isTypeOnly
+                || node.propertyName !== propertyName
                 || node.name !== name
-                ? update(createExportSpecifier(propertyName, name), node)
+                ? update(createExportSpecifier(isTypeOnly, propertyName, name), node)
                 : node;
         }
         function createMissingDeclaration() {
-            var node = createBaseDeclaration(271, undefined, undefined);
+            var node = createBaseDeclaration(275, undefined, undefined);
             return node;
         }
         function createExternalModuleReference(expression) {
-            var node = createBaseNode(272);
+            var node = createBaseNode(276);
             node.expression = expression;
             node.transformFlags |= propagateChildFlags(node.expression);
-            node.transformFlags &= ~8388608;
+            node.transformFlags &= ~16777216;
             return node;
         }
         function updateExternalModuleReference(node, expression) {
@@ -18993,7 +19847,7 @@ var ts;
                 : node;
         }
         function createJSDocFunctionType(parameters, type) {
-            var node = createBaseSignatureDeclaration(308, undefined, undefined, undefined, undefined, parameters, type);
+            var node = createBaseSignatureDeclaration(315, undefined, undefined, undefined, undefined, parameters, type);
             return node;
         }
         function updateJSDocFunctionType(node, parameters, type) {
@@ -19004,7 +19858,7 @@ var ts;
         }
         function createJSDocTypeLiteral(propertyTags, isArrayType) {
             if (isArrayType === void 0) { isArrayType = false; }
-            var node = createBaseNode(312);
+            var node = createBaseNode(320);
             node.jsDocPropertyTags = asNodeArray(propertyTags);
             node.isArrayType = isArrayType;
             return node;
@@ -19016,7 +19870,7 @@ var ts;
                 : node;
         }
         function createJSDocTypeExpression(type) {
-            var node = createBaseNode(301);
+            var node = createBaseNode(307);
             node.type = type;
             return node;
         }
@@ -19026,7 +19880,7 @@ var ts;
                 : node;
         }
         function createJSDocSignature(typeParameters, parameters, type) {
-            var node = createBaseNode(313);
+            var node = createBaseNode(321);
             node.typeParameters = asNodeArray(typeParameters);
             node.parameters = createNodeArray(parameters);
             node.type = type;
@@ -19052,7 +19906,7 @@ var ts;
             return node;
         }
         function createJSDocTemplateTag(tagName, constraint, typeParameters, comment) {
-            var node = createBaseJSDocTag(330, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("template"), comment);
+            var node = createBaseJSDocTag(342, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("template"), comment);
             node.constraint = constraint;
             node.typeParameters = createNodeArray(typeParameters);
             return node;
@@ -19067,7 +19921,7 @@ var ts;
                 : node;
         }
         function createJSDocTypedefTag(tagName, typeExpression, fullName, comment) {
-            var node = createBaseJSDocTag(331, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("typedef"), comment);
+            var node = createBaseJSDocTag(343, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("typedef"), comment);
             node.typeExpression = typeExpression;
             node.fullName = fullName;
             node.name = ts.getJSDocTypeAliasName(fullName);
@@ -19083,7 +19937,7 @@ var ts;
                 : node;
         }
         function createJSDocParameterTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
-            var node = createBaseJSDocTag(326, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("param"), comment);
+            var node = createBaseJSDocTag(338, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("param"), comment);
             node.typeExpression = typeExpression;
             node.name = name;
             node.isNameFirst = !!isNameFirst;
@@ -19102,7 +19956,7 @@ var ts;
                 : node;
         }
         function createJSDocPropertyTag(tagName, name, isBracketed, typeExpression, isNameFirst, comment) {
-            var node = createBaseJSDocTag(333, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("prop"), comment);
+            var node = createBaseJSDocTag(345, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("prop"), comment);
             node.typeExpression = typeExpression;
             node.name = name;
             node.isNameFirst = !!isNameFirst;
@@ -19121,7 +19975,7 @@ var ts;
                 : node;
         }
         function createJSDocCallbackTag(tagName, typeExpression, fullName, comment) {
-            var node = createBaseJSDocTag(324, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("callback"), comment);
+            var node = createBaseJSDocTag(336, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("callback"), comment);
             node.typeExpression = typeExpression;
             node.fullName = fullName;
             node.name = ts.getJSDocTypeAliasName(fullName);
@@ -19137,7 +19991,7 @@ var ts;
                 : node;
         }
         function createJSDocAugmentsTag(tagName, className, comment) {
-            var node = createBaseJSDocTag(315, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("augments"), comment);
+            var node = createBaseJSDocTag(326, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("augments"), comment);
             node.class = className;
             return node;
         }
@@ -19150,12 +20004,12 @@ var ts;
                 : node;
         }
         function createJSDocImplementsTag(tagName, className, comment) {
-            var node = createBaseJSDocTag(316, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("implements"), comment);
+            var node = createBaseJSDocTag(327, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("implements"), comment);
             node.class = className;
             return node;
         }
         function createJSDocSeeTag(tagName, name, comment) {
-            var node = createBaseJSDocTag(332, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("see"), comment);
+            var node = createBaseJSDocTag(344, tagName !== null && tagName !== void 0 ? tagName : createIdentifier("see"), comment);
             node.name = name;
             return node;
         }
@@ -19167,7 +20021,7 @@ var ts;
                 : node;
         }
         function createJSDocNameReference(name) {
-            var node = createBaseNode(302);
+            var node = createBaseNode(308);
             node.name = name;
             return node;
         }
@@ -19176,6 +20030,54 @@ var ts;
                 ? update(createJSDocNameReference(name), node)
                 : node;
         }
+        function createJSDocMemberName(left, right) {
+            var node = createBaseNode(309);
+            node.left = left;
+            node.right = right;
+            node.transformFlags |=
+                propagateChildFlags(node.left) |
+                    propagateChildFlags(node.right);
+            return node;
+        }
+        function updateJSDocMemberName(node, left, right) {
+            return node.left !== left
+                || node.right !== right
+                ? update(createJSDocMemberName(left, right), node)
+                : node;
+        }
+        function createJSDocLink(name, text) {
+            var node = createBaseNode(322);
+            node.name = name;
+            node.text = text;
+            return node;
+        }
+        function updateJSDocLink(node, name, text) {
+            return node.name !== name
+                ? update(createJSDocLink(name, text), node)
+                : node;
+        }
+        function createJSDocLinkCode(name, text) {
+            var node = createBaseNode(323);
+            node.name = name;
+            node.text = text;
+            return node;
+        }
+        function updateJSDocLinkCode(node, name, text) {
+            return node.name !== name
+                ? update(createJSDocLinkCode(name, text), node)
+                : node;
+        }
+        function createJSDocLinkPlain(name, text) {
+            var node = createBaseNode(324);
+            node.name = name;
+            node.text = text;
+            return node;
+        }
+        function updateJSDocLinkPlain(node, name, text) {
+            return node.name !== name
+                ? update(createJSDocLinkPlain(name, text), node)
+                : node;
+        }
         function updateJSDocImplementsTag(node, tagName, className, comment) {
             if (tagName === void 0) { tagName = getDefaultTagName(node); }
             return node.tagName !== tagName
@@ -19209,7 +20111,7 @@ var ts;
                 : node;
         }
         function createJSDocUnknownTag(tagName, comment) {
-            var node = createBaseJSDocTag(314, tagName, comment);
+            var node = createBaseJSDocTag(325, tagName, comment);
             return node;
         }
         function updateJSDocUnknownTag(node, tagName, comment) {
@@ -19218,8 +20120,18 @@ var ts;
                 ? update(createJSDocUnknownTag(tagName, comment), node)
                 : node;
         }
+        function createJSDocText(text) {
+            var node = createBaseNode(319);
+            node.text = text;
+            return node;
+        }
+        function updateJSDocText(node, text) {
+            return node.text !== text
+                ? update(createJSDocText(text), node)
+                : node;
+        }
         function createJSDocComment(comment, tags) {
-            var node = createBaseNode(311);
+            var node = createBaseNode(318);
             node.comment = comment;
             node.tags = asNodeArray(tags);
             return node;
@@ -19231,7 +20143,7 @@ var ts;
                 : node;
         }
         function createJsxElement(openingElement, children, closingElement) {
-            var node = createBaseNode(273);
+            var node = createBaseNode(277);
             node.openingElement = openingElement;
             node.children = createNodeArray(children);
             node.closingElement = closingElement;
@@ -19250,7 +20162,7 @@ var ts;
                 : node;
         }
         function createJsxSelfClosingElement(tagName, typeArguments, attributes) {
-            var node = createBaseNode(274);
+            var node = createBaseNode(278);
             node.tagName = tagName;
             node.typeArguments = asNodeArray(typeArguments);
             node.attributes = attributes;
@@ -19272,7 +20184,7 @@ var ts;
                 : node;
         }
         function createJsxOpeningElement(tagName, typeArguments, attributes) {
-            var node = createBaseNode(275);
+            var node = createBaseNode(279);
             node.tagName = tagName;
             node.typeArguments = asNodeArray(typeArguments);
             node.attributes = attributes;
@@ -19294,7 +20206,7 @@ var ts;
                 : node;
         }
         function createJsxClosingElement(tagName) {
-            var node = createBaseNode(276);
+            var node = createBaseNode(280);
             node.tagName = tagName;
             node.transformFlags |=
                 propagateChildFlags(node.tagName) |
@@ -19307,7 +20219,7 @@ var ts;
                 : node;
         }
         function createJsxFragment(openingFragment, children, closingFragment) {
-            var node = createBaseNode(277);
+            var node = createBaseNode(281);
             node.openingFragment = openingFragment;
             node.children = createNodeArray(children);
             node.closingFragment = closingFragment;
@@ -19339,17 +20251,17 @@ var ts;
                 : node;
         }
         function createJsxOpeningFragment() {
-            var node = createBaseNode(278);
+            var node = createBaseNode(282);
             node.transformFlags |= 2;
             return node;
         }
         function createJsxJsxClosingFragment() {
-            var node = createBaseNode(279);
+            var node = createBaseNode(283);
             node.transformFlags |= 2;
             return node;
         }
         function createJsxAttribute(name, initializer) {
-            var node = createBaseNode(280);
+            var node = createBaseNode(284);
             node.name = name;
             node.initializer = initializer;
             node.transformFlags |=
@@ -19365,7 +20277,7 @@ var ts;
                 : node;
         }
         function createJsxAttributes(properties) {
-            var node = createBaseNode(281);
+            var node = createBaseNode(285);
             node.properties = createNodeArray(properties);
             node.transformFlags |=
                 propagateChildrenFlags(node.properties) |
@@ -19378,7 +20290,7 @@ var ts;
                 : node;
         }
         function createJsxSpreadAttribute(expression) {
-            var node = createBaseNode(282);
+            var node = createBaseNode(286);
             node.expression = expression;
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
@@ -19391,7 +20303,7 @@ var ts;
                 : node;
         }
         function createJsxExpression(dotDotDotToken, expression) {
-            var node = createBaseNode(283);
+            var node = createBaseNode(287);
             node.dotDotDotToken = dotDotDotToken;
             node.expression = expression;
             node.transformFlags |=
@@ -19406,7 +20318,7 @@ var ts;
                 : node;
         }
         function createCaseClause(expression, statements) {
-            var node = createBaseNode(284);
+            var node = createBaseNode(288);
             node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
             node.statements = createNodeArray(statements);
             node.transformFlags |=
@@ -19421,7 +20333,7 @@ var ts;
                 : node;
         }
         function createDefaultClause(statements) {
-            var node = createBaseNode(285);
+            var node = createBaseNode(289);
             node.statements = createNodeArray(statements);
             node.transformFlags = propagateChildrenFlags(node.statements);
             return node;
@@ -19432,15 +20344,15 @@ var ts;
                 : node;
         }
         function createHeritageClause(token, types) {
-            var node = createBaseNode(286);
+            var node = createBaseNode(290);
             node.token = token;
             node.types = createNodeArray(types);
             node.transformFlags |= propagateChildrenFlags(node.types);
             switch (token) {
-                case 93:
-                    node.transformFlags |= 256;
+                case 94:
+                    node.transformFlags |= 512;
                     break;
-                case 116:
+                case 117:
                     node.transformFlags |= 1;
                     break;
                 default:
@@ -19454,15 +20366,17 @@ var ts;
                 : node;
         }
         function createCatchClause(variableDeclaration, block) {
-            var node = createBaseNode(287);
-            variableDeclaration = !ts.isString(variableDeclaration) ? variableDeclaration : createVariableDeclaration(variableDeclaration, undefined, undefined, undefined);
+            var node = createBaseNode(291);
+            if (typeof variableDeclaration === "string" || variableDeclaration && !ts.isVariableDeclaration(variableDeclaration)) {
+                variableDeclaration = createVariableDeclaration(variableDeclaration, undefined, undefined, undefined);
+            }
             node.variableDeclaration = variableDeclaration;
             node.block = block;
             node.transformFlags |=
                 propagateChildFlags(node.variableDeclaration) |
                     propagateChildFlags(node.block);
             if (!variableDeclaration)
-                node.transformFlags |= 16;
+                node.transformFlags |= 32;
             return node;
         }
         function updateCatchClause(node, variableDeclaration, block) {
@@ -19472,7 +20386,7 @@ var ts;
                 : node;
         }
         function createPropertyAssignment(name, initializer) {
-            var node = createBaseNamedDeclaration(288, undefined, undefined, name);
+            var node = createBaseNamedDeclaration(294, undefined, undefined, name);
             node.initializer = parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
             node.transformFlags |=
                 propagateChildFlags(node.name) |
@@ -19497,11 +20411,11 @@ var ts;
                 : node;
         }
         function createShorthandPropertyAssignment(name, objectAssignmentInitializer) {
-            var node = createBaseNamedDeclaration(289, undefined, undefined, name);
+            var node = createBaseNamedDeclaration(295, undefined, undefined, name);
             node.objectAssignmentInitializer = objectAssignmentInitializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(objectAssignmentInitializer);
             node.transformFlags |=
                 propagateChildFlags(node.objectAssignmentInitializer) |
-                    256;
+                    512;
             return node;
         }
         function finishUpdateShorthandPropertyAssignment(updated, original) {
@@ -19524,12 +20438,12 @@ var ts;
                 : node;
         }
         function createSpreadAssignment(expression) {
-            var node = createBaseNode(290);
+            var node = createBaseNode(296);
             node.expression = parenthesizerRules().parenthesizeExpressionForDisallowedComma(expression);
             node.transformFlags |=
                 propagateChildFlags(node.expression) |
-                    32 |
-                    16384;
+                    64 |
+                    32768;
             return node;
         }
         function updateSpreadAssignment(node, expression) {
@@ -19538,7 +20452,7 @@ var ts;
                 : node;
         }
         function createEnumMember(name, initializer) {
-            var node = createBaseNode(291);
+            var node = createBaseNode(297);
             node.name = asName(name);
             node.initializer = initializer && parenthesizerRules().parenthesizeExpressionForDisallowedComma(initializer);
             node.transformFlags |=
@@ -19554,7 +20468,7 @@ var ts;
                 : node;
         }
         function createSourceFile(statements, endOfFileToken, flags) {
-            var node = baseFactory.createBaseSourceFileNode(297);
+            var node = baseFactory.createBaseSourceFileNode(303);
             node.statements = createNodeArray(statements);
             node.endOfFileToken = endOfFileToken;
             node.flags |= flags;
@@ -19571,7 +20485,7 @@ var ts;
             return node;
         }
         function cloneSourceFileWithChanges(source, statements, isDeclarationFile, referencedFiles, typeReferences, hasNoDefaultLib, libReferences) {
-            var node = baseFactory.createBaseSourceFileNode(297);
+            var node = baseFactory.createBaseSourceFileNode(303);
             for (var p in source) {
                 if (p === "emitNode" || ts.hasProperty(node, p) || !ts.hasProperty(source, p))
                     continue;
@@ -19588,6 +20502,7 @@ var ts;
             node.transformFlags =
                 propagateChildrenFlags(node.statements) |
                     propagateChildFlags(node.endOfFileToken);
+            node.impliedNodeFormat = source.impliedNodeFormat;
             return node;
         }
         function updateSourceFile(node, statements, isDeclarationFile, referencedFiles, typeReferenceDirectives, hasNoDefaultLib, libReferenceDirectives) {
@@ -19607,7 +20522,7 @@ var ts;
         }
         function createBundle(sourceFiles, prepends) {
             if (prepends === void 0) { prepends = ts.emptyArray; }
-            var node = createBaseNode(298);
+            var node = createBaseNode(304);
             node.prepends = prepends;
             node.sourceFiles = sourceFiles;
             return node;
@@ -19620,7 +20535,7 @@ var ts;
                 : node;
         }
         function createUnparsedSource(prologues, syntheticReferences, texts) {
-            var node = createBaseNode(299);
+            var node = createBaseNode(305);
             node.prologues = prologues;
             node.syntheticReferences = syntheticReferences;
             node.texts = texts;
@@ -19637,49 +20552,49 @@ var ts;
             return node;
         }
         function createUnparsedPrologue(data) {
-            return createBaseUnparsedNode(292, data);
+            return createBaseUnparsedNode(298, data);
         }
         function createUnparsedPrepend(data, texts) {
-            var node = createBaseUnparsedNode(293, data);
+            var node = createBaseUnparsedNode(299, data);
             node.texts = texts;
             return node;
         }
         function createUnparsedTextLike(data, internal) {
-            return createBaseUnparsedNode(internal ? 295 : 294, data);
+            return createBaseUnparsedNode(internal ? 301 : 300, data);
         }
         function createUnparsedSyntheticReference(section) {
-            var node = createBaseNode(296);
+            var node = createBaseNode(302);
             node.data = section.data;
             node.section = section;
             return node;
         }
         function createInputFiles() {
-            var node = createBaseNode(300);
+            var node = createBaseNode(306);
             node.javascriptText = "";
             node.declarationText = "";
             return node;
         }
         function createSyntheticExpression(type, isSpread, tupleNameSource) {
             if (isSpread === void 0) { isSpread = false; }
-            var node = createBaseNode(227);
+            var node = createBaseNode(231);
             node.type = type;
             node.isSpread = isSpread;
             node.tupleNameSource = tupleNameSource;
             return node;
         }
         function createSyntaxList(children) {
-            var node = createBaseNode(334);
+            var node = createBaseNode(346);
             node._children = children;
             return node;
         }
         function createNotEmittedStatement(original) {
-            var node = createBaseNode(335);
+            var node = createBaseNode(347);
             node.original = original;
             ts.setTextRange(node, original);
             return node;
         }
         function createPartiallyEmittedExpression(expression, original) {
-            var node = createBaseNode(336);
+            var node = createBaseNode(348);
             node.expression = expression;
             node.original = original;
             node.transformFlags |=
@@ -19705,7 +20620,7 @@ var ts;
             return node;
         }
         function createCommaListExpression(elements) {
-            var node = createBaseNode(337);
+            var node = createBaseNode(349);
             node.elements = createNodeArray(ts.sameFlatMap(elements, flattenCommaElements));
             node.transformFlags |= propagateChildrenFlags(node.elements);
             return node;
@@ -19716,19 +20631,19 @@ var ts;
                 : node;
         }
         function createEndOfDeclarationMarker(original) {
-            var node = createBaseNode(339);
+            var node = createBaseNode(351);
             node.emitNode = {};
             node.original = original;
             return node;
         }
         function createMergeDeclarationMarker(original) {
-            var node = createBaseNode(338);
+            var node = createBaseNode(350);
             node.emitNode = {};
             node.original = original;
             return node;
         }
         function createSyntheticReferenceExpression(expression, thisArg) {
-            var node = createBaseNode(340);
+            var node = createBaseNode(352);
             node.expression = expression;
             node.thisArg = thisArg;
             node.transformFlags |=
@@ -19746,9 +20661,9 @@ var ts;
             if (node === undefined) {
                 return node;
             }
-            var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(297) :
-                ts.isIdentifier(node) ? baseFactory.createBaseIdentifierNode(78) :
-                    ts.isPrivateIdentifier(node) ? baseFactory.createBasePrivateIdentifierNode(79) :
+            var clone = ts.isSourceFile(node) ? baseFactory.createBaseSourceFileNode(303) :
+                ts.isIdentifier(node) ? baseFactory.createBaseIdentifierNode(79) :
+                    ts.isPrivateIdentifier(node) ? baseFactory.createBasePrivateIdentifierNode(80) :
                         !ts.isNodeKind(node.kind) ? baseFactory.createBaseTokenNode(node.kind) :
                             baseFactory.createBaseNode(node.kind);
             clone.flags |= (node.flags & ~8);
@@ -19776,7 +20691,7 @@ var ts;
         }
         function createExternalModuleExport(exportName) {
             return createExportDeclaration(undefined, undefined, false, createNamedExports([
-                createExportSpecifier(undefined, exportName)
+                createExportSpecifier(false, undefined, exportName)
             ]));
         }
         function createTypeCheck(value, tag) {
@@ -19785,13 +20700,16 @@ var ts;
                 : factory.createStrictEquality(createTypeOfExpression(value), createStringLiteral(tag));
         }
         function createMethodCall(object, methodName, argumentsList) {
+            if (ts.isCallChain(object)) {
+                return createCallChain(createPropertyAccessChain(object, undefined, methodName), undefined, undefined, argumentsList);
+            }
             return createCallExpression(createPropertyAccessExpression(object, methodName), undefined, argumentsList);
         }
         function createFunctionBindCall(target, thisArg, argumentsList) {
-            return createMethodCall(target, "bind", __spreadArray([thisArg], argumentsList));
+            return createMethodCall(target, "bind", __spreadArray([thisArg], argumentsList, true));
         }
         function createFunctionCallCall(target, thisArg, argumentsList) {
-            return createMethodCall(target, "call", __spreadArray([thisArg], argumentsList));
+            return createMethodCall(target, "call", __spreadArray([thisArg], argumentsList, true));
         }
         function createFunctionApplyCall(target, thisArg, argumentsExpression) {
             return createMethodCall(target, "apply", [thisArg, argumentsExpression]);
@@ -19808,6 +20726,12 @@ var ts;
         function createObjectDefinePropertyCall(target, propertyName, attributes) {
             return createGlobalMethodCall("Object", "defineProperty", [target, asExpression(propertyName), attributes]);
         }
+        function createReflectGetCall(target, propertyKey, receiver) {
+            return createGlobalMethodCall("Reflect", "get", receiver ? [target, propertyKey, receiver] : [target, propertyKey]);
+        }
+        function createReflectSetCall(target, propertyKey, value, receiver) {
+            return createGlobalMethodCall("Reflect", "set", receiver ? [target, propertyKey, value, receiver] : [target, propertyKey, value]);
+        }
         function tryAddPropertyAssignment(properties, propertyName, expression) {
             if (expression) {
                 properties.push(createPropertyAssignment(propertyName, expression));
@@ -19828,11 +20752,11 @@ var ts;
         }
         function updateOuterExpression(outerExpression, expression) {
             switch (outerExpression.kind) {
-                case 207: return updateParenthesizedExpression(outerExpression, expression);
-                case 206: return updateTypeAssertion(outerExpression, outerExpression.type, expression);
-                case 224: return updateAsExpression(outerExpression, expression, outerExpression.type);
-                case 225: return updateNonNullExpression(outerExpression, expression);
-                case 336: return updatePartiallyEmittedExpression(outerExpression, expression);
+                case 211: return updateParenthesizedExpression(outerExpression, expression);
+                case 210: return updateTypeAssertion(outerExpression, outerExpression.type, expression);
+                case 228: return updateAsExpression(outerExpression, expression, outerExpression.type);
+                case 229: return updateNonNullExpression(outerExpression, expression);
+                case 348: return updatePartiallyEmittedExpression(outerExpression, expression);
             }
         }
         function isIgnorableParen(node) {
@@ -19865,20 +20789,20 @@ var ts;
         function shouldBeCapturedInTempVariable(node, cacheIdentifiers) {
             var target = ts.skipParentheses(node);
             switch (target.kind) {
-                case 78:
+                case 79:
                     return cacheIdentifiers;
-                case 107:
+                case 108:
                 case 8:
                 case 9:
                 case 10:
                     return false;
-                case 199:
+                case 203:
                     var elements = target.elements;
                     if (elements.length === 0) {
                         return false;
                     }
                     return true;
-                case 200:
+                case 204:
                     return target.properties.length > 0;
                 default:
                     return true;
@@ -19931,6 +20855,13 @@ var ts;
             }
             return { target: target, thisArg: thisArg };
         }
+        function createAssignmentTargetWrapper(paramName, expression) {
+            return createPropertyAccessExpression(createParenthesizedExpression(createObjectLiteralExpression([
+                createSetAccessorDeclaration(undefined, undefined, "value", [createParameterDeclaration(undefined, undefined, undefined, paramName, undefined, undefined, undefined)], createBlock([
+                    createExpressionStatement(expression)
+                ]))
+            ])), "value");
+        }
         function inlineExpressions(expressions) {
             return expressions.length > 10
                 ? createCommaListExpression(expressions)
@@ -20033,7 +20964,7 @@ var ts;
         function ensureUseStrict(statements) {
             var foundUseStrict = ts.findUseStrictPrologue(statements);
             if (!foundUseStrict) {
-                return ts.setTextRange(createNodeArray(__spreadArray([createUseStrictPrologue()], statements)), statements);
+                return ts.setTextRange(createNodeArray(__spreadArray([createUseStrictPrologue()], statements, true)), statements);
             }
             return statements;
         }
@@ -20062,17 +20993,17 @@ var ts;
             ts.Debug.assert(rightCustomPrologueEnd === declarations.length, "Expected declarations to be valid standard or custom prologues");
             var left = ts.isNodeArray(statements) ? statements.slice() : statements;
             if (rightCustomPrologueEnd > rightHoistedVariablesEnd) {
-                left.splice.apply(left, __spreadArray([leftHoistedVariablesEnd, 0], declarations.slice(rightHoistedVariablesEnd, rightCustomPrologueEnd)));
+                left.splice.apply(left, __spreadArray([leftHoistedVariablesEnd, 0], declarations.slice(rightHoistedVariablesEnd, rightCustomPrologueEnd), false));
             }
             if (rightHoistedVariablesEnd > rightHoistedFunctionsEnd) {
-                left.splice.apply(left, __spreadArray([leftHoistedFunctionsEnd, 0], declarations.slice(rightHoistedFunctionsEnd, rightHoistedVariablesEnd)));
+                left.splice.apply(left, __spreadArray([leftHoistedFunctionsEnd, 0], declarations.slice(rightHoistedFunctionsEnd, rightHoistedVariablesEnd), false));
             }
             if (rightHoistedFunctionsEnd > rightStandardPrologueEnd) {
-                left.splice.apply(left, __spreadArray([leftStandardPrologueEnd, 0], declarations.slice(rightStandardPrologueEnd, rightHoistedFunctionsEnd)));
+                left.splice.apply(left, __spreadArray([leftStandardPrologueEnd, 0], declarations.slice(rightStandardPrologueEnd, rightHoistedFunctionsEnd), false));
             }
             if (rightStandardPrologueEnd > 0) {
                 if (leftStandardPrologueEnd === 0) {
-                    left.splice.apply(left, __spreadArray([0, 0], declarations.slice(0, rightStandardPrologueEnd)));
+                    left.splice.apply(left, __spreadArray([0, 0], declarations.slice(0, rightStandardPrologueEnd), false));
                 }
                 else {
                     var leftPrologues = new ts.Map();
@@ -20118,9 +21049,9 @@ var ts;
                                                                                 ts.isEnumDeclaration(node) ? updateEnumDeclaration(node, node.decorators, modifiers, node.name, node.members) :
                                                                                     ts.isModuleDeclaration(node) ? updateModuleDeclaration(node, node.decorators, modifiers, node.name, node.body) :
                                                                                         ts.isImportEqualsDeclaration(node) ? updateImportEqualsDeclaration(node, node.decorators, modifiers, node.isTypeOnly, node.name, node.moduleReference) :
-                                                                                            ts.isImportDeclaration(node) ? updateImportDeclaration(node, node.decorators, modifiers, node.importClause, node.moduleSpecifier) :
+                                                                                            ts.isImportDeclaration(node) ? updateImportDeclaration(node, node.decorators, modifiers, node.importClause, node.moduleSpecifier, node.assertClause) :
                                                                                                 ts.isExportAssignment(node) ? updateExportAssignment(node, node.decorators, modifiers, node.expression) :
-                                                                                                    ts.isExportDeclaration(node) ? updateExportDeclaration(node, node.decorators, modifiers, node.isTypeOnly, node.exportClause, node.moduleSpecifier) :
+                                                                                                    ts.isExportDeclaration(node) ? updateExportDeclaration(node, node.decorators, modifiers, node.isTypeOnly, node.exportClause, node.moduleSpecifier, node.assertClause) :
                                                                                                         ts.Debug.assertNever(node);
         }
         function asNodeArray(array) {
@@ -20159,25 +21090,26 @@ var ts;
     }
     function getDefaultTagNameForKind(kind) {
         switch (kind) {
-            case 329: return "type";
-            case 327: return "returns";
-            case 328: return "this";
-            case 325: return "enum";
-            case 317: return "author";
-            case 319: return "class";
-            case 320: return "public";
-            case 321: return "private";
-            case 322: return "protected";
-            case 323: return "readonly";
-            case 330: return "template";
-            case 331: return "typedef";
-            case 326: return "param";
-            case 333: return "prop";
-            case 324: return "callback";
-            case 315: return "augments";
-            case 316: return "implements";
+            case 341: return "type";
+            case 339: return "returns";
+            case 340: return "this";
+            case 337: return "enum";
+            case 328: return "author";
+            case 330: return "class";
+            case 331: return "public";
+            case 332: return "private";
+            case 333: return "protected";
+            case 334: return "readonly";
+            case 335: return "override";
+            case 342: return "template";
+            case 343: return "typedef";
+            case 338: return "param";
+            case 345: return "prop";
+            case 336: return "callback";
+            case 326: return "augments";
+            case 327: return "implements";
             default:
-                return ts.Debug.fail("Unsupported kind: " + ts.Debug.formatSyntaxKind(kind));
+                return ts.Debug.fail("Unsupported kind: ".concat(ts.Debug.formatSyntaxKind(kind)));
         }
     }
     var rawTextScanner;
@@ -20201,7 +21133,7 @@ var ts;
                 break;
         }
         var token = rawTextScanner.scan();
-        if (token === 23) {
+        if (token === 19) {
             token = rawTextScanner.reScanTemplateToken(false);
         }
         if (rawTextScanner.isUnterminated()) {
@@ -20225,10 +21157,10 @@ var ts;
         return tokenValue;
     }
     function propagateIdentifierNameFlags(node) {
-        return propagateChildFlags(node) & ~8388608;
+        return propagateChildFlags(node) & ~16777216;
     }
     function propagatePropertyNameFlagsOfChild(node, transformFlags) {
-        return transformFlags | (node.transformFlags & 4096);
+        return transformFlags | (node.transformFlags & 33562624);
     }
     function propagateChildFlags(child) {
         if (!child)
@@ -20248,69 +21180,69 @@ var ts;
         children.transformFlags = subtreeFlags;
     }
     function getTransformFlagsSubtreeExclusions(kind) {
-        if (kind >= 172 && kind <= 195) {
+        if (kind >= 176 && kind <= 199) {
             return -2;
         }
         switch (kind) {
+            case 207:
+            case 208:
             case 203:
-            case 204:
-            case 199:
-                return 536879104;
-            case 256:
-                return 546379776;
-            case 160:
+                return 536887296;
+            case 260:
+                return 589443072;
+            case 163:
                 return 536870912;
-            case 209:
-                return 547309568;
-            case 208:
-            case 251:
-                return 547313664;
-            case 250:
-                return 537018368;
-            case 252:
-            case 221:
-                return 536905728;
+            case 213:
+                return 557748224;
+            case 212:
+            case 255:
+                return 591310848;
+            case 254:
+                return 537165824;
+            case 256:
+            case 225:
+                return 536940544;
+            case 170:
+                return 591306752;
             case 166:
-                return 547311616;
-            case 163:
-                return 536875008;
-            case 165:
-            case 167:
+                return 570433536;
             case 168:
-                return 538923008;
-            case 128:
-            case 144:
-            case 155:
-            case 141:
+            case 171:
+            case 172:
+                return 574529536;
+            case 130:
+            case 146:
+            case 157:
+            case 143:
+            case 149:
             case 147:
-            case 145:
-            case 131:
-            case 148:
-            case 113:
-            case 159:
+            case 133:
+            case 150:
+            case 114:
             case 162:
-            case 164:
-            case 169:
-            case 170:
-            case 171:
-            case 253:
-            case 254:
+            case 165:
+            case 167:
+            case 173:
+            case 174:
+            case 175:
+            case 257:
+            case 258:
                 return -2;
+            case 204:
+                return 536973312;
+            case 291:
+                return 536903680;
             case 200:
-                return 536922112;
-            case 287:
+            case 201:
                 return 536887296;
-            case 196:
-            case 197:
-                return 536879104;
-            case 206:
-            case 224:
-            case 336:
-            case 207:
-            case 105:
+            case 210:
+            case 228:
+            case 348:
+            case 211:
+            case 106:
                 return 536870912;
-            case 201:
-            case 202:
+            case 205:
+            case 206:
                 return 536870912;
             default:
                 return 536870912;
@@ -20496,7 +21428,7 @@ var ts;
             };
             var definedTextGetter_1 = function (path) {
                 var result = textGetter_1(path);
-                return result !== undefined ? result : "/* Input file " + path + " was missing */\r\n";
+                return result !== undefined ? result : "/* Input file ".concat(path, " was missing */\r\n");
             };
             var buildInfo_1;
             var getAndCacheBuildInfo_1 = function (getText) {
@@ -20559,7 +21491,7 @@ var ts;
         if (trailingComments)
             destEmitNode.trailingComments = ts.addRange(trailingComments.slice(), destEmitNode.trailingComments);
         if (flags)
-            destEmitNode.flags = flags;
+            destEmitNode.flags = flags & ~268435456;
         if (commentRange)
             destEmitNode.commentRange = commentRange;
         if (sourceMapRange)
@@ -20593,7 +21525,7 @@ var ts;
         var _a;
         if (!node.emitNode) {
             if (ts.isParseTreeNode(node)) {
-                if (node.kind === 297) {
+                if (node.kind === 303) {
                     return node.emitNode = { annotatedNodes: [node] };
                 }
                 var sourceFile = (_a = ts.getSourceFileOfNode(ts.getParseTreeNode(ts.getSourceFileOfNode(node)))) !== null && _a !== void 0 ? _a : ts.Debug.fail("Could not determine parsed source file.");
@@ -20601,6 +21533,9 @@ var ts;
             }
             node.emitNode = {};
         }
+        else {
+            ts.Debug.assert(!(node.emitNode.flags & 268435456), "Invalid attempt to mutate an immutable node.");
+        }
         return node.emitNode;
     }
     ts.getOrCreateEmitNode = getOrCreateEmitNode;
@@ -20778,6 +21713,17 @@ var ts;
         }
     }
     ts.moveEmitHelpers = moveEmitHelpers;
+    function getSnippetElement(node) {
+        var _a;
+        return (_a = node.emitNode) === null || _a === void 0 ? void 0 : _a.snippetElement;
+    }
+    ts.getSnippetElement = getSnippetElement;
+    function setSnippetElement(node, snippet) {
+        var emitNode = getOrCreateEmitNode(node);
+        emitNode.snippetElement = snippet;
+        return node;
+    }
+    ts.setSnippetElement = setSnippetElement;
     function ignoreSourceNewlines(node) {
         getOrCreateEmitNode(node).flags |= 134217728;
         return node;
@@ -20788,6 +21734,8 @@ var ts;
 (function (ts) {
     function createEmitHelperFactory(context) {
         var factory = context.factory;
+        var immutableTrue = ts.memoize(function () { return ts.setEmitFlags(factory.createTrue(), 268435456); });
+        var immutableFalse = ts.memoize(function () { return ts.setEmitFlags(factory.createFalse(), 268435456); });
         return {
             getUnscopedHelperName: getUnscopedHelperName,
             createDecorateHelper: createDecorateHelper,
@@ -20813,6 +21761,7 @@ var ts;
             createExportStarHelper: createExportStarHelper,
             createClassPrivateFieldGetHelper: createClassPrivateFieldGetHelper,
             createClassPrivateFieldSetHelper: createClassPrivateFieldSetHelper,
+            createClassPrivateFieldInHelper: createClassPrivateFieldInHelper
         };
         function getUnscopedHelperName(name) {
             return ts.setEmitFlags(factory.createIdentifier(name), 4096 | 2);
@@ -20845,7 +21794,7 @@ var ts;
             ]), location);
         }
         function createAssignHelper(attributesSegments) {
-            if (context.getCompilerOptions().target >= 2) {
+            if (ts.getEmitScriptTarget(context.getCompilerOptions()) >= 2) {
                 return factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Object"), "assign"), undefined, attributesSegments);
             }
             context.requestEmitHelper(ts.assignHelper);
@@ -20916,9 +21865,9 @@ var ts;
             context.requestEmitHelper(ts.templateObjectHelper);
             return factory.createCallExpression(getUnscopedHelperName("__makeTemplateObject"), undefined, [cooked, raw]);
         }
-        function createSpreadArrayHelper(to, from) {
+        function createSpreadArrayHelper(to, from, packFrom) {
             context.requestEmitHelper(ts.spreadArrayHelper);
-            return factory.createCallExpression(getUnscopedHelperName("__spreadArray"), undefined, [to, from]);
+            return factory.createCallExpression(getUnscopedHelperName("__spreadArray"), undefined, [to, from, packFrom ? immutableTrue() : immutableFalse()]);
         }
         function createValuesHelper(expression) {
             context.requestEmitHelper(ts.valuesHelper);
@@ -20936,7 +21885,7 @@ var ts;
         }
         function createCreateBindingHelper(module, inputName, outputName) {
             context.requestEmitHelper(ts.createBindingHelper);
-            return factory.createCallExpression(getUnscopedHelperName("__createBinding"), undefined, __spreadArray([factory.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : [])));
+            return factory.createCallExpression(getUnscopedHelperName("__createBinding"), undefined, __spreadArray([factory.createIdentifier("exports"), module, inputName], (outputName ? [outputName] : []), true));
         }
         function createImportStarHelper(expression) {
             context.requestEmitHelper(ts.importStarHelper);
@@ -20956,13 +21905,31 @@ var ts;
             context.requestEmitHelper(ts.createBindingHelper);
             return factory.createCallExpression(getUnscopedHelperName("__exportStar"), undefined, [moduleExpression, exportsExpression]);
         }
-        function createClassPrivateFieldGetHelper(receiver, privateField) {
+        function createClassPrivateFieldGetHelper(receiver, state, kind, f) {
             context.requestEmitHelper(ts.classPrivateFieldGetHelper);
-            return factory.createCallExpression(getUnscopedHelperName("__classPrivateFieldGet"), undefined, [receiver, privateField]);
+            var args;
+            if (!f) {
+                args = [receiver, state, factory.createStringLiteral(kind)];
+            }
+            else {
+                args = [receiver, state, factory.createStringLiteral(kind), f];
+            }
+            return factory.createCallExpression(getUnscopedHelperName("__classPrivateFieldGet"), undefined, args);
         }
-        function createClassPrivateFieldSetHelper(receiver, privateField, value) {
+        function createClassPrivateFieldSetHelper(receiver, state, value, kind, f) {
             context.requestEmitHelper(ts.classPrivateFieldSetHelper);
-            return factory.createCallExpression(getUnscopedHelperName("__classPrivateFieldSet"), undefined, [receiver, privateField, value]);
+            var args;
+            if (!f) {
+                args = [receiver, state, value, factory.createStringLiteral(kind)];
+            }
+            else {
+                args = [receiver, state, value, factory.createStringLiteral(kind), f];
+            }
+            return factory.createCallExpression(getUnscopedHelperName("__classPrivateFieldSet"), undefined, args);
+        }
+        function createClassPrivateFieldInHelper(state, receiver) {
+            context.requestEmitHelper(ts.classPrivateFieldInHelper);
+            return factory.createCallExpression(getUnscopedHelperName("__classPrivateFieldIn"), undefined, [state, receiver]);
         }
     }
     ts.createEmitHelperFactory = createEmitHelperFactory;
@@ -21085,7 +22052,7 @@ var ts;
         name: "typescript:spreadArray",
         importName: "__spreadArray",
         scoped: false,
-        text: "\n            var __spreadArray = (this && this.__spreadArray) || function (to, from) {\n                for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\n                    to[j] = from[i];\n                return to;\n            };"
+        text: "\n            var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n                if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n                    if (ar || !(i in from)) {\n                        if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n                        ar[i] = from[i];\n                    }\n                }\n                return to.concat(ar || Array.prototype.slice.call(from));\n            };"
     };
     ts.valuesHelper = {
         name: "typescript:values",
@@ -21140,13 +22107,19 @@ var ts;
         name: "typescript:classPrivateFieldGet",
         importName: "__classPrivateFieldGet",
         scoped: false,
-        text: "\n            var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {\n                if (!privateMap.has(receiver)) {\n                    throw new TypeError(\"attempted to get private field on non-instance\");\n                }\n                return privateMap.get(receiver);\n            };"
+        text: "\n            var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n                if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n                if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n                return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n            };"
     };
     ts.classPrivateFieldSetHelper = {
         name: "typescript:classPrivateFieldSet",
         importName: "__classPrivateFieldSet",
         scoped: false,
-        text: "\n            var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {\n                if (!privateMap.has(receiver)) {\n                    throw new TypeError(\"attempted to set private field on non-instance\");\n                }\n                privateMap.set(receiver, value);\n                return value;\n            };"
+        text: "\n            var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {\n                if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n                if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n                if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n                return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n            };"
+    };
+    ts.classPrivateFieldInHelper = {
+        name: "typescript:classPrivateFieldIn",
+        importName: "__classPrivateFieldIn",
+        scoped: false,
+        text: "\n            var __classPrivateFieldIn = (this && this.__classPrivateFieldIn) || function(state, receiver) {\n                if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n                return typeof state === \"function\" ? receiver === state : state.has(receiver);\n            };"
     };
     var allUnscopedEmitHelpers;
     function getAllUnscopedEmitHelpers() {
@@ -21172,6 +22145,7 @@ var ts;
             ts.exportStarHelper,
             ts.classPrivateFieldGetHelper,
             ts.classPrivateFieldSetHelper,
+            ts.classPrivateFieldInHelper,
             ts.createBindingHelper,
             ts.setModuleDefaultHelper
         ], function (helper) { return helper.name; }));
@@ -21190,7 +22164,7 @@ var ts;
     function isCallToHelper(firstSegment, helperName) {
         return ts.isCallExpression(firstSegment)
             && ts.isIdentifier(firstSegment.expression)
-            && (ts.getEmitFlags(firstSegment.expression) & 4096)
+            && (ts.getEmitFlags(firstSegment.expression) & 4096) !== 0
             && firstSegment.expression.escapedText === helperName;
     }
     ts.isCallToHelper = isCallToHelper;
@@ -21233,748 +22207,836 @@ var ts;
         return node.kind === 17;
     }
     ts.isTemplateTail = isTemplateTail;
-    function isIdentifier(node) {
-        return node.kind === 78;
+    function isDotDotDotToken(node) {
+        return node.kind === 25;
     }
-    ts.isIdentifier = isIdentifier;
-    function isQualifiedName(node) {
-        return node.kind === 157;
+    ts.isDotDotDotToken = isDotDotDotToken;
+    function isCommaToken(node) {
+        return node.kind === 27;
     }
-    ts.isQualifiedName = isQualifiedName;
-    function isComputedPropertyName(node) {
-        return node.kind === 158;
+    ts.isCommaToken = isCommaToken;
+    function isPlusToken(node) {
+        return node.kind === 39;
     }
-    ts.isComputedPropertyName = isComputedPropertyName;
-    function isPrivateIdentifier(node) {
+    ts.isPlusToken = isPlusToken;
+    function isMinusToken(node) {
+        return node.kind === 40;
+    }
+    ts.isMinusToken = isMinusToken;
+    function isAsteriskToken(node) {
+        return node.kind === 41;
+    }
+    ts.isAsteriskToken = isAsteriskToken;
+    function isExclamationToken(node) {
+        return node.kind === 53;
+    }
+    ts.isExclamationToken = isExclamationToken;
+    function isQuestionToken(node) {
+        return node.kind === 57;
+    }
+    ts.isQuestionToken = isQuestionToken;
+    function isColonToken(node) {
+        return node.kind === 58;
+    }
+    ts.isColonToken = isColonToken;
+    function isQuestionDotToken(node) {
+        return node.kind === 28;
+    }
+    ts.isQuestionDotToken = isQuestionDotToken;
+    function isEqualsGreaterThanToken(node) {
+        return node.kind === 38;
+    }
+    ts.isEqualsGreaterThanToken = isEqualsGreaterThanToken;
+    function isIdentifier(node) {
         return node.kind === 79;
     }
+    ts.isIdentifier = isIdentifier;
+    function isPrivateIdentifier(node) {
+        return node.kind === 80;
+    }
     ts.isPrivateIdentifier = isPrivateIdentifier;
+    function isExportModifier(node) {
+        return node.kind === 93;
+    }
+    ts.isExportModifier = isExportModifier;
+    function isAsyncModifier(node) {
+        return node.kind === 131;
+    }
+    ts.isAsyncModifier = isAsyncModifier;
+    function isAssertsKeyword(node) {
+        return node.kind === 128;
+    }
+    ts.isAssertsKeyword = isAssertsKeyword;
+    function isAwaitKeyword(node) {
+        return node.kind === 132;
+    }
+    ts.isAwaitKeyword = isAwaitKeyword;
+    function isReadonlyKeyword(node) {
+        return node.kind === 144;
+    }
+    ts.isReadonlyKeyword = isReadonlyKeyword;
+    function isStaticModifier(node) {
+        return node.kind === 124;
+    }
+    ts.isStaticModifier = isStaticModifier;
+    function isAbstractModifier(node) {
+        return node.kind === 126;
+    }
+    ts.isAbstractModifier = isAbstractModifier;
     function isSuperKeyword(node) {
-        return node.kind === 105;
+        return node.kind === 106;
     }
     ts.isSuperKeyword = isSuperKeyword;
     function isImportKeyword(node) {
-        return node.kind === 99;
+        return node.kind === 100;
     }
     ts.isImportKeyword = isImportKeyword;
-    function isCommaToken(node) {
-        return node.kind === 27;
-    }
-    ts.isCommaToken = isCommaToken;
-    function isQuestionToken(node) {
-        return node.kind === 57;
+    function isQualifiedName(node) {
+        return node.kind === 160;
     }
-    ts.isQuestionToken = isQuestionToken;
-    function isExclamationToken(node) {
-        return node.kind === 53;
+    ts.isQualifiedName = isQualifiedName;
+    function isComputedPropertyName(node) {
+        return node.kind === 161;
     }
-    ts.isExclamationToken = isExclamationToken;
+    ts.isComputedPropertyName = isComputedPropertyName;
     function isTypeParameterDeclaration(node) {
-        return node.kind === 159;
+        return node.kind === 162;
     }
     ts.isTypeParameterDeclaration = isTypeParameterDeclaration;
     function isParameter(node) {
-        return node.kind === 160;
+        return node.kind === 163;
     }
     ts.isParameter = isParameter;
     function isDecorator(node) {
-        return node.kind === 161;
+        return node.kind === 164;
     }
     ts.isDecorator = isDecorator;
     function isPropertySignature(node) {
-        return node.kind === 162;
+        return node.kind === 165;
     }
     ts.isPropertySignature = isPropertySignature;
     function isPropertyDeclaration(node) {
-        return node.kind === 163;
+        return node.kind === 166;
     }
     ts.isPropertyDeclaration = isPropertyDeclaration;
     function isMethodSignature(node) {
-        return node.kind === 164;
+        return node.kind === 167;
     }
     ts.isMethodSignature = isMethodSignature;
     function isMethodDeclaration(node) {
-        return node.kind === 165;
+        return node.kind === 168;
     }
     ts.isMethodDeclaration = isMethodDeclaration;
+    function isClassStaticBlockDeclaration(node) {
+        return node.kind === 169;
+    }
+    ts.isClassStaticBlockDeclaration = isClassStaticBlockDeclaration;
     function isConstructorDeclaration(node) {
-        return node.kind === 166;
+        return node.kind === 170;
     }
     ts.isConstructorDeclaration = isConstructorDeclaration;
     function isGetAccessorDeclaration(node) {
-        return node.kind === 167;
+        return node.kind === 171;
     }
     ts.isGetAccessorDeclaration = isGetAccessorDeclaration;
     function isSetAccessorDeclaration(node) {
-        return node.kind === 168;
+        return node.kind === 172;
     }
     ts.isSetAccessorDeclaration = isSetAccessorDeclaration;
     function isCallSignatureDeclaration(node) {
-        return node.kind === 169;
+        return node.kind === 173;
     }
     ts.isCallSignatureDeclaration = isCallSignatureDeclaration;
     function isConstructSignatureDeclaration(node) {
-        return node.kind === 170;
+        return node.kind === 174;
     }
     ts.isConstructSignatureDeclaration = isConstructSignatureDeclaration;
     function isIndexSignatureDeclaration(node) {
-        return node.kind === 171;
+        return node.kind === 175;
     }
     ts.isIndexSignatureDeclaration = isIndexSignatureDeclaration;
     function isTypePredicateNode(node) {
-        return node.kind === 172;
+        return node.kind === 176;
     }
     ts.isTypePredicateNode = isTypePredicateNode;
     function isTypeReferenceNode(node) {
-        return node.kind === 173;
+        return node.kind === 177;
     }
     ts.isTypeReferenceNode = isTypeReferenceNode;
     function isFunctionTypeNode(node) {
-        return node.kind === 174;
+        return node.kind === 178;
     }
     ts.isFunctionTypeNode = isFunctionTypeNode;
     function isConstructorTypeNode(node) {
-        return node.kind === 175;
+        return node.kind === 179;
     }
     ts.isConstructorTypeNode = isConstructorTypeNode;
     function isTypeQueryNode(node) {
-        return node.kind === 176;
+        return node.kind === 180;
     }
     ts.isTypeQueryNode = isTypeQueryNode;
     function isTypeLiteralNode(node) {
-        return node.kind === 177;
+        return node.kind === 181;
     }
     ts.isTypeLiteralNode = isTypeLiteralNode;
     function isArrayTypeNode(node) {
-        return node.kind === 178;
+        return node.kind === 182;
     }
     ts.isArrayTypeNode = isArrayTypeNode;
     function isTupleTypeNode(node) {
-        return node.kind === 179;
+        return node.kind === 183;
     }
     ts.isTupleTypeNode = isTupleTypeNode;
     function isNamedTupleMember(node) {
-        return node.kind === 192;
+        return node.kind === 196;
     }
     ts.isNamedTupleMember = isNamedTupleMember;
     function isOptionalTypeNode(node) {
-        return node.kind === 180;
+        return node.kind === 184;
     }
     ts.isOptionalTypeNode = isOptionalTypeNode;
     function isRestTypeNode(node) {
-        return node.kind === 181;
+        return node.kind === 185;
     }
     ts.isRestTypeNode = isRestTypeNode;
     function isUnionTypeNode(node) {
-        return node.kind === 182;
+        return node.kind === 186;
     }
     ts.isUnionTypeNode = isUnionTypeNode;
     function isIntersectionTypeNode(node) {
-        return node.kind === 183;
+        return node.kind === 187;
     }
     ts.isIntersectionTypeNode = isIntersectionTypeNode;
     function isConditionalTypeNode(node) {
-        return node.kind === 184;
+        return node.kind === 188;
     }
     ts.isConditionalTypeNode = isConditionalTypeNode;
     function isInferTypeNode(node) {
-        return node.kind === 185;
+        return node.kind === 189;
     }
     ts.isInferTypeNode = isInferTypeNode;
     function isParenthesizedTypeNode(node) {
-        return node.kind === 186;
+        return node.kind === 190;
     }
     ts.isParenthesizedTypeNode = isParenthesizedTypeNode;
     function isThisTypeNode(node) {
-        return node.kind === 187;
+        return node.kind === 191;
     }
     ts.isThisTypeNode = isThisTypeNode;
     function isTypeOperatorNode(node) {
-        return node.kind === 188;
+        return node.kind === 192;
     }
     ts.isTypeOperatorNode = isTypeOperatorNode;
     function isIndexedAccessTypeNode(node) {
-        return node.kind === 189;
+        return node.kind === 193;
     }
     ts.isIndexedAccessTypeNode = isIndexedAccessTypeNode;
     function isMappedTypeNode(node) {
-        return node.kind === 190;
+        return node.kind === 194;
     }
     ts.isMappedTypeNode = isMappedTypeNode;
     function isLiteralTypeNode(node) {
-        return node.kind === 191;
+        return node.kind === 195;
     }
     ts.isLiteralTypeNode = isLiteralTypeNode;
     function isImportTypeNode(node) {
-        return node.kind === 195;
+        return node.kind === 199;
     }
     ts.isImportTypeNode = isImportTypeNode;
     function isTemplateLiteralTypeSpan(node) {
-        return node.kind === 194;
+        return node.kind === 198;
     }
     ts.isTemplateLiteralTypeSpan = isTemplateLiteralTypeSpan;
     function isTemplateLiteralTypeNode(node) {
-        return node.kind === 193;
+        return node.kind === 197;
     }
     ts.isTemplateLiteralTypeNode = isTemplateLiteralTypeNode;
     function isObjectBindingPattern(node) {
-        return node.kind === 196;
+        return node.kind === 200;
     }
     ts.isObjectBindingPattern = isObjectBindingPattern;
     function isArrayBindingPattern(node) {
-        return node.kind === 197;
+        return node.kind === 201;
     }
     ts.isArrayBindingPattern = isArrayBindingPattern;
     function isBindingElement(node) {
-        return node.kind === 198;
+        return node.kind === 202;
     }
     ts.isBindingElement = isBindingElement;
     function isArrayLiteralExpression(node) {
-        return node.kind === 199;
+        return node.kind === 203;
     }
     ts.isArrayLiteralExpression = isArrayLiteralExpression;
     function isObjectLiteralExpression(node) {
-        return node.kind === 200;
+        return node.kind === 204;
     }
     ts.isObjectLiteralExpression = isObjectLiteralExpression;
     function isPropertyAccessExpression(node) {
-        return node.kind === 201;
+        return node.kind === 205;
     }
     ts.isPropertyAccessExpression = isPropertyAccessExpression;
     function isElementAccessExpression(node) {
-        return node.kind === 202;
+        return node.kind === 206;
     }
     ts.isElementAccessExpression = isElementAccessExpression;
     function isCallExpression(node) {
-        return node.kind === 203;
+        return node.kind === 207;
     }
     ts.isCallExpression = isCallExpression;
     function isNewExpression(node) {
-        return node.kind === 204;
+        return node.kind === 208;
     }
     ts.isNewExpression = isNewExpression;
     function isTaggedTemplateExpression(node) {
-        return node.kind === 205;
+        return node.kind === 209;
     }
     ts.isTaggedTemplateExpression = isTaggedTemplateExpression;
     function isTypeAssertionExpression(node) {
-        return node.kind === 206;
+        return node.kind === 210;
     }
     ts.isTypeAssertionExpression = isTypeAssertionExpression;
     function isParenthesizedExpression(node) {
-        return node.kind === 207;
+        return node.kind === 211;
     }
     ts.isParenthesizedExpression = isParenthesizedExpression;
     function isFunctionExpression(node) {
-        return node.kind === 208;
+        return node.kind === 212;
     }
     ts.isFunctionExpression = isFunctionExpression;
     function isArrowFunction(node) {
-        return node.kind === 209;
+        return node.kind === 213;
     }
     ts.isArrowFunction = isArrowFunction;
     function isDeleteExpression(node) {
-        return node.kind === 210;
+        return node.kind === 214;
     }
     ts.isDeleteExpression = isDeleteExpression;
     function isTypeOfExpression(node) {
-        return node.kind === 211;
+        return node.kind === 215;
     }
     ts.isTypeOfExpression = isTypeOfExpression;
     function isVoidExpression(node) {
-        return node.kind === 212;
+        return node.kind === 216;
     }
     ts.isVoidExpression = isVoidExpression;
     function isAwaitExpression(node) {
-        return node.kind === 213;
+        return node.kind === 217;
     }
     ts.isAwaitExpression = isAwaitExpression;
     function isPrefixUnaryExpression(node) {
-        return node.kind === 214;
+        return node.kind === 218;
     }
     ts.isPrefixUnaryExpression = isPrefixUnaryExpression;
     function isPostfixUnaryExpression(node) {
-        return node.kind === 215;
+        return node.kind === 219;
     }
     ts.isPostfixUnaryExpression = isPostfixUnaryExpression;
     function isBinaryExpression(node) {
-        return node.kind === 216;
+        return node.kind === 220;
     }
     ts.isBinaryExpression = isBinaryExpression;
     function isConditionalExpression(node) {
-        return node.kind === 217;
+        return node.kind === 221;
     }
     ts.isConditionalExpression = isConditionalExpression;
     function isTemplateExpression(node) {
-        return node.kind === 218;
+        return node.kind === 222;
     }
     ts.isTemplateExpression = isTemplateExpression;
     function isYieldExpression(node) {
-        return node.kind === 219;
+        return node.kind === 223;
     }
     ts.isYieldExpression = isYieldExpression;
     function isSpreadElement(node) {
-        return node.kind === 220;
+        return node.kind === 224;
     }
     ts.isSpreadElement = isSpreadElement;
     function isClassExpression(node) {
-        return node.kind === 221;
+        return node.kind === 225;
     }
     ts.isClassExpression = isClassExpression;
     function isOmittedExpression(node) {
-        return node.kind === 222;
+        return node.kind === 226;
     }
     ts.isOmittedExpression = isOmittedExpression;
     function isExpressionWithTypeArguments(node) {
-        return node.kind === 223;
+        return node.kind === 227;
     }
     ts.isExpressionWithTypeArguments = isExpressionWithTypeArguments;
     function isAsExpression(node) {
-        return node.kind === 224;
+        return node.kind === 228;
     }
     ts.isAsExpression = isAsExpression;
     function isNonNullExpression(node) {
-        return node.kind === 225;
+        return node.kind === 229;
     }
     ts.isNonNullExpression = isNonNullExpression;
     function isMetaProperty(node) {
-        return node.kind === 226;
+        return node.kind === 230;
     }
     ts.isMetaProperty = isMetaProperty;
     function isSyntheticExpression(node) {
-        return node.kind === 227;
+        return node.kind === 231;
     }
     ts.isSyntheticExpression = isSyntheticExpression;
     function isPartiallyEmittedExpression(node) {
-        return node.kind === 336;
+        return node.kind === 348;
     }
     ts.isPartiallyEmittedExpression = isPartiallyEmittedExpression;
     function isCommaListExpression(node) {
-        return node.kind === 337;
+        return node.kind === 349;
     }
     ts.isCommaListExpression = isCommaListExpression;
     function isTemplateSpan(node) {
-        return node.kind === 228;
+        return node.kind === 232;
     }
     ts.isTemplateSpan = isTemplateSpan;
     function isSemicolonClassElement(node) {
-        return node.kind === 229;
+        return node.kind === 233;
     }
     ts.isSemicolonClassElement = isSemicolonClassElement;
     function isBlock(node) {
-        return node.kind === 230;
+        return node.kind === 234;
     }
     ts.isBlock = isBlock;
     function isVariableStatement(node) {
-        return node.kind === 232;
+        return node.kind === 236;
     }
     ts.isVariableStatement = isVariableStatement;
     function isEmptyStatement(node) {
-        return node.kind === 231;
+        return node.kind === 235;
     }
     ts.isEmptyStatement = isEmptyStatement;
     function isExpressionStatement(node) {
-        return node.kind === 233;
+        return node.kind === 237;
     }
     ts.isExpressionStatement = isExpressionStatement;
     function isIfStatement(node) {
-        return node.kind === 234;
+        return node.kind === 238;
     }
     ts.isIfStatement = isIfStatement;
     function isDoStatement(node) {
-        return node.kind === 235;
+        return node.kind === 239;
     }
     ts.isDoStatement = isDoStatement;
     function isWhileStatement(node) {
-        return node.kind === 236;
+        return node.kind === 240;
     }
     ts.isWhileStatement = isWhileStatement;
     function isForStatement(node) {
-        return node.kind === 237;
+        return node.kind === 241;
     }
     ts.isForStatement = isForStatement;
     function isForInStatement(node) {
-        return node.kind === 238;
+        return node.kind === 242;
     }
     ts.isForInStatement = isForInStatement;
     function isForOfStatement(node) {
-        return node.kind === 239;
+        return node.kind === 243;
     }
     ts.isForOfStatement = isForOfStatement;
     function isContinueStatement(node) {
-        return node.kind === 240;
+        return node.kind === 244;
     }
     ts.isContinueStatement = isContinueStatement;
     function isBreakStatement(node) {
-        return node.kind === 241;
+        return node.kind === 245;
     }
     ts.isBreakStatement = isBreakStatement;
     function isReturnStatement(node) {
-        return node.kind === 242;
+        return node.kind === 246;
     }
     ts.isReturnStatement = isReturnStatement;
     function isWithStatement(node) {
-        return node.kind === 243;
+        return node.kind === 247;
     }
     ts.isWithStatement = isWithStatement;
     function isSwitchStatement(node) {
-        return node.kind === 244;
+        return node.kind === 248;
     }
     ts.isSwitchStatement = isSwitchStatement;
     function isLabeledStatement(node) {
-        return node.kind === 245;
+        return node.kind === 249;
     }
     ts.isLabeledStatement = isLabeledStatement;
     function isThrowStatement(node) {
-        return node.kind === 246;
+        return node.kind === 250;
     }
     ts.isThrowStatement = isThrowStatement;
     function isTryStatement(node) {
-        return node.kind === 247;
+        return node.kind === 251;
     }
     ts.isTryStatement = isTryStatement;
     function isDebuggerStatement(node) {
-        return node.kind === 248;
+        return node.kind === 252;
     }
     ts.isDebuggerStatement = isDebuggerStatement;
     function isVariableDeclaration(node) {
-        return node.kind === 249;
+        return node.kind === 253;
     }
     ts.isVariableDeclaration = isVariableDeclaration;
     function isVariableDeclarationList(node) {
-        return node.kind === 250;
+        return node.kind === 254;
     }
     ts.isVariableDeclarationList = isVariableDeclarationList;
     function isFunctionDeclaration(node) {
-        return node.kind === 251;
+        return node.kind === 255;
     }
     ts.isFunctionDeclaration = isFunctionDeclaration;
     function isClassDeclaration(node) {
-        return node.kind === 252;
+        return node.kind === 256;
     }
     ts.isClassDeclaration = isClassDeclaration;
     function isInterfaceDeclaration(node) {
-        return node.kind === 253;
+        return node.kind === 257;
     }
     ts.isInterfaceDeclaration = isInterfaceDeclaration;
     function isTypeAliasDeclaration(node) {
-        return node.kind === 254;
+        return node.kind === 258;
     }
     ts.isTypeAliasDeclaration = isTypeAliasDeclaration;
     function isEnumDeclaration(node) {
-        return node.kind === 255;
+        return node.kind === 259;
     }
     ts.isEnumDeclaration = isEnumDeclaration;
     function isModuleDeclaration(node) {
-        return node.kind === 256;
+        return node.kind === 260;
     }
     ts.isModuleDeclaration = isModuleDeclaration;
     function isModuleBlock(node) {
-        return node.kind === 257;
+        return node.kind === 261;
     }
     ts.isModuleBlock = isModuleBlock;
     function isCaseBlock(node) {
-        return node.kind === 258;
+        return node.kind === 262;
     }
     ts.isCaseBlock = isCaseBlock;
     function isNamespaceExportDeclaration(node) {
-        return node.kind === 259;
+        return node.kind === 263;
     }
     ts.isNamespaceExportDeclaration = isNamespaceExportDeclaration;
     function isImportEqualsDeclaration(node) {
-        return node.kind === 260;
+        return node.kind === 264;
     }
     ts.isImportEqualsDeclaration = isImportEqualsDeclaration;
     function isImportDeclaration(node) {
-        return node.kind === 261;
+        return node.kind === 265;
     }
     ts.isImportDeclaration = isImportDeclaration;
     function isImportClause(node) {
-        return node.kind === 262;
+        return node.kind === 266;
     }
     ts.isImportClause = isImportClause;
+    function isAssertClause(node) {
+        return node.kind === 292;
+    }
+    ts.isAssertClause = isAssertClause;
+    function isAssertEntry(node) {
+        return node.kind === 293;
+    }
+    ts.isAssertEntry = isAssertEntry;
     function isNamespaceImport(node) {
-        return node.kind === 263;
+        return node.kind === 267;
     }
     ts.isNamespaceImport = isNamespaceImport;
     function isNamespaceExport(node) {
-        return node.kind === 269;
+        return node.kind === 273;
     }
     ts.isNamespaceExport = isNamespaceExport;
     function isNamedImports(node) {
-        return node.kind === 264;
+        return node.kind === 268;
     }
     ts.isNamedImports = isNamedImports;
     function isImportSpecifier(node) {
-        return node.kind === 265;
+        return node.kind === 269;
     }
     ts.isImportSpecifier = isImportSpecifier;
     function isExportAssignment(node) {
-        return node.kind === 266;
+        return node.kind === 270;
     }
     ts.isExportAssignment = isExportAssignment;
     function isExportDeclaration(node) {
-        return node.kind === 267;
+        return node.kind === 271;
     }
     ts.isExportDeclaration = isExportDeclaration;
     function isNamedExports(node) {
-        return node.kind === 268;
+        return node.kind === 272;
     }
     ts.isNamedExports = isNamedExports;
     function isExportSpecifier(node) {
-        return node.kind === 270;
+        return node.kind === 274;
     }
     ts.isExportSpecifier = isExportSpecifier;
     function isMissingDeclaration(node) {
-        return node.kind === 271;
+        return node.kind === 275;
     }
     ts.isMissingDeclaration = isMissingDeclaration;
     function isNotEmittedStatement(node) {
-        return node.kind === 335;
+        return node.kind === 347;
     }
     ts.isNotEmittedStatement = isNotEmittedStatement;
     function isSyntheticReference(node) {
-        return node.kind === 340;
+        return node.kind === 352;
     }
     ts.isSyntheticReference = isSyntheticReference;
     function isMergeDeclarationMarker(node) {
-        return node.kind === 338;
+        return node.kind === 350;
     }
     ts.isMergeDeclarationMarker = isMergeDeclarationMarker;
     function isEndOfDeclarationMarker(node) {
-        return node.kind === 339;
+        return node.kind === 351;
     }
     ts.isEndOfDeclarationMarker = isEndOfDeclarationMarker;
     function isExternalModuleReference(node) {
-        return node.kind === 272;
+        return node.kind === 276;
     }
     ts.isExternalModuleReference = isExternalModuleReference;
     function isJsxElement(node) {
-        return node.kind === 273;
+        return node.kind === 277;
     }
     ts.isJsxElement = isJsxElement;
     function isJsxSelfClosingElement(node) {
-        return node.kind === 274;
+        return node.kind === 278;
     }
     ts.isJsxSelfClosingElement = isJsxSelfClosingElement;
     function isJsxOpeningElement(node) {
-        return node.kind === 275;
+        return node.kind === 279;
     }
     ts.isJsxOpeningElement = isJsxOpeningElement;
     function isJsxClosingElement(node) {
-        return node.kind === 276;
+        return node.kind === 280;
     }
     ts.isJsxClosingElement = isJsxClosingElement;
     function isJsxFragment(node) {
-        return node.kind === 277;
+        return node.kind === 281;
     }
     ts.isJsxFragment = isJsxFragment;
     function isJsxOpeningFragment(node) {
-        return node.kind === 278;
+        return node.kind === 282;
     }
     ts.isJsxOpeningFragment = isJsxOpeningFragment;
     function isJsxClosingFragment(node) {
-        return node.kind === 279;
+        return node.kind === 283;
     }
     ts.isJsxClosingFragment = isJsxClosingFragment;
     function isJsxAttribute(node) {
-        return node.kind === 280;
+        return node.kind === 284;
     }
     ts.isJsxAttribute = isJsxAttribute;
     function isJsxAttributes(node) {
-        return node.kind === 281;
+        return node.kind === 285;
     }
     ts.isJsxAttributes = isJsxAttributes;
     function isJsxSpreadAttribute(node) {
-        return node.kind === 282;
+        return node.kind === 286;
     }
     ts.isJsxSpreadAttribute = isJsxSpreadAttribute;
     function isJsxExpression(node) {
-        return node.kind === 283;
+        return node.kind === 287;
     }
     ts.isJsxExpression = isJsxExpression;
     function isCaseClause(node) {
-        return node.kind === 284;
+        return node.kind === 288;
     }
     ts.isCaseClause = isCaseClause;
     function isDefaultClause(node) {
-        return node.kind === 285;
+        return node.kind === 289;
     }
     ts.isDefaultClause = isDefaultClause;
     function isHeritageClause(node) {
-        return node.kind === 286;
+        return node.kind === 290;
     }
     ts.isHeritageClause = isHeritageClause;
     function isCatchClause(node) {
-        return node.kind === 287;
+        return node.kind === 291;
     }
     ts.isCatchClause = isCatchClause;
     function isPropertyAssignment(node) {
-        return node.kind === 288;
+        return node.kind === 294;
     }
     ts.isPropertyAssignment = isPropertyAssignment;
     function isShorthandPropertyAssignment(node) {
-        return node.kind === 289;
+        return node.kind === 295;
     }
     ts.isShorthandPropertyAssignment = isShorthandPropertyAssignment;
     function isSpreadAssignment(node) {
-        return node.kind === 290;
+        return node.kind === 296;
     }
     ts.isSpreadAssignment = isSpreadAssignment;
     function isEnumMember(node) {
-        return node.kind === 291;
+        return node.kind === 297;
     }
     ts.isEnumMember = isEnumMember;
     function isUnparsedPrepend(node) {
-        return node.kind === 293;
+        return node.kind === 299;
     }
     ts.isUnparsedPrepend = isUnparsedPrepend;
     function isSourceFile(node) {
-        return node.kind === 297;
+        return node.kind === 303;
     }
     ts.isSourceFile = isSourceFile;
     function isBundle(node) {
-        return node.kind === 298;
+        return node.kind === 304;
     }
     ts.isBundle = isBundle;
     function isUnparsedSource(node) {
-        return node.kind === 299;
+        return node.kind === 305;
     }
     ts.isUnparsedSource = isUnparsedSource;
     function isJSDocTypeExpression(node) {
-        return node.kind === 301;
+        return node.kind === 307;
     }
     ts.isJSDocTypeExpression = isJSDocTypeExpression;
     function isJSDocNameReference(node) {
-        return node.kind === 302;
+        return node.kind === 308;
     }
     ts.isJSDocNameReference = isJSDocNameReference;
+    function isJSDocMemberName(node) {
+        return node.kind === 309;
+    }
+    ts.isJSDocMemberName = isJSDocMemberName;
+    function isJSDocLink(node) {
+        return node.kind === 322;
+    }
+    ts.isJSDocLink = isJSDocLink;
+    function isJSDocLinkCode(node) {
+        return node.kind === 323;
+    }
+    ts.isJSDocLinkCode = isJSDocLinkCode;
+    function isJSDocLinkPlain(node) {
+        return node.kind === 324;
+    }
+    ts.isJSDocLinkPlain = isJSDocLinkPlain;
     function isJSDocAllType(node) {
-        return node.kind === 303;
+        return node.kind === 310;
     }
     ts.isJSDocAllType = isJSDocAllType;
     function isJSDocUnknownType(node) {
-        return node.kind === 304;
+        return node.kind === 311;
     }
     ts.isJSDocUnknownType = isJSDocUnknownType;
     function isJSDocNullableType(node) {
-        return node.kind === 305;
+        return node.kind === 312;
     }
     ts.isJSDocNullableType = isJSDocNullableType;
     function isJSDocNonNullableType(node) {
-        return node.kind === 306;
+        return node.kind === 313;
     }
     ts.isJSDocNonNullableType = isJSDocNonNullableType;
     function isJSDocOptionalType(node) {
-        return node.kind === 307;
+        return node.kind === 314;
     }
     ts.isJSDocOptionalType = isJSDocOptionalType;
     function isJSDocFunctionType(node) {
-        return node.kind === 308;
+        return node.kind === 315;
     }
     ts.isJSDocFunctionType = isJSDocFunctionType;
     function isJSDocVariadicType(node) {
-        return node.kind === 309;
+        return node.kind === 316;
     }
     ts.isJSDocVariadicType = isJSDocVariadicType;
     function isJSDocNamepathType(node) {
-        return node.kind === 310;
+        return node.kind === 317;
     }
     ts.isJSDocNamepathType = isJSDocNamepathType;
     function isJSDoc(node) {
-        return node.kind === 311;
+        return node.kind === 318;
     }
     ts.isJSDoc = isJSDoc;
     function isJSDocTypeLiteral(node) {
-        return node.kind === 312;
+        return node.kind === 320;
     }
     ts.isJSDocTypeLiteral = isJSDocTypeLiteral;
     function isJSDocSignature(node) {
-        return node.kind === 313;
+        return node.kind === 321;
     }
     ts.isJSDocSignature = isJSDocSignature;
     function isJSDocAugmentsTag(node) {
-        return node.kind === 315;
+        return node.kind === 326;
     }
     ts.isJSDocAugmentsTag = isJSDocAugmentsTag;
     function isJSDocAuthorTag(node) {
-        return node.kind === 317;
+        return node.kind === 328;
     }
     ts.isJSDocAuthorTag = isJSDocAuthorTag;
     function isJSDocClassTag(node) {
-        return node.kind === 319;
+        return node.kind === 330;
     }
     ts.isJSDocClassTag = isJSDocClassTag;
     function isJSDocCallbackTag(node) {
-        return node.kind === 324;
+        return node.kind === 336;
     }
     ts.isJSDocCallbackTag = isJSDocCallbackTag;
     function isJSDocPublicTag(node) {
-        return node.kind === 320;
+        return node.kind === 331;
     }
     ts.isJSDocPublicTag = isJSDocPublicTag;
     function isJSDocPrivateTag(node) {
-        return node.kind === 321;
+        return node.kind === 332;
     }
     ts.isJSDocPrivateTag = isJSDocPrivateTag;
     function isJSDocProtectedTag(node) {
-        return node.kind === 322;
+        return node.kind === 333;
     }
     ts.isJSDocProtectedTag = isJSDocProtectedTag;
     function isJSDocReadonlyTag(node) {
-        return node.kind === 323;
+        return node.kind === 334;
     }
     ts.isJSDocReadonlyTag = isJSDocReadonlyTag;
+    function isJSDocOverrideTag(node) {
+        return node.kind === 335;
+    }
+    ts.isJSDocOverrideTag = isJSDocOverrideTag;
     function isJSDocDeprecatedTag(node) {
-        return node.kind === 318;
+        return node.kind === 329;
     }
     ts.isJSDocDeprecatedTag = isJSDocDeprecatedTag;
     function isJSDocSeeTag(node) {
-        return node.kind === 332;
+        return node.kind === 344;
     }
     ts.isJSDocSeeTag = isJSDocSeeTag;
     function isJSDocEnumTag(node) {
-        return node.kind === 325;
+        return node.kind === 337;
     }
     ts.isJSDocEnumTag = isJSDocEnumTag;
     function isJSDocParameterTag(node) {
-        return node.kind === 326;
+        return node.kind === 338;
     }
     ts.isJSDocParameterTag = isJSDocParameterTag;
     function isJSDocReturnTag(node) {
-        return node.kind === 327;
+        return node.kind === 339;
     }
     ts.isJSDocReturnTag = isJSDocReturnTag;
     function isJSDocThisTag(node) {
-        return node.kind === 328;
+        return node.kind === 340;
     }
     ts.isJSDocThisTag = isJSDocThisTag;
     function isJSDocTypeTag(node) {
-        return node.kind === 329;
+        return node.kind === 341;
     }
     ts.isJSDocTypeTag = isJSDocTypeTag;
     function isJSDocTemplateTag(node) {
-        return node.kind === 330;
+        return node.kind === 342;
     }
     ts.isJSDocTemplateTag = isJSDocTemplateTag;
     function isJSDocTypedefTag(node) {
-        return node.kind === 331;
+        return node.kind === 343;
     }
     ts.isJSDocTypedefTag = isJSDocTypedefTag;
     function isJSDocUnknownTag(node) {
-        return node.kind === 314;
+        return node.kind === 325;
     }
     ts.isJSDocUnknownTag = isJSDocUnknownTag;
     function isJSDocPropertyTag(node) {
-        return node.kind === 333;
+        return node.kind === 345;
     }
     ts.isJSDocPropertyTag = isJSDocPropertyTag;
     function isJSDocImplementsTag(node) {
-        return node.kind === 316;
+        return node.kind === 327;
     }
     ts.isJSDocImplementsTag = isJSDocImplementsTag;
     function isSyntaxList(n) {
-        return n.kind === 334;
+        return n.kind === 346;
     }
     ts.isSyntaxList = isSyntaxList;
 })(ts || (ts = {}));
@@ -21989,7 +23051,7 @@ var ts;
             return ts.setTextRange(factory.createElementAccessExpression(target, memberName.expression), location);
         }
         else {
-            var expression = ts.setTextRange(ts.isIdentifierOrPrivateIdentifier(memberName)
+            var expression = ts.setTextRange(ts.isMemberName(memberName)
                 ? factory.createPropertyAccessExpression(target, memberName)
                 : factory.createElementAccessExpression(target, memberName), memberName);
             ts.getOrCreateEmitNode(expression).flags |= 64;
@@ -22079,7 +23141,7 @@ var ts;
     ts.createForOfBindingStatement = createForOfBindingStatement;
     function insertLeadingStatement(factory, dest, source) {
         if (ts.isBlock(dest)) {
-            return factory.updateBlock(dest, ts.setTextRange(factory.createNodeArray(__spreadArray([source], dest.statements)), dest.statements));
+            return factory.updateBlock(dest, ts.setTextRange(factory.createNodeArray(__spreadArray([source], dest.statements, true)), dest.statements));
         }
         else {
             return factory.createBlock(factory.createNodeArray([dest, source]), true);
@@ -22135,18 +23197,41 @@ var ts;
             ts.Debug.failBadSyntaxKind(property.name, "Private identifiers are not allowed in object literals.");
         }
         switch (property.kind) {
-            case 167:
-            case 168:
+            case 171:
+            case 172:
                 return createExpressionForAccessorDeclaration(factory, node.properties, property, receiver, !!node.multiLine);
-            case 288:
+            case 294:
                 return createExpressionForPropertyAssignment(factory, property, receiver);
-            case 289:
+            case 295:
                 return createExpressionForShorthandPropertyAssignment(factory, property, receiver);
-            case 165:
+            case 168:
                 return createExpressionForMethodDeclaration(factory, property, receiver);
         }
     }
     ts.createExpressionForObjectLiteralElementLike = createExpressionForObjectLiteralElementLike;
+    function expandPreOrPostfixIncrementOrDecrementExpression(factory, node, expression, recordTempVariable, resultVariable) {
+        var operator = node.operator;
+        ts.Debug.assert(operator === 45 || operator === 46, "Expected 'node' to be a pre- or post-increment or pre- or post-decrement expression");
+        var temp = factory.createTempVariable(recordTempVariable);
+        expression = factory.createAssignment(temp, expression);
+        ts.setTextRange(expression, node.operand);
+        var operation = ts.isPrefixUnaryExpression(node) ?
+            factory.createPrefixUnaryExpression(operator, temp) :
+            factory.createPostfixUnaryExpression(temp, operator);
+        ts.setTextRange(operation, node);
+        if (resultVariable) {
+            operation = factory.createAssignment(resultVariable, operation);
+            ts.setTextRange(operation, node);
+        }
+        expression = factory.createComma(expression, operation);
+        ts.setTextRange(expression, node);
+        if (ts.isPostfixUnaryExpression(node)) {
+            expression = factory.createComma(expression, temp);
+            ts.setTextRange(expression, node);
+        }
+        return expression;
+    }
+    ts.expandPreOrPostfixIncrementOrDecrementExpression = expandPreOrPostfixIncrementOrDecrementExpression;
     function isInternalName(node) {
         return (ts.getEmitFlags(node) & 32768) !== 0;
     }
@@ -22185,21 +23270,36 @@ var ts;
     }
     ts.startsWithUseStrict = startsWithUseStrict;
     function isCommaSequence(node) {
-        return node.kind === 216 && node.operatorToken.kind === 27 ||
-            node.kind === 337;
+        return node.kind === 220 && node.operatorToken.kind === 27 ||
+            node.kind === 349;
     }
     ts.isCommaSequence = isCommaSequence;
+    function isJSDocTypeAssertion(node) {
+        return ts.isParenthesizedExpression(node)
+            && ts.isInJSFile(node)
+            && !!ts.getJSDocTypeTag(node);
+    }
+    ts.isJSDocTypeAssertion = isJSDocTypeAssertion;
+    function getJSDocTypeAssertionType(node) {
+        var type = ts.getJSDocType(node);
+        ts.Debug.assertIsDefined(type);
+        return type;
+    }
+    ts.getJSDocTypeAssertionType = getJSDocTypeAssertionType;
     function isOuterExpression(node, kinds) {
         if (kinds === void 0) { kinds = 15; }
         switch (node.kind) {
-            case 207:
+            case 211:
+                if (kinds & 16 && isJSDocTypeAssertion(node)) {
+                    return false;
+                }
                 return (kinds & 1) !== 0;
-            case 206:
-            case 224:
+            case 210:
+            case 228:
                 return (kinds & 2) !== 0;
-            case 225:
+            case 229:
                 return (kinds & 4) !== 0;
-            case 336:
+            case 348:
                 return (kinds & 8) !== 0;
         }
         return false;
@@ -22237,7 +23337,7 @@ var ts;
         if (compilerOptions.importHelpers && ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
             var namedBindings = void 0;
             var moduleKind = ts.getEmitModuleKind(compilerOptions);
-            if (moduleKind >= ts.ModuleKind.ES2015 && moduleKind <= ts.ModuleKind.ESNext) {
+            if ((moduleKind >= ts.ModuleKind.ES2015 && moduleKind <= ts.ModuleKind.ESNext) || sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
                 var helpers = ts.getEmitHelpers(sourceFile);
                 if (helpers) {
                     var helperNames = [];
@@ -22253,8 +23353,8 @@ var ts;
                     if (ts.some(helperNames)) {
                         helperNames.sort(ts.compareStringsCaseSensitive);
                         namedBindings = nodeFactory.createNamedImports(ts.map(helperNames, function (name) { return ts.isFileLevelUniqueName(sourceFile, name)
-                            ? nodeFactory.createImportSpecifier(undefined, nodeFactory.createIdentifier(name))
-                            : nodeFactory.createImportSpecifier(nodeFactory.createIdentifier(name), helperFactory.getUnscopedHelperName(name)); }));
+                            ? nodeFactory.createImportSpecifier(false, undefined, nodeFactory.createIdentifier(name))
+                            : nodeFactory.createImportSpecifier(false, nodeFactory.createIdentifier(name), helperFactory.getUnscopedHelperName(name)); }));
                         var parseNode = ts.getOriginalNode(sourceFile, ts.isSourceFile);
                         var emitNode = ts.getOrCreateEmitNode(parseNode);
                         emitNode.externalHelpers = true;
@@ -22268,7 +23368,7 @@ var ts;
                 }
             }
             if (namedBindings) {
-                var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(undefined, undefined, nodeFactory.createImportClause(false, undefined, namedBindings), nodeFactory.createStringLiteral(ts.externalHelpersModuleNameText));
+                var externalHelpersImportDeclaration = nodeFactory.createImportDeclaration(undefined, undefined, nodeFactory.createImportClause(false, undefined, namedBindings), nodeFactory.createStringLiteral(ts.externalHelpersModuleNameText), undefined);
                 ts.addEmitFlags(externalHelpersImportDeclaration, 67108864);
                 return externalHelpersImportDeclaration;
             }
@@ -22282,9 +23382,9 @@ var ts;
                 return externalHelpersModuleName;
             }
             var moduleKind = ts.getEmitModuleKind(compilerOptions);
-            var create = (hasExportStarsToExportValues || (compilerOptions.esModuleInterop && hasImportStarOrImportDefault))
+            var create = (hasExportStarsToExportValues || (ts.getESModuleInterop(compilerOptions) && hasImportStarOrImportDefault))
                 && moduleKind !== ts.ModuleKind.System
-                && moduleKind < ts.ModuleKind.ES2015;
+                && (moduleKind < ts.ModuleKind.ES2015 || node.impliedNodeFormat === ts.ModuleKind.CommonJS);
             if (!create) {
                 var helpers = ts.getEmitHelpers(node);
                 if (helpers) {
@@ -22311,10 +23411,10 @@ var ts;
             var name = namespaceDeclaration.name;
             return ts.isGeneratedIdentifier(name) ? name : factory.createIdentifier(ts.getSourceTextOfNodeFromSourceFile(sourceFile, name) || ts.idText(name));
         }
-        if (node.kind === 261 && node.importClause) {
+        if (node.kind === 265 && node.importClause) {
             return factory.getGeneratedNameForNode(node);
         }
-        if (node.kind === 267 && node.moduleSpecifier) {
+        if (node.kind === 271 && node.moduleSpecifier) {
             return factory.getGeneratedNameForNode(node);
         }
         return undefined;
@@ -22377,11 +23477,11 @@ var ts;
         }
         if (ts.isObjectLiteralElementLike(bindingElement)) {
             switch (bindingElement.kind) {
-                case 288:
+                case 294:
                     return getTargetOfBindingOrAssignmentElement(bindingElement.initializer);
-                case 289:
+                case 295:
                     return bindingElement.name;
-                case 290:
+                case 296:
                     return getTargetOfBindingOrAssignmentElement(bindingElement.expression);
             }
             return undefined;
@@ -22397,11 +23497,11 @@ var ts;
     ts.getTargetOfBindingOrAssignmentElement = getTargetOfBindingOrAssignmentElement;
     function getRestIndicatorOfBindingOrAssignmentElement(bindingElement) {
         switch (bindingElement.kind) {
-            case 160:
-            case 198:
+            case 163:
+            case 202:
                 return bindingElement.dotDotDotToken;
-            case 220:
-            case 290:
+            case 224:
+            case 296:
                 return bindingElement;
         }
         return undefined;
@@ -22415,7 +23515,7 @@ var ts;
     ts.getPropertyNameOfBindingOrAssignmentElement = getPropertyNameOfBindingOrAssignmentElement;
     function tryGetPropertyNameOfBindingOrAssignmentElement(bindingElement) {
         switch (bindingElement.kind) {
-            case 198:
+            case 202:
                 if (bindingElement.propertyName) {
                     var propertyName = bindingElement.propertyName;
                     if (ts.isPrivateIdentifier(propertyName)) {
@@ -22426,7 +23526,7 @@ var ts;
                         : propertyName;
                 }
                 break;
-            case 288:
+            case 294:
                 if (bindingElement.name) {
                     var propertyName = bindingElement.name;
                     if (ts.isPrivateIdentifier(propertyName)) {
@@ -22437,7 +23537,7 @@ var ts;
                         : propertyName;
                 }
                 break;
-            case 290:
+            case 296:
                 if (bindingElement.name && ts.isPrivateIdentifier(bindingElement.name)) {
                     return ts.Debug.failBadSyntaxKind(bindingElement.name);
                 }
@@ -22456,11 +23556,11 @@ var ts;
     }
     function getElementsOfBindingOrAssignmentPattern(name) {
         switch (name.kind) {
-            case 196:
-            case 197:
-            case 199:
-                return name.elements;
             case 200:
+            case 201:
+            case 203:
+                return name.elements;
+            case 204:
                 return name.properties;
         }
     }
@@ -22479,43 +23579,253 @@ var ts;
     ts.getJSDocTypeAliasName = getJSDocTypeAliasName;
     function canHaveModifiers(node) {
         var kind = node.kind;
-        return kind === 160
-            || kind === 162
-            || kind === 163
-            || kind === 164
+        return kind === 163
             || kind === 165
             || kind === 166
             || kind === 167
             || kind === 168
+            || kind === 170
             || kind === 171
-            || kind === 208
-            || kind === 209
-            || kind === 221
-            || kind === 232
-            || kind === 251
-            || kind === 252
-            || kind === 253
-            || kind === 254
+            || kind === 172
+            || kind === 175
+            || kind === 212
+            || kind === 213
+            || kind === 225
+            || kind === 236
             || kind === 255
             || kind === 256
+            || kind === 257
+            || kind === 258
+            || kind === 259
             || kind === 260
-            || kind === 261
-            || kind === 266
-            || kind === 267;
+            || kind === 264
+            || kind === 265
+            || kind === 270
+            || kind === 271;
     }
     ts.canHaveModifiers = canHaveModifiers;
-    function isExportModifier(node) {
-        return node.kind === 92;
-    }
-    ts.isExportModifier = isExportModifier;
-    function isAsyncModifier(node) {
-        return node.kind === 129;
-    }
-    ts.isAsyncModifier = isAsyncModifier;
-    function isStaticModifier(node) {
-        return node.kind === 123;
+    ts.isTypeNodeOrTypeParameterDeclaration = ts.or(ts.isTypeNode, ts.isTypeParameterDeclaration);
+    ts.isQuestionOrExclamationToken = ts.or(ts.isQuestionToken, ts.isExclamationToken);
+    ts.isIdentifierOrThisTypeNode = ts.or(ts.isIdentifier, ts.isThisTypeNode);
+    ts.isReadonlyKeywordOrPlusOrMinusToken = ts.or(ts.isReadonlyKeyword, ts.isPlusToken, ts.isMinusToken);
+    ts.isQuestionOrPlusOrMinusToken = ts.or(ts.isQuestionToken, ts.isPlusToken, ts.isMinusToken);
+    ts.isModuleName = ts.or(ts.isIdentifier, ts.isStringLiteral);
+    function isLiteralTypeLikeExpression(node) {
+        var kind = node.kind;
+        return kind === 104
+            || kind === 110
+            || kind === 95
+            || ts.isLiteralExpression(node)
+            || ts.isPrefixUnaryExpression(node);
+    }
+    ts.isLiteralTypeLikeExpression = isLiteralTypeLikeExpression;
+    function isExponentiationOperator(kind) {
+        return kind === 42;
+    }
+    function isMultiplicativeOperator(kind) {
+        return kind === 41
+            || kind === 43
+            || kind === 44;
+    }
+    function isMultiplicativeOperatorOrHigher(kind) {
+        return isExponentiationOperator(kind)
+            || isMultiplicativeOperator(kind);
+    }
+    function isAdditiveOperator(kind) {
+        return kind === 39
+            || kind === 40;
+    }
+    function isAdditiveOperatorOrHigher(kind) {
+        return isAdditiveOperator(kind)
+            || isMultiplicativeOperatorOrHigher(kind);
+    }
+    function isShiftOperator(kind) {
+        return kind === 47
+            || kind === 48
+            || kind === 49;
+    }
+    function isShiftOperatorOrHigher(kind) {
+        return isShiftOperator(kind)
+            || isAdditiveOperatorOrHigher(kind);
+    }
+    function isRelationalOperator(kind) {
+        return kind === 29
+            || kind === 32
+            || kind === 31
+            || kind === 33
+            || kind === 102
+            || kind === 101;
+    }
+    function isRelationalOperatorOrHigher(kind) {
+        return isRelationalOperator(kind)
+            || isShiftOperatorOrHigher(kind);
+    }
+    function isEqualityOperator(kind) {
+        return kind === 34
+            || kind === 36
+            || kind === 35
+            || kind === 37;
+    }
+    function isEqualityOperatorOrHigher(kind) {
+        return isEqualityOperator(kind)
+            || isRelationalOperatorOrHigher(kind);
+    }
+    function isBitwiseOperator(kind) {
+        return kind === 50
+            || kind === 51
+            || kind === 52;
+    }
+    function isBitwiseOperatorOrHigher(kind) {
+        return isBitwiseOperator(kind)
+            || isEqualityOperatorOrHigher(kind);
+    }
+    function isLogicalOperator(kind) {
+        return kind === 55
+            || kind === 56;
+    }
+    function isLogicalOperatorOrHigher(kind) {
+        return isLogicalOperator(kind)
+            || isBitwiseOperatorOrHigher(kind);
+    }
+    function isAssignmentOperatorOrHigher(kind) {
+        return kind === 60
+            || isLogicalOperatorOrHigher(kind)
+            || ts.isAssignmentOperator(kind);
+    }
+    function isBinaryOperator(kind) {
+        return isAssignmentOperatorOrHigher(kind)
+            || kind === 27;
+    }
+    function isBinaryOperatorToken(node) {
+        return isBinaryOperator(node.kind);
+    }
+    ts.isBinaryOperatorToken = isBinaryOperatorToken;
+    var BinaryExpressionState;
+    (function (BinaryExpressionState) {
+        function enter(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, outerState) {
+            var prevUserState = stackIndex > 0 ? userStateStack[stackIndex - 1] : undefined;
+            ts.Debug.assertEqual(stateStack[stackIndex], enter);
+            userStateStack[stackIndex] = machine.onEnter(nodeStack[stackIndex], prevUserState, outerState);
+            stateStack[stackIndex] = nextState(machine, enter);
+            return stackIndex;
+        }
+        BinaryExpressionState.enter = enter;
+        function left(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) {
+            ts.Debug.assertEqual(stateStack[stackIndex], left);
+            ts.Debug.assertIsDefined(machine.onLeft);
+            stateStack[stackIndex] = nextState(machine, left);
+            var nextNode = machine.onLeft(nodeStack[stackIndex].left, userStateStack[stackIndex], nodeStack[stackIndex]);
+            if (nextNode) {
+                checkCircularity(stackIndex, nodeStack, nextNode);
+                return pushStack(stackIndex, stateStack, nodeStack, userStateStack, nextNode);
+            }
+            return stackIndex;
+        }
+        BinaryExpressionState.left = left;
+        function operator(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) {
+            ts.Debug.assertEqual(stateStack[stackIndex], operator);
+            ts.Debug.assertIsDefined(machine.onOperator);
+            stateStack[stackIndex] = nextState(machine, operator);
+            machine.onOperator(nodeStack[stackIndex].operatorToken, userStateStack[stackIndex], nodeStack[stackIndex]);
+            return stackIndex;
+        }
+        BinaryExpressionState.operator = operator;
+        function right(machine, stackIndex, stateStack, nodeStack, userStateStack, _resultHolder, _outerState) {
+            ts.Debug.assertEqual(stateStack[stackIndex], right);
+            ts.Debug.assertIsDefined(machine.onRight);
+            stateStack[stackIndex] = nextState(machine, right);
+            var nextNode = machine.onRight(nodeStack[stackIndex].right, userStateStack[stackIndex], nodeStack[stackIndex]);
+            if (nextNode) {
+                checkCircularity(stackIndex, nodeStack, nextNode);
+                return pushStack(stackIndex, stateStack, nodeStack, userStateStack, nextNode);
+            }
+            return stackIndex;
+        }
+        BinaryExpressionState.right = right;
+        function exit(machine, stackIndex, stateStack, nodeStack, userStateStack, resultHolder, _outerState) {
+            ts.Debug.assertEqual(stateStack[stackIndex], exit);
+            stateStack[stackIndex] = nextState(machine, exit);
+            var result = machine.onExit(nodeStack[stackIndex], userStateStack[stackIndex]);
+            if (stackIndex > 0) {
+                stackIndex--;
+                if (machine.foldState) {
+                    var side = stateStack[stackIndex] === exit ? "right" : "left";
+                    userStateStack[stackIndex] = machine.foldState(userStateStack[stackIndex], result, side);
+                }
+            }
+            else {
+                resultHolder.value = result;
+            }
+            return stackIndex;
+        }
+        BinaryExpressionState.exit = exit;
+        function done(_machine, stackIndex, stateStack, _nodeStack, _userStateStack, _resultHolder, _outerState) {
+            ts.Debug.assertEqual(stateStack[stackIndex], done);
+            return stackIndex;
+        }
+        BinaryExpressionState.done = done;
+        function nextState(machine, currentState) {
+            switch (currentState) {
+                case enter:
+                    if (machine.onLeft)
+                        return left;
+                case left:
+                    if (machine.onOperator)
+                        return operator;
+                case operator:
+                    if (machine.onRight)
+                        return right;
+                case right: return exit;
+                case exit: return done;
+                case done: return done;
+                default: ts.Debug.fail("Invalid state");
+            }
+        }
+        BinaryExpressionState.nextState = nextState;
+        function pushStack(stackIndex, stateStack, nodeStack, userStateStack, node) {
+            stackIndex++;
+            stateStack[stackIndex] = enter;
+            nodeStack[stackIndex] = node;
+            userStateStack[stackIndex] = undefined;
+            return stackIndex;
+        }
+        function checkCircularity(stackIndex, nodeStack, node) {
+            if (ts.Debug.shouldAssert(2)) {
+                while (stackIndex >= 0) {
+                    ts.Debug.assert(nodeStack[stackIndex] !== node, "Circular traversal detected.");
+                    stackIndex--;
+                }
+            }
+        }
+    })(BinaryExpressionState || (BinaryExpressionState = {}));
+    var BinaryExpressionStateMachine = (function () {
+        function BinaryExpressionStateMachine(onEnter, onLeft, onOperator, onRight, onExit, foldState) {
+            this.onEnter = onEnter;
+            this.onLeft = onLeft;
+            this.onOperator = onOperator;
+            this.onRight = onRight;
+            this.onExit = onExit;
+            this.foldState = foldState;
+        }
+        return BinaryExpressionStateMachine;
+    }());
+    function createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, foldState) {
+        var machine = new BinaryExpressionStateMachine(onEnter, onLeft, onOperator, onRight, onExit, foldState);
+        return trampoline;
+        function trampoline(node, outerState) {
+            var resultHolder = { value: undefined };
+            var stateStack = [BinaryExpressionState.enter];
+            var nodeStack = [node];
+            var userStateStack = [undefined];
+            var stackIndex = 0;
+            while (stateStack[stackIndex] !== BinaryExpressionState.done) {
+                stackIndex = stateStack[stackIndex](machine, stackIndex, stateStack, nodeStack, userStateStack, resultHolder, outerState);
+            }
+            ts.Debug.assertEqual(stackIndex, 0);
+            return resultHolder.value;
+        }
     }
-    ts.isStaticModifier = isStaticModifier;
+    ts.createBinaryExpressionTrampoline = createBinaryExpressionTrampoline;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -22563,19 +23873,19 @@ var ts;
     }
     ts.isJSDocLikeText = isJSDocLikeText;
     function forEachChild(node, cbNode, cbNodes) {
-        if (!node || node.kind <= 156) {
+        if (!node || node.kind <= 159) {
             return;
         }
         switch (node.kind) {
-            case 157:
+            case 160:
                 return visitNode(cbNode, node.left) ||
                     visitNode(cbNode, node.right);
-            case 159:
+            case 162:
                 return visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.constraint) ||
                     visitNode(cbNode, node.default) ||
                     visitNode(cbNode, node.expression);
-            case 289:
+            case 295:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
@@ -22583,9 +23893,9 @@ var ts;
                     visitNode(cbNode, node.exclamationToken) ||
                     visitNode(cbNode, node.equalsToken) ||
                     visitNode(cbNode, node.objectAssignmentInitializer);
-            case 290:
+            case 296:
                 return visitNode(cbNode, node.expression);
-            case 160:
+            case 163:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.dotDotDotToken) ||
@@ -22593,7 +23903,7 @@ var ts;
                     visitNode(cbNode, node.questionToken) ||
                     visitNode(cbNode, node.type) ||
                     visitNode(cbNode, node.initializer);
-            case 163:
+            case 166:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
@@ -22601,51 +23911,51 @@ var ts;
                     visitNode(cbNode, node.exclamationToken) ||
                     visitNode(cbNode, node.type) ||
                     visitNode(cbNode, node.initializer);
-            case 162:
+            case 165:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.questionToken) ||
                     visitNode(cbNode, node.type) ||
                     visitNode(cbNode, node.initializer);
-            case 288:
+            case 294:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.questionToken) ||
                     visitNode(cbNode, node.initializer);
-            case 249:
+            case 253:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.exclamationToken) ||
                     visitNode(cbNode, node.type) ||
                     visitNode(cbNode, node.initializer);
-            case 198:
+            case 202:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.dotDotDotToken) ||
                     visitNode(cbNode, node.propertyName) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.initializer);
+            case 178:
+            case 179:
+            case 173:
             case 174:
             case 175:
-            case 169:
-            case 170:
-            case 171:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNodes(cbNode, cbNodes, node.typeParameters) ||
                     visitNodes(cbNode, cbNodes, node.parameters) ||
                     visitNode(cbNode, node.type);
-            case 165:
-            case 164:
-            case 166:
-            case 167:
             case 168:
-            case 208:
-            case 251:
-            case 209:
+            case 167:
+            case 170:
+            case 171:
+            case 172:
+            case 212:
+            case 255:
+            case 213:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.asteriskToken) ||
@@ -22657,374 +23967,407 @@ var ts;
                     visitNode(cbNode, node.type) ||
                     visitNode(cbNode, node.equalsGreaterThanToken) ||
                     visitNode(cbNode, node.body);
-            case 173:
+            case 169:
+                return visitNodes(cbNode, cbNodes, node.decorators) ||
+                    visitNodes(cbNode, cbNodes, node.modifiers) ||
+                    visitNode(cbNode, node.body);
+            case 177:
                 return visitNode(cbNode, node.typeName) ||
                     visitNodes(cbNode, cbNodes, node.typeArguments);
-            case 172:
+            case 176:
                 return visitNode(cbNode, node.assertsModifier) ||
                     visitNode(cbNode, node.parameterName) ||
                     visitNode(cbNode, node.type);
-            case 176:
+            case 180:
                 return visitNode(cbNode, node.exprName);
-            case 177:
+            case 181:
                 return visitNodes(cbNode, cbNodes, node.members);
-            case 178:
-                return visitNode(cbNode, node.elementType);
-            case 179:
-                return visitNodes(cbNode, cbNodes, node.elements);
             case 182:
+                return visitNode(cbNode, node.elementType);
             case 183:
+                return visitNodes(cbNode, cbNodes, node.elements);
+            case 186:
+            case 187:
                 return visitNodes(cbNode, cbNodes, node.types);
-            case 184:
+            case 188:
                 return visitNode(cbNode, node.checkType) ||
                     visitNode(cbNode, node.extendsType) ||
                     visitNode(cbNode, node.trueType) ||
                     visitNode(cbNode, node.falseType);
-            case 185:
+            case 189:
                 return visitNode(cbNode, node.typeParameter);
-            case 195:
+            case 199:
                 return visitNode(cbNode, node.argument) ||
                     visitNode(cbNode, node.qualifier) ||
                     visitNodes(cbNode, cbNodes, node.typeArguments);
-            case 186:
-            case 188:
+            case 190:
+            case 192:
                 return visitNode(cbNode, node.type);
-            case 189:
+            case 193:
                 return visitNode(cbNode, node.objectType) ||
                     visitNode(cbNode, node.indexType);
-            case 190:
+            case 194:
                 return visitNode(cbNode, node.readonlyToken) ||
                     visitNode(cbNode, node.typeParameter) ||
                     visitNode(cbNode, node.nameType) ||
                     visitNode(cbNode, node.questionToken) ||
-                    visitNode(cbNode, node.type);
-            case 191:
+                    visitNode(cbNode, node.type) ||
+                    visitNodes(cbNode, cbNodes, node.members);
+            case 195:
                 return visitNode(cbNode, node.literal);
-            case 192:
+            case 196:
                 return visitNode(cbNode, node.dotDotDotToken) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.questionToken) ||
                     visitNode(cbNode, node.type);
-            case 196:
-            case 197:
+            case 200:
+            case 201:
                 return visitNodes(cbNode, cbNodes, node.elements);
-            case 199:
+            case 203:
                 return visitNodes(cbNode, cbNodes, node.elements);
-            case 200:
+            case 204:
                 return visitNodes(cbNode, cbNodes, node.properties);
-            case 201:
+            case 205:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.questionDotToken) ||
                     visitNode(cbNode, node.name);
-            case 202:
+            case 206:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.questionDotToken) ||
                     visitNode(cbNode, node.argumentExpression);
-            case 203:
-            case 204:
+            case 207:
+            case 208:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.questionDotToken) ||
                     visitNodes(cbNode, cbNodes, node.typeArguments) ||
                     visitNodes(cbNode, cbNodes, node.arguments);
-            case 205:
+            case 209:
                 return visitNode(cbNode, node.tag) ||
                     visitNode(cbNode, node.questionDotToken) ||
                     visitNodes(cbNode, cbNodes, node.typeArguments) ||
                     visitNode(cbNode, node.template);
-            case 206:
+            case 210:
                 return visitNode(cbNode, node.type) ||
                     visitNode(cbNode, node.expression);
-            case 207:
+            case 211:
                 return visitNode(cbNode, node.expression);
-            case 210:
+            case 214:
                 return visitNode(cbNode, node.expression);
-            case 211:
+            case 215:
                 return visitNode(cbNode, node.expression);
-            case 212:
+            case 216:
                 return visitNode(cbNode, node.expression);
-            case 214:
+            case 218:
                 return visitNode(cbNode, node.operand);
-            case 219:
+            case 223:
                 return visitNode(cbNode, node.asteriskToken) ||
                     visitNode(cbNode, node.expression);
-            case 213:
+            case 217:
                 return visitNode(cbNode, node.expression);
-            case 215:
+            case 219:
                 return visitNode(cbNode, node.operand);
-            case 216:
+            case 220:
                 return visitNode(cbNode, node.left) ||
                     visitNode(cbNode, node.operatorToken) ||
                     visitNode(cbNode, node.right);
-            case 224:
+            case 228:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.type);
-            case 225:
+            case 229:
                 return visitNode(cbNode, node.expression);
-            case 226:
+            case 230:
                 return visitNode(cbNode, node.name);
-            case 217:
+            case 221:
                 return visitNode(cbNode, node.condition) ||
                     visitNode(cbNode, node.questionToken) ||
                     visitNode(cbNode, node.whenTrue) ||
                     visitNode(cbNode, node.colonToken) ||
                     visitNode(cbNode, node.whenFalse);
-            case 220:
+            case 224:
                 return visitNode(cbNode, node.expression);
-            case 230:
-            case 257:
+            case 234:
+            case 261:
                 return visitNodes(cbNode, cbNodes, node.statements);
-            case 297:
+            case 303:
                 return visitNodes(cbNode, cbNodes, node.statements) ||
                     visitNode(cbNode, node.endOfFileToken);
-            case 232:
+            case 236:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.declarationList);
-            case 250:
+            case 254:
                 return visitNodes(cbNode, cbNodes, node.declarations);
-            case 233:
+            case 237:
                 return visitNode(cbNode, node.expression);
-            case 234:
+            case 238:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.thenStatement) ||
                     visitNode(cbNode, node.elseStatement);
-            case 235:
+            case 239:
                 return visitNode(cbNode, node.statement) ||
                     visitNode(cbNode, node.expression);
-            case 236:
+            case 240:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.statement);
-            case 237:
+            case 241:
                 return visitNode(cbNode, node.initializer) ||
                     visitNode(cbNode, node.condition) ||
                     visitNode(cbNode, node.incrementor) ||
                     visitNode(cbNode, node.statement);
-            case 238:
+            case 242:
                 return visitNode(cbNode, node.initializer) ||
                     visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.statement);
-            case 239:
+            case 243:
                 return visitNode(cbNode, node.awaitModifier) ||
                     visitNode(cbNode, node.initializer) ||
                     visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.statement);
-            case 240:
-            case 241:
+            case 244:
+            case 245:
                 return visitNode(cbNode, node.label);
-            case 242:
+            case 246:
                 return visitNode(cbNode, node.expression);
-            case 243:
+            case 247:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.statement);
-            case 244:
+            case 248:
                 return visitNode(cbNode, node.expression) ||
                     visitNode(cbNode, node.caseBlock);
-            case 258:
+            case 262:
                 return visitNodes(cbNode, cbNodes, node.clauses);
-            case 284:
+            case 288:
                 return visitNode(cbNode, node.expression) ||
                     visitNodes(cbNode, cbNodes, node.statements);
-            case 285:
+            case 289:
                 return visitNodes(cbNode, cbNodes, node.statements);
-            case 245:
+            case 249:
                 return visitNode(cbNode, node.label) ||
                     visitNode(cbNode, node.statement);
-            case 246:
+            case 250:
                 return visitNode(cbNode, node.expression);
-            case 247:
+            case 251:
                 return visitNode(cbNode, node.tryBlock) ||
                     visitNode(cbNode, node.catchClause) ||
                     visitNode(cbNode, node.finallyBlock);
-            case 287:
+            case 291:
                 return visitNode(cbNode, node.variableDeclaration) ||
                     visitNode(cbNode, node.block);
-            case 161:
+            case 164:
                 return visitNode(cbNode, node.expression);
-            case 252:
-            case 221:
+            case 256:
+            case 225:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNodes(cbNode, cbNodes, node.typeParameters) ||
                     visitNodes(cbNode, cbNodes, node.heritageClauses) ||
                     visitNodes(cbNode, cbNodes, node.members);
-            case 253:
+            case 257:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNodes(cbNode, cbNodes, node.typeParameters) ||
                     visitNodes(cbNode, cbNodes, node.heritageClauses) ||
                     visitNodes(cbNode, cbNodes, node.members);
-            case 254:
+            case 258:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNodes(cbNode, cbNodes, node.typeParameters) ||
                     visitNode(cbNode, node.type);
-            case 255:
+            case 259:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNodes(cbNode, cbNodes, node.members);
-            case 291:
+            case 297:
                 return visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.initializer);
-            case 256:
+            case 260:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.body);
-            case 260:
+            case 264:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.moduleReference);
-            case 261:
+            case 265:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.importClause) ||
-                    visitNode(cbNode, node.moduleSpecifier);
-            case 262:
+                    visitNode(cbNode, node.moduleSpecifier) ||
+                    visitNode(cbNode, node.assertClause);
+            case 266:
                 return visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.namedBindings);
-            case 259:
-                return visitNode(cbNode, node.name);
+            case 292:
+                return visitNodes(cbNode, cbNodes, node.elements);
+            case 293:
+                return visitNode(cbNode, node.name) ||
+                    visitNode(cbNode, node.value);
             case 263:
                 return visitNode(cbNode, node.name);
-            case 269:
+            case 267:
+                return visitNode(cbNode, node.name);
+            case 273:
                 return visitNode(cbNode, node.name);
-            case 264:
             case 268:
+            case 272:
                 return visitNodes(cbNode, cbNodes, node.elements);
-            case 267:
+            case 271:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.exportClause) ||
-                    visitNode(cbNode, node.moduleSpecifier);
-            case 265:
-            case 270:
+                    visitNode(cbNode, node.moduleSpecifier) ||
+                    visitNode(cbNode, node.assertClause);
+            case 269:
+            case 274:
                 return visitNode(cbNode, node.propertyName) ||
                     visitNode(cbNode, node.name);
-            case 266:
+            case 270:
                 return visitNodes(cbNode, cbNodes, node.decorators) ||
                     visitNodes(cbNode, cbNodes, node.modifiers) ||
                     visitNode(cbNode, node.expression);
-            case 218:
+            case 222:
                 return visitNode(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans);
-            case 228:
+            case 232:
                 return visitNode(cbNode, node.expression) || visitNode(cbNode, node.literal);
-            case 193:
+            case 197:
                 return visitNode(cbNode, node.head) || visitNodes(cbNode, cbNodes, node.templateSpans);
-            case 194:
+            case 198:
                 return visitNode(cbNode, node.type) || visitNode(cbNode, node.literal);
-            case 158:
+            case 161:
                 return visitNode(cbNode, node.expression);
-            case 286:
+            case 290:
                 return visitNodes(cbNode, cbNodes, node.types);
-            case 223:
+            case 227:
                 return visitNode(cbNode, node.expression) ||
                     visitNodes(cbNode, cbNodes, node.typeArguments);
-            case 272:
+            case 276:
                 return visitNode(cbNode, node.expression);
-            case 271:
+            case 275:
                 return visitNodes(cbNode, cbNodes, node.decorators);
-            case 337:
+            case 349:
                 return visitNodes(cbNode, cbNodes, node.elements);
-            case 273:
+            case 277:
                 return visitNode(cbNode, node.openingElement) ||
                     visitNodes(cbNode, cbNodes, node.children) ||
                     visitNode(cbNode, node.closingElement);
-            case 277:
+            case 281:
                 return visitNode(cbNode, node.openingFragment) ||
                     visitNodes(cbNode, cbNodes, node.children) ||
                     visitNode(cbNode, node.closingFragment);
-            case 274:
-            case 275:
+            case 278:
+            case 279:
                 return visitNode(cbNode, node.tagName) ||
                     visitNodes(cbNode, cbNodes, node.typeArguments) ||
                     visitNode(cbNode, node.attributes);
-            case 281:
+            case 285:
                 return visitNodes(cbNode, cbNodes, node.properties);
-            case 280:
+            case 284:
                 return visitNode(cbNode, node.name) ||
                     visitNode(cbNode, node.initializer);
-            case 282:
+            case 286:
                 return visitNode(cbNode, node.expression);
-            case 283:
+            case 287:
                 return visitNode(cbNode, node.dotDotDotToken) ||
                     visitNode(cbNode, node.expression);
-            case 276:
+            case 280:
                 return visitNode(cbNode, node.tagName);
-            case 180:
-            case 181:
-            case 301:
-            case 306:
-            case 305:
+            case 184:
+            case 185:
             case 307:
-            case 309:
+            case 313:
+            case 312:
+            case 314:
+            case 316:
                 return visitNode(cbNode, node.type);
-            case 308:
+            case 315:
                 return visitNodes(cbNode, cbNodes, node.parameters) ||
                     visitNode(cbNode, node.type);
-            case 311:
-                return visitNodes(cbNode, cbNodes, node.tags);
-            case 332:
+            case 318:
+                return (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
+                    || visitNodes(cbNode, cbNodes, node.tags);
+            case 344:
                 return visitNode(cbNode, node.tagName) ||
-                    visitNode(cbNode, node.name);
-            case 302:
+                    visitNode(cbNode, node.name) ||
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 308:
                 return visitNode(cbNode, node.name);
-            case 326:
-            case 333:
+            case 309:
+                return visitNode(cbNode, node.left) ||
+                    visitNode(cbNode, node.right);
+            case 338:
+            case 345:
                 return visitNode(cbNode, node.tagName) ||
                     (node.isNameFirst
                         ? visitNode(cbNode, node.name) ||
-                            visitNode(cbNode, node.typeExpression)
+                            visitNode(cbNode, node.typeExpression) ||
+                            (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
                         : visitNode(cbNode, node.typeExpression) ||
-                            visitNode(cbNode, node.name));
-            case 317:
-                return visitNode(cbNode, node.tagName);
-            case 316:
+                            visitNode(cbNode, node.name) ||
+                            (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
+            case 328:
                 return visitNode(cbNode, node.tagName) ||
-                    visitNode(cbNode, node.class);
-            case 315:
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 327:
                 return visitNode(cbNode, node.tagName) ||
-                    visitNode(cbNode, node.class);
-            case 330:
+                    visitNode(cbNode, node.class) ||
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 326:
+                return visitNode(cbNode, node.tagName) ||
+                    visitNode(cbNode, node.class) ||
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 342:
                 return visitNode(cbNode, node.tagName) ||
                     visitNode(cbNode, node.constraint) ||
-                    visitNodes(cbNode, cbNodes, node.typeParameters);
-            case 331:
+                    visitNodes(cbNode, cbNodes, node.typeParameters) ||
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 343:
                 return visitNode(cbNode, node.tagName) ||
                     (node.typeExpression &&
-                        node.typeExpression.kind === 301
+                        node.typeExpression.kind === 307
                         ? visitNode(cbNode, node.typeExpression) ||
-                            visitNode(cbNode, node.fullName)
+                            visitNode(cbNode, node.fullName) ||
+                            (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment))
                         : visitNode(cbNode, node.fullName) ||
-                            visitNode(cbNode, node.typeExpression));
-            case 324:
+                            visitNode(cbNode, node.typeExpression) ||
+                            (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment)));
+            case 336:
                 return visitNode(cbNode, node.tagName) ||
                     visitNode(cbNode, node.fullName) ||
-                    visitNode(cbNode, node.typeExpression);
-            case 327:
-            case 329:
-            case 328:
-            case 325:
+                    visitNode(cbNode, node.typeExpression) ||
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 339:
+            case 341:
+            case 340:
+            case 337:
                 return visitNode(cbNode, node.tagName) ||
-                    visitNode(cbNode, node.typeExpression);
-            case 313:
+                    visitNode(cbNode, node.typeExpression) ||
+                    (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 321:
                 return ts.forEach(node.typeParameters, cbNode) ||
                     ts.forEach(node.parameters, cbNode) ||
                     visitNode(cbNode, node.type);
-            case 312:
-                return ts.forEach(node.jsDocPropertyTags, cbNode);
-            case 314:
-            case 319:
-            case 320:
-            case 321:
             case 322:
             case 323:
-                return visitNode(cbNode, node.tagName);
-            case 336:
+            case 324:
+                return visitNode(cbNode, node.name);
+            case 320:
+                return ts.forEach(node.jsDocPropertyTags, cbNode);
+            case 325:
+            case 330:
+            case 331:
+            case 332:
+            case 333:
+            case 334:
+            case 329:
+                return visitNode(cbNode, node.tagName)
+                    || (typeof node.comment === "string" ? undefined : visitNodes(cbNode, cbNodes, node.comment));
+            case 348:
                 return visitNode(cbNode, node.expression);
         }
     }
@@ -23059,7 +24402,7 @@ var ts;
                         continue;
                     return res;
                 }
-                if (current.kind >= 157) {
+                if (current.kind >= 160) {
                     for (var _i = 0, _a = gatherPossibleChildren(current); _i < _a.length; _i++) {
                         var child = _a[_i];
                         queue.push(child);
@@ -23169,11 +24512,12 @@ var ts;
         var topLevel = true;
         var parseErrorBeforeNextFinishedNode = false;
         function parseSourceFile(fileName, sourceText, languageVersion, syntaxCursor, setParentNodes, scriptKind) {
+            var _a;
             if (setParentNodes === void 0) { setParentNodes = false; }
             scriptKind = ts.ensureScriptKind(fileName, scriptKind);
             if (scriptKind === 6) {
                 var result_3 = parseJsonText(fileName, sourceText, languageVersion, syntaxCursor, setParentNodes);
-                ts.convertToObjectWorker(result_3, result_3.parseDiagnostics, false, undefined, undefined);
+                ts.convertToObjectWorker(result_3, (_a = result_3.statements[0]) === null || _a === void 0 ? void 0 : _a.expression, result_3.parseDiagnostics, false, undefined, undefined);
                 result_3.referencedFiles = ts.emptyArray;
                 result_3.typeReferenceDirectives = ts.emptyArray;
                 result_3.libReferenceDirectives = ts.emptyArray;
@@ -23210,34 +24554,50 @@ var ts;
                 endOfFileToken = parseTokenNode();
             }
             else {
-                var expression = void 0;
-                switch (token()) {
-                    case 22:
-                        expression = parseArrayLiteralExpression();
-                        break;
-                    case 109:
-                    case 94:
-                    case 103:
-                        expression = parseTokenNode();
-                        break;
-                    case 40:
-                        if (lookAhead(function () { return nextToken() === 8 && nextToken() !== 58; })) {
-                            expression = parsePrefixUnaryExpression();
-                        }
-                        else {
-                            expression = parseObjectLiteralExpression();
-                        }
-                        break;
-                    case 8:
-                    case 10:
-                        if (lookAhead(function () { return nextToken() !== 58; })) {
-                            expression = parseLiteralNode();
+                var expressions = void 0;
+                while (token() !== 1) {
+                    var expression_1 = void 0;
+                    switch (token()) {
+                        case 22:
+                            expression_1 = parseArrayLiteralExpression();
+                            break;
+                        case 110:
+                        case 95:
+                        case 104:
+                            expression_1 = parseTokenNode();
                             break;
+                        case 40:
+                            if (lookAhead(function () { return nextToken() === 8 && nextToken() !== 58; })) {
+                                expression_1 = parsePrefixUnaryExpression();
+                            }
+                            else {
+                                expression_1 = parseObjectLiteralExpression();
+                            }
+                            break;
+                        case 8:
+                        case 10:
+                            if (lookAhead(function () { return nextToken() !== 58; })) {
+                                expression_1 = parseLiteralNode();
+                                break;
+                            }
+                        default:
+                            expression_1 = parseObjectLiteralExpression();
+                            break;
+                    }
+                    if (expressions && ts.isArray(expressions)) {
+                        expressions.push(expression_1);
+                    }
+                    else if (expressions) {
+                        expressions = [expressions, expression_1];
+                    }
+                    else {
+                        expressions = expression_1;
+                        if (token() !== 1) {
+                            parseErrorAtCurrentToken(ts.Diagnostics.Unexpected_token);
                         }
-                    default:
-                        expression = parseObjectLiteralExpression();
-                        break;
+                    }
                 }
+                var expression = ts.isArray(expressions) ? finishNode(factory.createArrayLiteralExpression(expressions), pos) : ts.Debug.checkDefined(expressions);
                 var statement = factory.createExpressionStatement(expression);
                 finishNode(statement, pos);
                 statements = createNodeArray([statement], pos);
@@ -23418,7 +24778,7 @@ var ts;
             return factory.updateSourceFile(sourceFile, ts.setTextRange(factory.createNodeArray(statements), sourceFile.statements));
             function containsPossibleTopLevelAwait(node) {
                 return !(node.flags & 32768)
-                    && !!(node.transformFlags & 8388608);
+                    && !!(node.transformFlags & 16777216);
             }
             function findNextStatementWithAwait(statements, start) {
                 for (var i = start; i < statements.length; i++) {
@@ -23452,7 +24812,7 @@ var ts;
             var sourceFile = factory.createSourceFile(statements, endOfFileToken, flags);
             ts.setTextRangePosWidth(sourceFile, 0, sourceText.length);
             setExternalModuleIndicator(sourceFile);
-            if (!isDeclarationFile && isExternalModule(sourceFile) && sourceFile.transformFlags & 8388608) {
+            if (!isDeclarationFile && isExternalModule(sourceFile) && sourceFile.transformFlags & 16777216) {
                 sourceFile = reparseTopLevelAwait(sourceFile);
             }
             sourceFile.text = sourceText;
@@ -23603,6 +24963,9 @@ var ts;
         function reScanLessThanToken() {
             return currentToken = scanner.reScanLessThanToken();
         }
+        function reScanHashToken() {
+            return currentToken = scanner.reScanHashToken();
+        }
         function scanJsxIdentifier() {
             return currentToken = scanner.scanJsxIdentifier();
         }
@@ -23637,22 +25000,22 @@ var ts;
             return speculationHelper(callback, 0);
         }
         function isBindingIdentifier() {
-            if (token() === 78) {
+            if (token() === 79) {
                 return true;
             }
-            return token() > 115;
+            return token() > 116;
         }
         function isIdentifier() {
-            if (token() === 78) {
+            if (token() === 79) {
                 return true;
             }
-            if (token() === 124 && inYieldContext()) {
+            if (token() === 125 && inYieldContext()) {
                 return false;
             }
-            if (token() === 130 && inAwaitContext()) {
+            if (token() === 132 && inAwaitContext()) {
                 return false;
             }
-            return token() > 115;
+            return token() > 116;
         }
         function parseExpected(kind, diagnosticMessage, shouldAdvance) {
             if (shouldAdvance === void 0) { shouldAdvance = true; }
@@ -23670,6 +25033,98 @@ var ts;
             }
             return false;
         }
+        var viableKeywordSuggestions = Object.keys(ts.textToKeywordObj).filter(function (keyword) { return keyword.length > 2; });
+        function parseErrorForMissingSemicolonAfter(node) {
+            var _a;
+            if (ts.isTaggedTemplateExpression(node)) {
+                parseErrorAt(ts.skipTrivia(sourceText, node.template.pos), node.template.end, ts.Diagnostics.Module_declaration_names_may_only_use_or_quoted_strings);
+                return;
+            }
+            var expressionText = ts.isIdentifier(node) ? ts.idText(node) : undefined;
+            if (!expressionText || !ts.isIdentifierText(expressionText, languageVersion)) {
+                parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
+                return;
+            }
+            var pos = ts.skipTrivia(sourceText, node.pos);
+            switch (expressionText) {
+                case "const":
+                case "let":
+                case "var":
+                    parseErrorAt(pos, node.end, ts.Diagnostics.Variable_declaration_not_allowed_at_this_location);
+                    return;
+                case "declare":
+                    return;
+                case "interface":
+                    parseErrorForInvalidName(ts.Diagnostics.Interface_name_cannot_be_0, ts.Diagnostics.Interface_must_be_given_a_name, 18);
+                    return;
+                case "is":
+                    parseErrorAt(pos, scanner.getTextPos(), ts.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);
+                    return;
+                case "module":
+                case "namespace":
+                    parseErrorForInvalidName(ts.Diagnostics.Namespace_name_cannot_be_0, ts.Diagnostics.Namespace_must_be_given_a_name, 18);
+                    return;
+                case "type":
+                    parseErrorForInvalidName(ts.Diagnostics.Type_alias_name_cannot_be_0, ts.Diagnostics.Type_alias_must_be_given_a_name, 63);
+                    return;
+            }
+            var suggestion = (_a = ts.getSpellingSuggestion(expressionText, viableKeywordSuggestions, function (n) { return n; })) !== null && _a !== void 0 ? _a : getSpaceSuggestion(expressionText);
+            if (suggestion) {
+                parseErrorAt(pos, node.end, ts.Diagnostics.Unknown_keyword_or_identifier_Did_you_mean_0, suggestion);
+                return;
+            }
+            if (token() === 0) {
+                return;
+            }
+            parseErrorAt(pos, node.end, ts.Diagnostics.Unexpected_keyword_or_identifier);
+        }
+        function parseErrorForInvalidName(nameDiagnostic, blankDiagnostic, tokenIfBlankName) {
+            if (token() === tokenIfBlankName) {
+                parseErrorAtCurrentToken(blankDiagnostic);
+            }
+            else {
+                parseErrorAtCurrentToken(nameDiagnostic, scanner.getTokenValue());
+            }
+        }
+        function getSpaceSuggestion(expressionText) {
+            for (var _i = 0, viableKeywordSuggestions_1 = viableKeywordSuggestions; _i < viableKeywordSuggestions_1.length; _i++) {
+                var keyword = viableKeywordSuggestions_1[_i];
+                if (expressionText.length > keyword.length + 2 && ts.startsWith(expressionText, keyword)) {
+                    return "".concat(keyword, " ").concat(expressionText.slice(keyword.length));
+                }
+            }
+            return undefined;
+        }
+        function parseSemicolonAfterPropertyName(name, type, initializer) {
+            if (token() === 59 && !scanner.hasPrecedingLineBreak()) {
+                parseErrorAtCurrentToken(ts.Diagnostics.Decorators_must_precede_the_name_and_all_keywords_of_property_declarations);
+                return;
+            }
+            if (token() === 20) {
+                parseErrorAtCurrentToken(ts.Diagnostics.Cannot_start_a_function_call_in_a_type_annotation);
+                nextToken();
+                return;
+            }
+            if (type && !canParseSemicolon()) {
+                if (initializer) {
+                    parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
+                }
+                else {
+                    parseErrorAtCurrentToken(ts.Diagnostics.Expected_for_property_initializer);
+                }
+                return;
+            }
+            if (tryParseSemicolon()) {
+                return;
+            }
+            if (initializer) {
+                if (token() === 18) {
+                    parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(26));
+                }
+                return;
+            }
+            parseErrorForMissingSemicolonAfter(name);
+        }
         function parseExpectedJSDoc(kind) {
             if (token() === kind) {
                 nextTokenJSDoc();
@@ -23723,16 +25178,17 @@ var ts;
             }
             return token() === 19 || token() === 1 || scanner.hasPrecedingLineBreak();
         }
-        function parseSemicolon() {
-            if (canParseSemicolon()) {
-                if (token() === 26) {
-                    nextToken();
-                }
-                return true;
+        function tryParseSemicolon() {
+            if (!canParseSemicolon()) {
+                return false;
             }
-            else {
-                return parseExpected(26);
+            if (token() === 26) {
+                nextToken();
             }
+            return true;
+        }
+        function parseSemicolon() {
+            return tryParseSemicolon() || parseExpected(26);
         }
         function createNodeArray(elements, pos, end, hasTrailingComma) {
             var array = factory.createNodeArray(elements, hasTrailingComma);
@@ -23758,11 +25214,11 @@ var ts;
                 parseErrorAtCurrentToken(diagnosticMessage, arg0);
             }
             var pos = getNodePos();
-            var result = kind === 78 ? factory.createIdentifier("", undefined, undefined) :
+            var result = kind === 79 ? factory.createIdentifier("", undefined, undefined) :
                 ts.isTemplateLiteralKind(kind) ? factory.createTemplateLiteralLikeNode(kind, "", "", undefined) :
                     kind === 8 ? factory.createNumericLiteral("", undefined) :
                         kind === 10 ? factory.createStringLiteral("", undefined) :
-                            kind === 271 ? factory.createMissingDeclaration() :
+                            kind === 275 ? factory.createMissingDeclaration() :
                                 factory.createToken(kind);
             return finishNode(result, pos);
         }
@@ -23782,11 +25238,11 @@ var ts;
                 nextTokenWithoutCheck();
                 return finishNode(factory.createIdentifier(text, undefined, originalKeywordKind), pos);
             }
-            if (token() === 79) {
+            if (token() === 80) {
                 parseErrorAtCurrentToken(privateIdentifierDiagnosticMessage || ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
                 return createIdentifier(true);
             }
-            if (token() === 0 && scanner.tryScan(function () { return scanner.reScanInvalidIdentifier() === 78; })) {
+            if (token() === 0 && scanner.tryScan(function () { return scanner.reScanInvalidIdentifier() === 79; })) {
                 return createIdentifier(true);
             }
             identifierCount++;
@@ -23796,7 +25252,7 @@ var ts;
             var defaultMessage = isReservedWord ?
                 ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here :
                 ts.Diagnostics.Identifier_expected;
-            return createMissingNode(78, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg);
+            return createMissingNode(79, reportAtCurrentPosition, diagnosticMessage || defaultMessage, msgArg);
         }
         function parseBindingIdentifier(privateIdentifierDiagnosticMessage) {
             return createIdentifier(isBindingIdentifier(), undefined, privateIdentifierDiagnosticMessage);
@@ -23812,6 +25268,10 @@ var ts;
                 token() === 10 ||
                 token() === 8;
         }
+        function isAssertionKey() {
+            return ts.tokenIsIdentifierOrKeyword(token()) ||
+                token() === 10;
+        }
         function parsePropertyNameWorker(allowComputedPropertyNames) {
             if (token() === 10 || token() === 8) {
                 var node = parseLiteralNode();
@@ -23821,7 +25281,7 @@ var ts;
             if (allowComputedPropertyNames && token() === 22) {
                 return parseComputedPropertyName();
             }
-            if (token() === 79) {
+            if (token() === 80) {
                 return parsePrivateIdentifier();
             }
             return parseIdentifierName();
@@ -23861,23 +25321,22 @@ var ts;
         }
         function nextTokenCanFollowModifier() {
             switch (token()) {
-                case 84:
-                    return nextToken() === 91;
-                case 92:
+                case 85:
+                    return nextToken() === 92;
+                case 93:
                     nextToken();
-                    if (token() === 87) {
+                    if (token() === 88) {
                         return lookAhead(nextTokenCanFollowDefaultKeyword);
                     }
-                    if (token() === 149) {
+                    if (token() === 151) {
                         return lookAhead(nextTokenCanFollowExportModifier);
                     }
                     return canFollowExportModifier();
-                case 87:
+                case 88:
                     return nextTokenCanFollowDefaultKeyword();
-                case 123:
-                    return nextTokenIsOnSameLineAndCanFollowModifier();
-                case 134:
-                case 146:
+                case 124:
+                case 136:
+                case 148:
                     nextToken();
                     return canFollowModifier();
                 default:
@@ -23886,7 +25345,7 @@ var ts;
         }
         function canFollowExportModifier() {
             return token() !== 41
-                && token() !== 126
+                && token() !== 127
                 && token() !== 18
                 && canFollowModifier();
         }
@@ -23906,10 +25365,10 @@ var ts;
         }
         function nextTokenCanFollowDefaultKeyword() {
             nextToken();
-            return token() === 83 || token() === 97 ||
-                token() === 117 ||
-                (token() === 125 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
-                (token() === 129 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
+            return token() === 84 || token() === 98 ||
+                token() === 118 ||
+                (token() === 126 && lookAhead(nextTokenIsClassKeywordOnSameLine)) ||
+                (token() === 131 && lookAhead(nextTokenIsFunctionKeywordOnSameLine));
         }
         function isListElement(parsingContext, inErrorRecovery) {
             var node = currentNode(parsingContext);
@@ -23922,7 +25381,7 @@ var ts;
                 case 3:
                     return !(token() === 26 && inErrorRecovery) && isStartOfStatement();
                 case 2:
-                    return token() === 81 || token() === 87;
+                    return token() === 82 || token() === 88;
                 case 4:
                     return lookAhead(isTypeMemberStart);
                 case 5:
@@ -23943,6 +25402,8 @@ var ts;
                     return isLiteralPropertyName();
                 case 9:
                     return token() === 22 || token() === 25 || isLiteralPropertyName();
+                case 24:
+                    return isAssertionKey();
                 case 7:
                     if (token() === 18) {
                         return lookAhead(isValidHeritageClauseObjectLiteral);
@@ -23989,7 +25450,7 @@ var ts;
             ts.Debug.assert(token() === 18);
             if (nextToken() === 19) {
                 var next = nextToken();
-                return next === 27 || next === 18 || next === 93 || next === 116;
+                return next === 27 || next === 18 || next === 94 || next === 117;
             }
             return true;
         }
@@ -24006,8 +25467,8 @@ var ts;
             return ts.tokenIsIdentifierOrKeywordOrGreaterThan(token());
         }
         function isHeritageClauseExtendsOrImplementsKeyword() {
-            if (token() === 116 ||
-                token() === 93) {
+            if (token() === 117 ||
+                token() === 94) {
                 return lookAhead(nextTokenIsStartOfExpression);
             }
             return false;
@@ -24033,15 +25494,16 @@ var ts;
                 case 12:
                 case 9:
                 case 23:
+                case 24:
                     return token() === 19;
                 case 3:
-                    return token() === 19 || token() === 81 || token() === 87;
+                    return token() === 19 || token() === 82 || token() === 88;
                 case 7:
-                    return token() === 18 || token() === 93 || token() === 116;
+                    return token() === 18 || token() === 94 || token() === 117;
                 case 8:
                     return isVariableDeclaratorListTerminator();
                 case 19:
-                    return token() === 31 || token() === 20 || token() === 18 || token() === 93 || token() === 116;
+                    return token() === 31 || token() === 20 || token() === 18 || token() === 94 || token() === 117;
                 case 11:
                     return token() === 21 || token() === 26;
                 case 15:
@@ -24077,7 +25539,7 @@ var ts;
             return false;
         }
         function isInSomeParsingContext() {
-            for (var kind = 0; kind < 24; kind++) {
+            for (var kind = 0; kind < 25; kind++) {
                 if (parsingContext & (1 << kind)) {
                     if (isListElement(kind, true) || isListTerminator(kind)) {
                         return true;
@@ -24093,8 +25555,7 @@ var ts;
             var listPos = getNodePos();
             while (!isListTerminator(kind)) {
                 if (isListElement(kind, false)) {
-                    var element = parseListElement(kind, parseElement);
-                    list.push(element);
+                    list.push(parseListElement(kind, parseElement));
                     continue;
                 }
                 if (abortParsingListOrMoveToNextToken(kind)) {
@@ -24177,17 +25638,17 @@ var ts;
         function isReusableClassMember(node) {
             if (node) {
                 switch (node.kind) {
-                    case 166:
+                    case 170:
+                    case 175:
                     case 171:
-                    case 167:
-                    case 168:
-                    case 163:
-                    case 229:
+                    case 172:
+                    case 166:
+                    case 233:
                         return true;
-                    case 165:
+                    case 168:
                         var methodDeclaration = node;
-                        var nameIsConstructor = methodDeclaration.name.kind === 78 &&
-                            methodDeclaration.name.originalKeywordKind === 132;
+                        var nameIsConstructor = methodDeclaration.name.kind === 79 &&
+                            methodDeclaration.name.originalKeywordKind === 134;
                         return !nameIsConstructor;
                 }
             }
@@ -24196,8 +25657,8 @@ var ts;
         function isReusableSwitchClause(node) {
             if (node) {
                 switch (node.kind) {
-                    case 284:
-                    case 285:
+                    case 288:
+                    case 289:
                         return true;
                 }
             }
@@ -24206,65 +25667,65 @@ var ts;
         function isReusableStatement(node) {
             if (node) {
                 switch (node.kind) {
-                    case 251:
-                    case 232:
-                    case 230:
+                    case 255:
+                    case 236:
                     case 234:
-                    case 233:
+                    case 238:
+                    case 237:
+                    case 250:
                     case 246:
-                    case 242:
+                    case 248:
+                    case 245:
                     case 244:
+                    case 242:
+                    case 243:
                     case 241:
                     case 240:
-                    case 238:
-                    case 239:
-                    case 237:
-                    case 236:
-                    case 243:
-                    case 231:
                     case 247:
-                    case 245:
                     case 235:
-                    case 248:
-                    case 261:
+                    case 251:
+                    case 249:
+                    case 239:
+                    case 252:
+                    case 265:
+                    case 264:
+                    case 271:
+                    case 270:
                     case 260:
-                    case 267:
-                    case 266:
                     case 256:
-                    case 252:
-                    case 253:
-                    case 255:
-                    case 254:
+                    case 257:
+                    case 259:
+                    case 258:
                         return true;
                 }
             }
             return false;
         }
         function isReusableEnumMember(node) {
-            return node.kind === 291;
+            return node.kind === 297;
         }
         function isReusableTypeMember(node) {
             if (node) {
                 switch (node.kind) {
-                    case 170:
-                    case 164:
-                    case 171:
-                    case 162:
-                    case 169:
+                    case 174:
+                    case 167:
+                    case 175:
+                    case 165:
+                    case 173:
                         return true;
                 }
             }
             return false;
         }
         function isReusableVariableDeclaration(node) {
-            if (node.kind !== 249) {
+            if (node.kind !== 253) {
                 return false;
             }
             var variableDeclarator = node;
             return variableDeclarator.initializer === undefined;
         }
         function isReusableParameter(node) {
-            if (node.kind !== 160) {
+            if (node.kind !== 163) {
                 return false;
             }
             var parameter = node;
@@ -24280,7 +25741,10 @@ var ts;
         }
         function parsingContextErrors(context) {
             switch (context) {
-                case 0: return parseErrorAtCurrentToken(ts.Diagnostics.Declaration_or_statement_expected);
+                case 0:
+                    return token() === 88
+                        ? parseErrorAtCurrentToken(ts.Diagnostics._0_expected, ts.tokenToString(93))
+                        : parseErrorAtCurrentToken(ts.Diagnostics.Declaration_or_statement_expected);
                 case 1: return parseErrorAtCurrentToken(ts.Diagnostics.Declaration_or_statement_expected);
                 case 2: return parseErrorAtCurrentToken(ts.Diagnostics.case_or_default_expected);
                 case 3: return parseErrorAtCurrentToken(ts.Diagnostics.Statement_expected);
@@ -24299,7 +25763,10 @@ var ts;
                 case 12: return parseErrorAtCurrentToken(ts.Diagnostics.Property_assignment_expected);
                 case 15: return parseErrorAtCurrentToken(ts.Diagnostics.Expression_or_comma_expected);
                 case 17: return parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
-                case 16: return parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
+                case 16:
+                    return ts.isKeyword(token())
+                        ? parseErrorAtCurrentToken(ts.Diagnostics._0_is_not_allowed_as_a_parameter_name, ts.tokenToString(token()))
+                        : parseErrorAtCurrentToken(ts.Diagnostics.Parameter_declaration_expected);
                 case 19: return parseErrorAtCurrentToken(ts.Diagnostics.Type_parameter_declaration_expected);
                 case 20: return parseErrorAtCurrentToken(ts.Diagnostics.Type_argument_expected);
                 case 21: return parseErrorAtCurrentToken(ts.Diagnostics.Type_expected);
@@ -24387,12 +25854,12 @@ var ts;
             if (scanner.hasPrecedingLineBreak() && ts.tokenIsIdentifierOrKeyword(token())) {
                 var matchesPattern = lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine);
                 if (matchesPattern) {
-                    return createMissingNode(78, true, ts.Diagnostics.Identifier_expected);
+                    return createMissingNode(79, true, ts.Diagnostics.Identifier_expected);
                 }
             }
-            if (token() === 79) {
+            if (token() === 80) {
                 var node = parsePrivateIdentifier();
-                return allowPrivateIdentifiers ? node : createMissingNode(78, true, ts.Diagnostics.Identifier_expected);
+                return allowPrivateIdentifiers ? node : createMissingNode(79, true, ts.Diagnostics.Identifier_expected);
             }
             return allowIdentifierNames ? parseIdentifierName() : parseIdentifier();
         }
@@ -24492,14 +25959,14 @@ var ts;
         }
         function typeHasArrowFunctionBlockingParseError(node) {
             switch (node.kind) {
-                case 173:
+                case 177:
                     return ts.nodeIsMissing(node.typeName);
-                case 174:
-                case 175: {
+                case 178:
+                case 179: {
                     var _a = node, parameters = _a.parameters, type = _a.type;
                     return isMissingList(parameters) || typeHasArrowFunctionBlockingParseError(type);
                 }
-                case 186:
+                case 190:
                     return typeHasArrowFunctionBlockingParseError(node.type);
                 default:
                     return false;
@@ -24531,7 +25998,7 @@ var ts;
                 token() === 19 ||
                 token() === 21 ||
                 token() === 31 ||
-                token() === 62 ||
+                token() === 63 ||
                 token() === 51) {
                 return finishNode(factory.createJSDocUnknownType(), pos);
             }
@@ -24553,7 +26020,7 @@ var ts;
         function parseJSDocParameter() {
             var pos = getNodePos();
             var name;
-            if (token() === 107 || token() === 102) {
+            if (token() === 108 || token() === 103) {
                 name = parseIdentifierName();
                 parseExpected(58);
             }
@@ -24562,7 +26029,7 @@ var ts;
         function parseJSDocType() {
             scanner.setInJSDocType(true);
             var pos = getNodePos();
-            if (parseOptional(139)) {
+            if (parseOptional(141)) {
                 var moduleTag = factory.createJSDocNamepathType(undefined);
                 terminate: while (true) {
                     switch (token()) {
@@ -24584,7 +26051,7 @@ var ts;
             if (hasDotDotDot) {
                 type = finishNode(factory.createJSDocVariadicType(type), pos);
             }
-            if (token() === 62) {
+            if (token() === 63) {
                 nextToken();
                 return finishNode(factory.createJSDocOptionalType(type), pos);
             }
@@ -24592,7 +26059,7 @@ var ts;
         }
         function parseTypeQuery() {
             var pos = getNodePos();
-            parseExpected(111);
+            parseExpected(112);
             return finishNode(factory.createTypeQueryNode(parseEntityName(true)), pos);
         }
         function parseTypeParameter() {
@@ -24600,7 +26067,7 @@ var ts;
             var name = parseIdentifier();
             var constraint;
             var expression;
-            if (parseOptional(93)) {
+            if (parseOptional(94)) {
                 if (isStartOfType() || !isStartOfExpression()) {
                     constraint = parseType();
                 }
@@ -24608,7 +26075,7 @@ var ts;
                     expression = parseUnaryExpressionOrHigher();
                 }
             }
-            var defaultType = parseOptional(62) ? parseType() : undefined;
+            var defaultType = parseOptional(63) ? parseType() : undefined;
             var node = factory.createTypeParameterDeclaration(name, constraint, defaultType);
             node.expression = expression;
             return finishNode(node, pos);
@@ -24641,11 +26108,14 @@ var ts;
         function parseParameterWorker(inOuterAwaitContext) {
             var pos = getNodePos();
             var hasJSDoc = hasPrecedingJSDocComment();
-            if (token() === 107) {
-                var node_1 = factory.createParameterDeclaration(undefined, undefined, undefined, createIdentifier(true), undefined, parseTypeAnnotation(), undefined);
+            var decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : parseDecorators();
+            if (token() === 108) {
+                var node_1 = factory.createParameterDeclaration(decorators, undefined, undefined, createIdentifier(true), undefined, parseTypeAnnotation(), undefined);
+                if (decorators) {
+                    parseErrorAtRange(decorators[0], ts.Diagnostics.Decorators_may_not_be_applied_to_this_parameters);
+                }
                 return withJSDoc(finishNode(node_1, pos), hasJSDoc);
             }
-            var decorators = inOuterAwaitContext ? doInAwaitContext(parseDecorators) : parseDecorators();
             var savedTopLevel = topLevel;
             topLevel = false;
             var modifiers = parseModifiers();
@@ -24702,14 +26172,14 @@ var ts;
         function parseSignatureMember(kind) {
             var pos = getNodePos();
             var hasJSDoc = hasPrecedingJSDocComment();
-            if (kind === 170) {
-                parseExpected(102);
+            if (kind === 174) {
+                parseExpected(103);
             }
             var typeParameters = parseTypeParameters();
             var parameters = parseParameters(4);
             var type = parseReturnType(58, true);
             parseTypeMemberSemicolon();
-            var node = kind === 169
+            var node = kind === 173
                 ? factory.createCallSignature(typeParameters, parameters, type)
                 : factory.createConstructSignature(typeParameters, parameters, type);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
@@ -24763,14 +26233,17 @@ var ts;
             else {
                 var type = parseTypeAnnotation();
                 node = factory.createPropertySignature(modifiers, name, questionToken, type);
-                if (token() === 62)
+                if (token() === 63)
                     node.initializer = parseInitializer();
             }
             parseTypeMemberSemicolon();
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function isTypeMemberStart() {
-            if (token() === 20 || token() === 29) {
+            if (token() === 20 ||
+                token() === 29 ||
+                token() === 136 ||
+                token() === 148) {
                 return true;
             }
             var idToken = false;
@@ -24797,14 +26270,20 @@ var ts;
         }
         function parseTypeMember() {
             if (token() === 20 || token() === 29) {
-                return parseSignatureMember(169);
+                return parseSignatureMember(173);
             }
-            if (token() === 102 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
-                return parseSignatureMember(170);
+            if (token() === 103 && lookAhead(nextTokenIsOpenParenOrLessThan)) {
+                return parseSignatureMember(174);
             }
             var pos = getNodePos();
             var hasJSDoc = hasPrecedingJSDocComment();
             var modifiers = parseModifiers();
+            if (parseContextualModifier(136)) {
+                return parseAccessorDeclaration(pos, hasJSDoc, undefined, modifiers, 171);
+            }
+            if (parseContextualModifier(148)) {
+                return parseAccessorDeclaration(pos, hasJSDoc, undefined, modifiers, 172);
+            }
             if (isIndexSignature()) {
                 return parseIndexSignatureDeclaration(pos, hasJSDoc, undefined, modifiers);
             }
@@ -24844,17 +26323,17 @@ var ts;
         function isStartOfMappedType() {
             nextToken();
             if (token() === 39 || token() === 40) {
-                return nextToken() === 142;
+                return nextToken() === 144;
             }
-            if (token() === 142) {
+            if (token() === 144) {
                 nextToken();
             }
-            return token() === 22 && nextTokenIsIdentifier() && nextToken() === 100;
+            return token() === 22 && nextTokenIsIdentifier() && nextToken() === 101;
         }
         function parseMappedTypeParameter() {
             var pos = getNodePos();
             var name = parseIdentifierName();
-            parseExpected(100);
+            parseExpected(101);
             var type = parseType();
             return finishNode(factory.createTypeParameterDeclaration(name, type, undefined), pos);
         }
@@ -24862,15 +26341,15 @@ var ts;
             var pos = getNodePos();
             parseExpected(18);
             var readonlyToken;
-            if (token() === 142 || token() === 39 || token() === 40) {
+            if (token() === 144 || token() === 39 || token() === 40) {
                 readonlyToken = parseTokenNode();
-                if (readonlyToken.kind !== 142) {
-                    parseExpected(142);
+                if (readonlyToken.kind !== 144) {
+                    parseExpected(144);
                 }
             }
             parseExpected(22);
             var typeParameter = parseMappedTypeParameter();
-            var nameType = parseOptional(126) ? parseType() : undefined;
+            var nameType = parseOptional(127) ? parseType() : undefined;
             parseExpected(23);
             var questionToken;
             if (token() === 57 || token() === 39 || token() === 40) {
@@ -24881,8 +26360,9 @@ var ts;
             }
             var type = parseTypeAnnotation();
             parseSemicolon();
+            var members = parseList(4, parseTypeMember);
             parseExpected(19);
-            return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), pos);
+            return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type, members), pos);
         }
         function parseTupleElementType() {
             var pos = getNodePos();
@@ -24934,10 +26414,10 @@ var ts;
         }
         function parseModifiersForConstructorType() {
             var modifiers;
-            if (token() === 125) {
+            if (token() === 126) {
                 var pos = getNodePos();
                 nextToken();
-                var modifier = finishNode(factory.createToken(125), pos);
+                var modifier = finishNode(factory.createToken(126), pos);
                 modifiers = createNodeArray([modifier], pos);
             }
             return modifiers;
@@ -24946,7 +26426,7 @@ var ts;
             var pos = getNodePos();
             var hasJSDoc = hasPrecedingJSDocComment();
             var modifiers = parseModifiersForConstructorType();
-            var isConstructorType = parseOptional(102);
+            var isConstructorType = parseOptional(103);
             var typeParameters = parseTypeParameters();
             var parameters = parseParameters(4);
             var type = parseReturnType(38, false);
@@ -24966,7 +26446,7 @@ var ts;
             if (negative) {
                 nextToken();
             }
-            var expression = token() === 109 || token() === 94 || token() === 103 ?
+            var expression = token() === 110 || token() === 95 || token() === 104 ?
                 parseTokenNode() :
                 parseLiteralLikeNode(token());
             if (negative) {
@@ -24976,13 +26456,13 @@ var ts;
         }
         function isStartOfTypeOfImportType() {
             nextToken();
-            return token() === 99;
+            return token() === 100;
         }
         function parseImportType() {
             sourceFlags |= 1048576;
             var pos = getNodePos();
-            var isTypeOf = parseOptional(111);
-            parseExpected(99);
+            var isTypeOf = parseOptional(112);
+            parseExpected(100);
             parseExpected(20);
             var type = parseType();
             parseExpected(21);
@@ -24996,18 +26476,18 @@ var ts;
         }
         function parseNonArrayType() {
             switch (token()) {
-                case 128:
+                case 130:
+                case 154:
+                case 149:
+                case 146:
+                case 157:
+                case 150:
+                case 133:
                 case 152:
+                case 143:
                 case 147:
-                case 144:
-                case 155:
-                case 148:
-                case 131:
-                case 150:
-                case 141:
-                case 145:
                     return tryParse(parseKeywordAndNoDot) || parseTypeReference();
-                case 65:
+                case 66:
                     scanner.reScanAsteriskEqualsToken();
                 case 41:
                     return parseJSDocAllType();
@@ -25015,7 +26495,7 @@ var ts;
                     scanner.reScanQuestionToken();
                 case 57:
                     return parseJSDocUnknownOrNullableType();
-                case 97:
+                case 98:
                     return parseJSDocFunctionType();
                 case 53:
                     return parseJSDocNonNullableType();
@@ -25023,24 +26503,24 @@ var ts;
                 case 10:
                 case 8:
                 case 9:
-                case 109:
-                case 94:
-                case 103:
+                case 110:
+                case 95:
+                case 104:
                     return parseLiteralTypeNode();
                 case 40:
                     return lookAhead(nextTokenIsNumericOrBigIntLiteral) ? parseLiteralTypeNode(true) : parseTypeReference();
-                case 113:
+                case 114:
                     return parseTokenNode();
-                case 107: {
+                case 108: {
                     var thisKeyword = parseThisTypeNode();
-                    if (token() === 137 && !scanner.hasPrecedingLineBreak()) {
+                    if (token() === 139 && !scanner.hasPrecedingLineBreak()) {
                         return parseThisTypePredicate(thisKeyword);
                     }
                     else {
                         return thisKeyword;
                     }
                 }
-                case 111:
+                case 112:
                     return lookAhead(isStartOfTypeOfImportType) ? parseImportType() : parseTypeQuery();
                 case 18:
                     return lookAhead(isStartOfMappedType) ? parseMappedType() : parseTypeLiteral();
@@ -25048,9 +26528,9 @@ var ts;
                     return parseTupleType();
                 case 20:
                     return parseParenthesizedType();
-                case 99:
+                case 100:
                     return parseImportType();
-                case 127:
+                case 128:
                     return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference();
                 case 15:
                     return parseTemplateType();
@@ -25060,44 +26540,44 @@ var ts;
         }
         function isStartOfType(inStartOfParameter) {
             switch (token()) {
-                case 128:
-                case 152:
-                case 147:
+                case 130:
+                case 154:
+                case 149:
+                case 146:
+                case 157:
+                case 133:
                 case 144:
-                case 155:
-                case 131:
-                case 142:
-                case 148:
-                case 151:
-                case 113:
                 case 150:
-                case 103:
-                case 107:
-                case 111:
-                case 141:
+                case 153:
+                case 114:
+                case 152:
+                case 104:
+                case 108:
+                case 112:
+                case 143:
                 case 18:
                 case 22:
                 case 29:
                 case 51:
                 case 50:
-                case 102:
+                case 103:
                 case 10:
                 case 8:
                 case 9:
-                case 109:
-                case 94:
-                case 145:
+                case 110:
+                case 95:
+                case 147:
                 case 41:
                 case 57:
                 case 53:
                 case 25:
-                case 135:
-                case 99:
-                case 127:
+                case 137:
+                case 100:
+                case 128:
                 case 14:
                 case 15:
                     return true;
-                case 97:
+                case 98:
                     return !inStartOfParameter;
                 case 40:
                     return !inStartOfParameter && lookAhead(nextTokenIsNumericOrBigIntLiteral);
@@ -25156,17 +26636,17 @@ var ts;
         }
         function parseInferType() {
             var pos = getNodePos();
-            parseExpected(135);
+            parseExpected(137);
             return finishNode(factory.createInferTypeNode(parseTypeParameterOfInferType()), pos);
         }
         function parseTypeOperatorOrHigher() {
             var operator = token();
             switch (operator) {
-                case 138:
-                case 151:
-                case 142:
+                case 140:
+                case 153:
+                case 144:
                     return parseTypeOperator(operator);
-                case 135:
+                case 137:
                     return parseInferType();
             }
             return parsePostfixTypeOrHigher();
@@ -25213,7 +26693,7 @@ var ts;
         }
         function nextTokenIsNewKeyword() {
             nextToken();
-            return token() === 102;
+            return token() === 103;
         }
         function isStartOfFunctionTypeOrConstructorType() {
             if (token() === 29) {
@@ -25222,14 +26702,14 @@ var ts;
             if (token() === 20 && lookAhead(isUnambiguouslyStartOfFunctionType)) {
                 return true;
             }
-            return token() === 102 ||
-                token() === 125 && lookAhead(nextTokenIsNewKeyword);
+            return token() === 103 ||
+                token() === 126 && lookAhead(nextTokenIsNewKeyword);
         }
         function skipParameterStart() {
             if (ts.isModifierKind(token())) {
                 parseModifiers();
             }
-            if (isIdentifier() || token() === 107) {
+            if (isIdentifier() || token() === 108) {
                 nextToken();
                 return true;
             }
@@ -25247,7 +26727,7 @@ var ts;
             }
             if (skipParameterStart()) {
                 if (token() === 58 || token() === 27 ||
-                    token() === 57 || token() === 62) {
+                    token() === 57 || token() === 63) {
                     return true;
                 }
                 if (token() === 21) {
@@ -25272,16 +26752,16 @@ var ts;
         }
         function parseTypePredicatePrefix() {
             var id = parseIdentifier();
-            if (token() === 137 && !scanner.hasPrecedingLineBreak()) {
+            if (token() === 139 && !scanner.hasPrecedingLineBreak()) {
                 nextToken();
                 return id;
             }
         }
         function parseAssertsTypePredicate() {
             var pos = getNodePos();
-            var assertsModifier = parseExpectedToken(127);
-            var parameterName = token() === 107 ? parseThisTypeNode() : parseIdentifier();
-            var type = parseOptional(137) ? parseType() : undefined;
+            var assertsModifier = parseExpectedToken(128);
+            var parameterName = token() === 108 ? parseThisTypeNode() : parseIdentifier();
+            var type = parseOptional(139) ? parseType() : undefined;
             return finishNode(factory.createTypePredicateNode(assertsModifier, parameterName, type), pos);
         }
         function parseType() {
@@ -25293,7 +26773,7 @@ var ts;
             }
             var pos = getNodePos();
             var type = parseUnionTypeOrHigher();
-            if (!noConditionalTypes && !scanner.hasPrecedingLineBreak() && parseOptional(93)) {
+            if (!noConditionalTypes && !scanner.hasPrecedingLineBreak() && parseOptional(94)) {
                 var extendsType = parseTypeWorker(true);
                 parseExpected(57);
                 var trueType = parseTypeWorker();
@@ -25308,11 +26788,11 @@ var ts;
         }
         function isStartOfLeftHandSideExpression() {
             switch (token()) {
-                case 107:
-                case 105:
-                case 103:
-                case 109:
-                case 94:
+                case 108:
+                case 106:
+                case 104:
+                case 110:
+                case 95:
                 case 8:
                 case 9:
                 case 10:
@@ -25321,14 +26801,14 @@ var ts;
                 case 20:
                 case 22:
                 case 18:
-                case 97:
-                case 83:
-                case 102:
+                case 98:
+                case 84:
+                case 103:
                 case 43:
-                case 67:
-                case 78:
+                case 68:
+                case 79:
                     return true;
-                case 99:
+                case 100:
                     return lookAhead(nextTokenIsOpenParenOrLessThanOrDot);
                 default:
                     return isIdentifier();
@@ -25343,15 +26823,15 @@ var ts;
                 case 40:
                 case 54:
                 case 53:
-                case 88:
-                case 111:
-                case 113:
+                case 89:
+                case 112:
+                case 114:
                 case 45:
                 case 46:
                 case 29:
-                case 130:
-                case 124:
-                case 79:
+                case 132:
+                case 125:
+                case 80:
                     return true;
                 default:
                     if (isBinaryOperator()) {
@@ -25362,8 +26842,8 @@ var ts;
         }
         function isStartOfExpressionStatement() {
             return token() !== 18 &&
-                token() !== 97 &&
-                token() !== 83 &&
+                token() !== 98 &&
+                token() !== 84 &&
                 token() !== 59 &&
                 isStartOfExpression();
         }
@@ -25384,7 +26864,7 @@ var ts;
             return expr;
         }
         function parseInitializer() {
-            return parseOptional(62) ? parseAssignmentExpressionOrHigher() : undefined;
+            return parseOptional(63) ? parseAssignmentExpressionOrHigher() : undefined;
         }
         function parseAssignmentExpressionOrHigher() {
             if (isYieldExpression()) {
@@ -25396,7 +26876,7 @@ var ts;
             }
             var pos = getNodePos();
             var expr = parseBinaryExpressionOrHigher(0);
-            if (expr.kind === 78 && token() === 38) {
+            if (expr.kind === 79 && token() === 38) {
                 return parseSimpleArrowFunctionExpression(pos, expr, undefined);
             }
             if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
@@ -25405,7 +26885,7 @@ var ts;
             return parseConditionalExpressionRest(expr, pos);
         }
         function isYieldExpression() {
-            if (token() === 124) {
+            if (token() === 125) {
                 if (inYieldContext()) {
                     return true;
                 }
@@ -25448,7 +26928,7 @@ var ts;
                 tryParse(parsePossibleParenthesizedArrowFunctionExpression);
         }
         function isParenthesizedArrowFunctionExpression() {
-            if (token() === 20 || token() === 29 || token() === 129) {
+            if (token() === 20 || token() === 29 || token() === 131) {
                 return lookAhead(isParenthesizedArrowFunctionExpressionWorker);
             }
             if (token() === 38) {
@@ -25457,7 +26937,7 @@ var ts;
             return 0;
         }
         function isParenthesizedArrowFunctionExpressionWorker() {
-            if (token() === 129) {
+            if (token() === 131) {
                 nextToken();
                 if (scanner.hasPrecedingLineBreak()) {
                     return 0;
@@ -25486,10 +26966,10 @@ var ts;
                 if (second === 25) {
                     return 1;
                 }
-                if (ts.isModifierKind(second) && second !== 129 && lookAhead(nextTokenIsIdentifier)) {
+                if (ts.isModifierKind(second) && second !== 131 && lookAhead(nextTokenIsIdentifier)) {
                     return 1;
                 }
-                if (!isIdentifier() && second !== 107) {
+                if (!isIdentifier() && second !== 108) {
                     return 0;
                 }
                 switch (nextToken()) {
@@ -25497,12 +26977,12 @@ var ts;
                         return 1;
                     case 57:
                         nextToken();
-                        if (token() === 58 || token() === 27 || token() === 62 || token() === 21) {
+                        if (token() === 58 || token() === 27 || token() === 63 || token() === 21) {
                             return 1;
                         }
                         return 0;
                     case 27:
-                    case 62:
+                    case 63:
                     case 21:
                         return 2;
                 }
@@ -25516,10 +26996,10 @@ var ts;
                 if (languageVariant === 1) {
                     var isArrowFunctionInJsx = lookAhead(function () {
                         var third = nextToken();
-                        if (third === 93) {
+                        if (third === 94) {
                             var fourth = nextToken();
                             switch (fourth) {
-                                case 62:
+                                case 63:
                                 case 31:
                                     return false;
                                 default:
@@ -25551,7 +27031,7 @@ var ts;
             return result;
         }
         function tryParseAsyncSimpleArrowFunctionExpression() {
-            if (token() === 129) {
+            if (token() === 131) {
                 if (lookAhead(isUnParenthesizedAsyncArrowFunctionWorker) === 1) {
                     var pos = getNodePos();
                     var asyncModifier = parseModifiersForArrowFunction();
@@ -25562,13 +27042,13 @@ var ts;
             return undefined;
         }
         function isUnParenthesizedAsyncArrowFunctionWorker() {
-            if (token() === 129) {
+            if (token() === 131) {
                 nextToken();
                 if (scanner.hasPrecedingLineBreak() || token() === 38) {
                     return 0;
                 }
                 var expr = parseBinaryExpressionOrHigher(0);
-                if (!scanner.hasPrecedingLineBreak() && expr.kind === 78 && token() === 38) {
+                if (!scanner.hasPrecedingLineBreak() && expr.kind === 79 && token() === 38) {
                     return 1;
                 }
             }
@@ -25614,8 +27094,8 @@ var ts;
                 return parseFunctionBlock(isAsync ? 2 : 0);
             }
             if (token() !== 26 &&
-                token() !== 97 &&
-                token() !== 83 &&
+                token() !== 98 &&
+                token() !== 84 &&
                 isStartOfStatement() &&
                 !isStartOfExpressionStatement()) {
                 return parseFunctionBlock(16 | (isAsync ? 2 : 0));
@@ -25636,7 +27116,7 @@ var ts;
             var colonToken;
             return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, parseAssignmentExpressionOrHigher), colonToken = parseExpectedToken(58), ts.nodeIsPresent(colonToken)
                 ? parseAssignmentExpressionOrHigher()
-                : createMissingNode(78, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
+                : createMissingNode(79, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
         }
         function parseBinaryExpressionOrHigher(precedence) {
             var pos = getNodePos();
@@ -25644,7 +27124,7 @@ var ts;
             return parseBinaryExpressionRest(precedence, leftOperand, pos);
         }
         function isInOrOfKeyword(t) {
-            return t === 100 || t === 156;
+            return t === 101 || t === 159;
         }
         function parseBinaryExpressionRest(precedence, leftOperand, pos) {
             while (true) {
@@ -25656,10 +27136,10 @@ var ts;
                 if (!consumeCurrentOperator) {
                     break;
                 }
-                if (token() === 100 && inDisallowInContext()) {
+                if (token() === 101 && inDisallowInContext()) {
                     break;
                 }
-                if (token() === 126) {
+                if (token() === 127) {
                     if (scanner.hasPrecedingLineBreak()) {
                         break;
                     }
@@ -25675,7 +27155,7 @@ var ts;
             return leftOperand;
         }
         function isBinaryOperator() {
-            if (inDisallowInContext() && token() === 100) {
+            if (inDisallowInContext() && token() === 101) {
                 return false;
             }
             return ts.getBinaryOperatorPrecedence(token()) > 0;
@@ -25703,7 +27183,7 @@ var ts;
             return finishNode(factory.createVoidExpression(nextTokenAnd(parseSimpleUnaryExpression)), pos);
         }
         function isAwaitExpression() {
-            if (token() === 130) {
+            if (token() === 132) {
                 if (inAwaitContext()) {
                     return true;
                 }
@@ -25728,7 +27208,7 @@ var ts;
             if (token() === 42) {
                 var pos = ts.skipTrivia(sourceText, simpleUnaryExpression.pos);
                 var end = simpleUnaryExpression.end;
-                if (simpleUnaryExpression.kind === 206) {
+                if (simpleUnaryExpression.kind === 210) {
                     parseErrorAt(pos, end, ts.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
                 }
                 else {
@@ -25744,15 +27224,15 @@ var ts;
                 case 54:
                 case 53:
                     return parsePrefixUnaryExpression();
-                case 88:
+                case 89:
                     return parseDeleteExpression();
-                case 111:
+                case 112:
                     return parseTypeOfExpression();
-                case 113:
+                case 114:
                     return parseVoidExpression();
                 case 29:
                     return parseTypeAssertion();
-                case 130:
+                case 132:
                     if (isAwaitExpression()) {
                         return parseAwaitExpression();
                     }
@@ -25766,10 +27246,10 @@ var ts;
                 case 40:
                 case 54:
                 case 53:
-                case 88:
-                case 111:
-                case 113:
-                case 130:
+                case 89:
+                case 112:
+                case 114:
+                case 132:
                     return false;
                 case 29:
                     if (languageVariant !== 1) {
@@ -25799,7 +27279,7 @@ var ts;
         function parseLeftHandSideExpressionOrHigher() {
             var pos = getNodePos();
             var expression;
-            if (token() === 99) {
+            if (token() === 100) {
                 if (lookAhead(nextTokenIsOpenParenOrLessThan)) {
                     sourceFlags |= 1048576;
                     expression = parseTokenNode();
@@ -25807,7 +27287,7 @@ var ts;
                 else if (lookAhead(nextTokenIsDot)) {
                     nextToken();
                     nextToken();
-                    expression = finishNode(factory.createMetaProperty(99, parseIdentifierName()), pos);
+                    expression = finishNode(factory.createMetaProperty(100, parseIdentifierName()), pos);
                     sourceFlags |= 2097152;
                 }
                 else {
@@ -25815,7 +27295,7 @@ var ts;
                 }
             }
             else {
-                expression = token() === 105 ? parseSuperExpression() : parseMemberExpressionOrHigher();
+                expression = token() === 106 ? parseSuperExpression() : parseMemberExpressionOrHigher();
             }
             return parseCallExpressionRest(pos, expression);
         }
@@ -25840,23 +27320,40 @@ var ts;
             parseExpectedToken(24, ts.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access);
             return finishNode(factory.createPropertyAccessExpression(expression, parseRightSideOfDot(true, true)), pos);
         }
-        function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition) {
+        function parseJsxElementOrSelfClosingElementOrFragment(inExpressionContext, topInvalidNodePosition, openingTag) {
             var pos = getNodePos();
             var opening = parseJsxOpeningOrSelfClosingElementOrOpeningFragment(inExpressionContext);
             var result;
-            if (opening.kind === 275) {
+            if (opening.kind === 279) {
                 var children = parseJsxChildren(opening);
-                var closingElement = parseJsxClosingElement(inExpressionContext);
-                if (!tagNamesAreEquivalent(opening.tagName, closingElement.tagName)) {
-                    parseErrorAtRange(closingElement, ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, opening.tagName));
+                var closingElement = void 0;
+                var lastChild = children[children.length - 1];
+                if ((lastChild === null || lastChild === void 0 ? void 0 : lastChild.kind) === 277
+                    && !tagNamesAreEquivalent(lastChild.openingElement.tagName, lastChild.closingElement.tagName)
+                    && tagNamesAreEquivalent(opening.tagName, lastChild.closingElement.tagName)) {
+                    var end = lastChild.children.end;
+                    var newLast = finishNode(factory.createJsxElement(lastChild.openingElement, lastChild.children, finishNode(factory.createJsxClosingElement(finishNode(factory.createIdentifier(""), end, end)), end, end)), lastChild.openingElement.pos, end);
+                    children = createNodeArray(__spreadArray(__spreadArray([], children.slice(0, children.length - 1), true), [newLast], false), children.pos, end);
+                    closingElement = lastChild.closingElement;
+                }
+                else {
+                    closingElement = parseJsxClosingElement(opening, inExpressionContext);
+                    if (!tagNamesAreEquivalent(opening.tagName, closingElement.tagName)) {
+                        if (openingTag && ts.isJsxOpeningElement(openingTag) && tagNamesAreEquivalent(closingElement.tagName, openingTag.tagName)) {
+                            parseErrorAtRange(opening.tagName, ts.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag, ts.getTextOfNodeFromSourceText(sourceText, opening.tagName));
+                        }
+                        else {
+                            parseErrorAtRange(closingElement.tagName, ts.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0, ts.getTextOfNodeFromSourceText(sourceText, opening.tagName));
+                        }
+                    }
                 }
                 result = finishNode(factory.createJsxElement(opening, children, closingElement), pos);
             }
-            else if (opening.kind === 278) {
+            else if (opening.kind === 282) {
                 result = finishNode(factory.createJsxFragment(opening, parseJsxChildren(opening), parseJsxClosingFragment(inExpressionContext)), pos);
             }
             else {
-                ts.Debug.assert(opening.kind === 274);
+                ts.Debug.assert(opening.kind === 278);
                 result = opening;
             }
             if (inExpressionContext && token() === 29) {
@@ -25898,7 +27395,7 @@ var ts;
                 case 18:
                     return parseJsxExpression(false);
                 case 29:
-                    return parseJsxElementOrSelfClosingElementOrFragment(false);
+                    return parseJsxElementOrSelfClosingElementOrFragment(false, undefined, openingTag);
                 default:
                     return ts.Debug.assertNever(token);
             }
@@ -25913,6 +27410,12 @@ var ts;
                 if (!child)
                     break;
                 list.push(child);
+                if (ts.isJsxOpeningElement(openingTag)
+                    && (child === null || child === void 0 ? void 0 : child.kind) === 277
+                    && !tagNamesAreEquivalent(child.openingElement.tagName, child.closingElement.tagName)
+                    && tagNamesAreEquivalent(openingTag.tagName, child.closingElement.tagName)) {
+                    break;
+                }
             }
             parsingContext = saveParsingContext;
             return createNodeArray(list, listPos);
@@ -25938,12 +27441,13 @@ var ts;
             }
             else {
                 parseExpected(43);
-                if (inExpressionContext) {
-                    parseExpected(31);
-                }
-                else {
-                    parseExpected(31, undefined, false);
-                    scanJsxText();
+                if (parseExpected(31, undefined, false)) {
+                    if (inExpressionContext) {
+                        nextToken();
+                    }
+                    else {
+                        scanJsxText();
+                    }
                 }
                 node = factory.createJsxSelfClosingElement(tagName, typeArguments, attributes);
             }
@@ -25952,7 +27456,7 @@ var ts;
         function parseJsxElementName() {
             var pos = getNodePos();
             scanJsxIdentifier();
-            var expression = token() === 107 ?
+            var expression = token() === 108 ?
                 parseTokenNode() : parseIdentifierName();
             while (parseOptional(24)) {
                 expression = finishNode(factory.createPropertyAccessExpression(expression, parseRightSideOfDot(true, false)), pos);
@@ -25986,7 +27490,7 @@ var ts;
             }
             scanJsxIdentifier();
             var pos = getNodePos();
-            return finishNode(factory.createJsxAttribute(parseIdentifierName(), token() !== 62 ? undefined :
+            return finishNode(factory.createJsxAttribute(parseIdentifierName(), token() !== 63 ? undefined :
                 scanJsxAttributeValue() === 10 ? parseLiteralNode() :
                     parseJsxExpression(true)), pos);
         }
@@ -25998,16 +27502,17 @@ var ts;
             parseExpected(19);
             return finishNode(factory.createJsxSpreadAttribute(expression), pos);
         }
-        function parseJsxClosingElement(inExpressionContext) {
+        function parseJsxClosingElement(open, inExpressionContext) {
             var pos = getNodePos();
             parseExpected(30);
             var tagName = parseJsxElementName();
-            if (inExpressionContext) {
-                parseExpected(31);
-            }
-            else {
-                parseExpected(31, undefined, false);
-                scanJsxText();
+            if (parseExpected(31, undefined, false)) {
+                if (inExpressionContext || !tagNamesAreEquivalent(open.tagName, tagName)) {
+                    nextToken();
+                }
+                else {
+                    scanJsxText();
+                }
             }
             return finishNode(factory.createJsxClosingElement(tagName), pos);
         }
@@ -26017,12 +27522,13 @@ var ts;
             if (ts.tokenIsIdentifierOrKeyword(token())) {
                 parseErrorAtRange(parseJsxElementName(), ts.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);
             }
-            if (inExpressionContext) {
-                parseExpected(31);
-            }
-            else {
-                parseExpected(31, undefined, false);
-                scanJsxText();
+            if (parseExpected(31, undefined, false)) {
+                if (inExpressionContext) {
+                    nextToken();
+                }
+                else {
+                    scanJsxText();
+                }
             }
             return finishNode(factory.createJsxJsxClosingFragment(), pos);
         }
@@ -26077,7 +27583,7 @@ var ts;
         function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
             var argumentExpression;
             if (token() === 23) {
-                argumentExpression = createMissingNode(78, true, ts.Diagnostics.An_element_access_expression_should_take_an_argument);
+                argumentExpression = createMissingNode(79, true, ts.Diagnostics.An_element_access_expression_should_take_an_argument);
             }
             else {
                 var argument = allowInAnd(parseExpression);
@@ -26164,7 +27670,7 @@ var ts;
                     continue;
                 }
                 if (questionDotToken) {
-                    var name = createMissingNode(78, false, ts.Diagnostics.Identifier_expected);
+                    var name = createMissingNode(79, false, ts.Diagnostics.Identifier_expected);
                     expression = finishNode(factory.createPropertyAccessChain(expression, questionDotToken, name), pos);
                 }
                 break;
@@ -26230,11 +27736,11 @@ var ts;
                 case 10:
                 case 14:
                     return parseLiteralNode();
-                case 107:
-                case 105:
-                case 103:
-                case 109:
-                case 94:
+                case 108:
+                case 106:
+                case 104:
+                case 110:
+                case 95:
                     return parseTokenNode();
                 case 20:
                     return parseParenthesizedExpression();
@@ -26242,25 +27748,27 @@ var ts;
                     return parseArrayLiteralExpression();
                 case 18:
                     return parseObjectLiteralExpression();
-                case 129:
+                case 131:
                     if (!lookAhead(nextTokenIsFunctionKeywordOnSameLine)) {
                         break;
                     }
                     return parseFunctionExpression();
-                case 83:
+                case 84:
                     return parseClassExpression();
-                case 97:
+                case 98:
                     return parseFunctionExpression();
-                case 102:
+                case 103:
                     return parseNewExpressionOrNewDotTarget();
                 case 43:
-                case 67:
+                case 68:
                     if (reScanSlashToken() === 13) {
                         return parseLiteralNode();
                     }
                     break;
                 case 15:
                     return parseTemplateExpression(false);
+                case 80:
+                    return parsePrivateIdentifier();
             }
             return parseIdentifier(ts.Diagnostics.Expression_expected);
         }
@@ -26303,11 +27811,11 @@ var ts;
             }
             var decorators = parseDecorators();
             var modifiers = parseModifiers();
-            if (parseContextualModifier(134)) {
-                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 167);
+            if (parseContextualModifier(136)) {
+                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 171);
             }
-            if (parseContextualModifier(146)) {
-                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 168);
+            if (parseContextualModifier(148)) {
+                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 172);
             }
             var asteriskToken = parseOptionalToken(41);
             var tokenIsIdentifier = isIdentifier();
@@ -26320,7 +27828,7 @@ var ts;
             var node;
             var isShorthandPropertyAssignment = tokenIsIdentifier && (token() !== 58);
             if (isShorthandPropertyAssignment) {
-                var equalsToken = parseOptionalToken(62);
+                var equalsToken = parseOptionalToken(63);
                 var objectAssignmentInitializer = equalsToken ? allowInAnd(parseAssignmentExpressionOrHigher) : undefined;
                 node = factory.createShorthandPropertyAssignment(name, objectAssignmentInitializer);
                 node.equalsToken = equalsToken;
@@ -26351,14 +27859,12 @@ var ts;
             return finishNode(factory.createObjectLiteralExpression(properties, multiLine), pos);
         }
         function parseFunctionExpression() {
-            var saveDecoratorContext = inDecoratorContext();
-            if (saveDecoratorContext) {
-                setDecoratorContext(false);
-            }
+            var savedDecoratorContext = inDecoratorContext();
+            setDecoratorContext(false);
             var pos = getNodePos();
             var hasJSDoc = hasPrecedingJSDocComment();
             var modifiers = parseModifiers();
-            parseExpected(97);
+            parseExpected(98);
             var asteriskToken = parseOptionalToken(41);
             var isGenerator = asteriskToken ? 1 : 0;
             var isAsync = ts.some(modifiers, ts.isAsyncModifier) ? 2 : 0;
@@ -26370,9 +27876,7 @@ var ts;
             var parameters = parseParameters(isGenerator | isAsync);
             var type = parseReturnType(58, false);
             var body = parseFunctionBlock(isGenerator | isAsync);
-            if (saveDecoratorContext) {
-                setDecoratorContext(true);
-            }
+            setDecoratorContext(savedDecoratorContext);
             var node = factory.createFunctionExpression(modifiers, asteriskToken, name, typeParameters, parameters, type, body);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
@@ -26381,10 +27885,10 @@ var ts;
         }
         function parseNewExpressionOrNewDotTarget() {
             var pos = getNodePos();
-            parseExpected(102);
+            parseExpected(103);
             if (parseOptional(24)) {
                 var name = parseIdentifierName();
-                return finishNode(factory.createMetaProperty(102, name), pos);
+                return finishNode(factory.createMetaProperty(103, name), pos);
             }
             var expressionPos = getNodePos();
             var expression = parsePrimaryExpression();
@@ -26410,6 +27914,7 @@ var ts;
         }
         function parseBlock(ignoreMissingOpenBrace, diagnosticMessage) {
             var pos = getNodePos();
+            var hasJSDoc = hasPrecedingJSDocComment();
             var openBracePosition = scanner.getTokenPos();
             if (parseExpected(18, diagnosticMessage) || ignoreMissingOpenBrace) {
                 var multiLine = scanner.hasPrecedingLineBreak();
@@ -26420,11 +27925,16 @@ var ts;
                         ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
                     }
                 }
-                return finishNode(factory.createBlock(statements, multiLine), pos);
+                var result = withJSDoc(finishNode(factory.createBlock(statements, multiLine), pos), hasJSDoc);
+                if (token() === 63) {
+                    parseErrorAtCurrentToken(ts.Diagnostics.Declaration_or_statement_expected_This_follows_a_block_of_statements_so_if_you_intended_to_write_a_destructuring_assignment_you_might_need_to_wrap_the_the_whole_assignment_in_parentheses);
+                    nextToken();
+                }
+                return result;
             }
             else {
                 var statements = createMissingList();
-                return finishNode(factory.createBlock(statements, undefined), pos);
+                return withJSDoc(finishNode(factory.createBlock(statements, undefined), pos), hasJSDoc);
             }
         }
         function parseFunctionBlock(flags, diagnosticMessage) {
@@ -26449,47 +27959,52 @@ var ts;
         }
         function parseEmptyStatement() {
             var pos = getNodePos();
+            var hasJSDoc = hasPrecedingJSDocComment();
             parseExpected(26);
-            return finishNode(factory.createEmptyStatement(), pos);
+            return withJSDoc(finishNode(factory.createEmptyStatement(), pos), hasJSDoc);
         }
         function parseIfStatement() {
             var pos = getNodePos();
-            parseExpected(98);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(99);
             parseExpected(20);
             var expression = allowInAnd(parseExpression);
             parseExpected(21);
             var thenStatement = parseStatement();
-            var elseStatement = parseOptional(90) ? parseStatement() : undefined;
-            return finishNode(factory.createIfStatement(expression, thenStatement, elseStatement), pos);
+            var elseStatement = parseOptional(91) ? parseStatement() : undefined;
+            return withJSDoc(finishNode(factory.createIfStatement(expression, thenStatement, elseStatement), pos), hasJSDoc);
         }
         function parseDoStatement() {
             var pos = getNodePos();
-            parseExpected(89);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(90);
             var statement = parseStatement();
-            parseExpected(114);
+            parseExpected(115);
             parseExpected(20);
             var expression = allowInAnd(parseExpression);
             parseExpected(21);
             parseOptional(26);
-            return finishNode(factory.createDoStatement(statement, expression), pos);
+            return withJSDoc(finishNode(factory.createDoStatement(statement, expression), pos), hasJSDoc);
         }
         function parseWhileStatement() {
             var pos = getNodePos();
-            parseExpected(114);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(115);
             parseExpected(20);
             var expression = allowInAnd(parseExpression);
             parseExpected(21);
             var statement = parseStatement();
-            return finishNode(factory.createWhileStatement(expression, statement), pos);
+            return withJSDoc(finishNode(factory.createWhileStatement(expression, statement), pos), hasJSDoc);
         }
         function parseForOrForInOrForOfStatement() {
             var pos = getNodePos();
-            parseExpected(96);
-            var awaitToken = parseOptionalToken(130);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(97);
+            var awaitToken = parseOptionalToken(132);
             parseExpected(20);
             var initializer;
             if (token() !== 26) {
-                if (token() === 112 || token() === 118 || token() === 84) {
+                if (token() === 113 || token() === 119 || token() === 85) {
                     initializer = parseVariableDeclarationList(true);
                 }
                 else {
@@ -26497,12 +28012,12 @@ var ts;
                 }
             }
             var node;
-            if (awaitToken ? parseExpected(156) : parseOptional(156)) {
+            if (awaitToken ? parseExpected(159) : parseOptional(159)) {
                 var expression = allowInAnd(parseAssignmentExpressionOrHigher);
                 parseExpected(21);
                 node = factory.createForOfStatement(awaitToken, initializer, expression, parseStatement());
             }
-            else if (parseOptional(100)) {
+            else if (parseOptional(101)) {
                 var expression = allowInAnd(parseExpression);
                 parseExpected(21);
                 node = factory.createForInStatement(initializer, expression, parseStatement());
@@ -26519,37 +28034,40 @@ var ts;
                 parseExpected(21);
                 node = factory.createForStatement(initializer, condition, incrementor, parseStatement());
             }
-            return finishNode(node, pos);
+            return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseBreakOrContinueStatement(kind) {
             var pos = getNodePos();
-            parseExpected(kind === 241 ? 80 : 85);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(kind === 245 ? 81 : 86);
             var label = canParseSemicolon() ? undefined : parseIdentifier();
             parseSemicolon();
-            var node = kind === 241
+            var node = kind === 245
                 ? factory.createBreakStatement(label)
                 : factory.createContinueStatement(label);
-            return finishNode(node, pos);
+            return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseReturnStatement() {
             var pos = getNodePos();
-            parseExpected(104);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(105);
             var expression = canParseSemicolon() ? undefined : allowInAnd(parseExpression);
             parseSemicolon();
-            return finishNode(factory.createReturnStatement(expression), pos);
+            return withJSDoc(finishNode(factory.createReturnStatement(expression), pos), hasJSDoc);
         }
         function parseWithStatement() {
             var pos = getNodePos();
-            parseExpected(115);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(116);
             parseExpected(20);
             var expression = allowInAnd(parseExpression);
             parseExpected(21);
             var statement = doInsideOfContext(16777216, parseStatement);
-            return finishNode(factory.createWithStatement(expression, statement), pos);
+            return withJSDoc(finishNode(factory.createWithStatement(expression, statement), pos), hasJSDoc);
         }
         function parseCaseClause() {
             var pos = getNodePos();
-            parseExpected(81);
+            parseExpected(82);
             var expression = allowInAnd(parseExpression);
             parseExpected(58);
             var statements = parseList(3, parseStatement);
@@ -26557,13 +28075,13 @@ var ts;
         }
         function parseDefaultClause() {
             var pos = getNodePos();
-            parseExpected(87);
+            parseExpected(88);
             parseExpected(58);
             var statements = parseList(3, parseStatement);
             return finishNode(factory.createDefaultClause(statements), pos);
         }
         function parseCaseOrDefaultClause() {
-            return token() === 81 ? parseCaseClause() : parseDefaultClause();
+            return token() === 82 ? parseCaseClause() : parseDefaultClause();
         }
         function parseCaseBlock() {
             var pos = getNodePos();
@@ -26574,39 +28092,44 @@ var ts;
         }
         function parseSwitchStatement() {
             var pos = getNodePos();
-            parseExpected(106);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(107);
             parseExpected(20);
             var expression = allowInAnd(parseExpression);
             parseExpected(21);
             var caseBlock = parseCaseBlock();
-            return finishNode(factory.createSwitchStatement(expression, caseBlock), pos);
+            return withJSDoc(finishNode(factory.createSwitchStatement(expression, caseBlock), pos), hasJSDoc);
         }
         function parseThrowStatement() {
             var pos = getNodePos();
-            parseExpected(108);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(109);
             var expression = scanner.hasPrecedingLineBreak() ? undefined : allowInAnd(parseExpression);
             if (expression === undefined) {
                 identifierCount++;
                 expression = finishNode(factory.createIdentifier(""), getNodePos());
             }
-            parseSemicolon();
-            return finishNode(factory.createThrowStatement(expression), pos);
+            if (!tryParseSemicolon()) {
+                parseErrorForMissingSemicolonAfter(expression);
+            }
+            return withJSDoc(finishNode(factory.createThrowStatement(expression), pos), hasJSDoc);
         }
         function parseTryStatement() {
             var pos = getNodePos();
-            parseExpected(110);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(111);
             var tryBlock = parseBlock(false);
-            var catchClause = token() === 82 ? parseCatchClause() : undefined;
+            var catchClause = token() === 83 ? parseCatchClause() : undefined;
             var finallyBlock;
-            if (!catchClause || token() === 95) {
-                parseExpected(95);
+            if (!catchClause || token() === 96) {
+                parseExpected(96);
                 finallyBlock = parseBlock(false);
             }
-            return finishNode(factory.createTryStatement(tryBlock, catchClause, finallyBlock), pos);
+            return withJSDoc(finishNode(factory.createTryStatement(tryBlock, catchClause, finallyBlock), pos), hasJSDoc);
         }
         function parseCatchClause() {
             var pos = getNodePos();
-            parseExpected(82);
+            parseExpected(83);
             var variableDeclaration;
             if (parseOptional(20)) {
                 variableDeclaration = parseVariableDeclaration();
@@ -26620,9 +28143,10 @@ var ts;
         }
         function parseDebuggerStatement() {
             var pos = getNodePos();
-            parseExpected(86);
+            var hasJSDoc = hasPrecedingJSDocComment();
+            parseExpected(87);
             parseSemicolon();
-            return finishNode(factory.createDebuggerStatement(), pos);
+            return withJSDoc(finishNode(factory.createDebuggerStatement(), pos), hasJSDoc);
         }
         function parseExpressionOrLabeledStatement() {
             var pos = getNodePos();
@@ -26634,7 +28158,9 @@ var ts;
                 node = factory.createLabeledStatement(expression, parseStatement());
             }
             else {
-                parseSemicolon();
+                if (!tryParseSemicolon()) {
+                    parseErrorForMissingSemicolonAfter(expression);
+                }
                 node = factory.createExpressionStatement(expression);
                 if (hasParen) {
                     hasJSDoc = false;
@@ -26648,11 +28174,11 @@ var ts;
         }
         function nextTokenIsClassKeywordOnSameLine() {
             nextToken();
-            return token() === 83 && !scanner.hasPrecedingLineBreak();
+            return token() === 84 && !scanner.hasPrecedingLineBreak();
         }
         function nextTokenIsFunctionKeywordOnSameLine() {
             nextToken();
-            return token() === 97 && !scanner.hasPrecedingLineBreak();
+            return token() === 98 && !scanner.hasPrecedingLineBreak();
         }
         function nextTokenIsIdentifierOrKeywordOrLiteralOnSameLine() {
             nextToken();
@@ -26661,50 +28187,50 @@ var ts;
         function isDeclaration() {
             while (true) {
                 switch (token()) {
-                    case 112:
-                    case 118:
+                    case 113:
+                    case 119:
+                    case 85:
+                    case 98:
                     case 84:
-                    case 97:
-                    case 83:
-                    case 91:
+                    case 92:
                         return true;
-                    case 117:
-                    case 149:
+                    case 118:
+                    case 151:
                         return nextTokenIsIdentifierOnSameLine();
-                    case 139:
-                    case 140:
+                    case 141:
+                    case 142:
                         return nextTokenIsIdentifierOrStringLiteralOnSameLine();
-                    case 125:
-                    case 129:
-                    case 133:
-                    case 120:
+                    case 126:
+                    case 131:
+                    case 135:
                     case 121:
                     case 122:
-                    case 142:
+                    case 123:
+                    case 144:
                         nextToken();
                         if (scanner.hasPrecedingLineBreak()) {
                             return false;
                         }
                         continue;
-                    case 154:
+                    case 156:
                         nextToken();
-                        return token() === 18 || token() === 78 || token() === 92;
-                    case 99:
+                        return token() === 18 || token() === 79 || token() === 93;
+                    case 100:
                         nextToken();
                         return token() === 10 || token() === 41 ||
                             token() === 18 || ts.tokenIsIdentifierOrKeyword(token());
-                    case 92:
+                    case 93:
                         var currentToken_1 = nextToken();
-                        if (currentToken_1 === 149) {
+                        if (currentToken_1 === 151) {
                             currentToken_1 = lookAhead(nextToken);
                         }
-                        if (currentToken_1 === 62 || currentToken_1 === 41 ||
-                            currentToken_1 === 18 || currentToken_1 === 87 ||
-                            currentToken_1 === 126) {
+                        if (currentToken_1 === 63 || currentToken_1 === 41 ||
+                            currentToken_1 === 18 || currentToken_1 === 88 ||
+                            currentToken_1 === 127) {
                             return true;
                         }
                         continue;
-                    case 123:
+                    case 124:
                         nextToken();
                         continue;
                     default:
@@ -26720,55 +28246,55 @@ var ts;
                 case 59:
                 case 26:
                 case 18:
-                case 112:
-                case 118:
-                case 97:
-                case 83:
-                case 91:
+                case 113:
+                case 119:
                 case 98:
-                case 89:
-                case 114:
-                case 96:
-                case 85:
-                case 80:
-                case 104:
+                case 84:
+                case 92:
+                case 99:
+                case 90:
                 case 115:
-                case 106:
-                case 108:
-                case 110:
+                case 97:
                 case 86:
-                case 82:
-                case 95:
+                case 81:
+                case 105:
+                case 116:
+                case 107:
+                case 109:
+                case 111:
+                case 87:
+                case 83:
+                case 96:
                     return true;
-                case 99:
+                case 100:
                     return isStartOfDeclaration() || lookAhead(nextTokenIsOpenParenOrLessThanOrDot);
-                case 84:
-                case 92:
+                case 85:
+                case 93:
                     return isStartOfDeclaration();
-                case 129:
-                case 133:
-                case 117:
-                case 139:
-                case 140:
-                case 149:
-                case 154:
+                case 131:
+                case 135:
+                case 118:
+                case 141:
+                case 142:
+                case 151:
+                case 156:
                     return true;
-                case 122:
-                case 120:
-                case 121:
                 case 123:
-                case 142:
+                case 121:
+                case 122:
+                case 124:
+                case 144:
                     return isStartOfDeclaration() || !lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine);
                 default:
                     return isStartOfExpression();
             }
         }
-        function nextTokenIsIdentifierOrStartOfDestructuring() {
+        function nextTokenIsBindingIdentifierOrStartOfDestructuring() {
             nextToken();
-            return isIdentifier() || token() === 18 || token() === 22;
+            return isBindingIdentifier() || token() === 18 || token() === 22;
         }
         function isLetDeclaration() {
-            return lookAhead(nextTokenIsIdentifierOrStartOfDestructuring);
+            return lookAhead(nextTokenIsBindingIdentifierOrStartOfDestructuring);
         }
         function parseStatement() {
             switch (token()) {
@@ -26776,62 +28302,62 @@ var ts;
                     return parseEmptyStatement();
                 case 18:
                     return parseBlock(false);
-                case 112:
+                case 113:
                     return parseVariableStatement(getNodePos(), hasPrecedingJSDocComment(), undefined, undefined);
-                case 118:
+                case 119:
                     if (isLetDeclaration()) {
                         return parseVariableStatement(getNodePos(), hasPrecedingJSDocComment(), undefined, undefined);
                     }
                     break;
-                case 97:
+                case 98:
                     return parseFunctionDeclaration(getNodePos(), hasPrecedingJSDocComment(), undefined, undefined);
-                case 83:
+                case 84:
                     return parseClassDeclaration(getNodePos(), hasPrecedingJSDocComment(), undefined, undefined);
-                case 98:
+                case 99:
                     return parseIfStatement();
-                case 89:
+                case 90:
                     return parseDoStatement();
-                case 114:
+                case 115:
                     return parseWhileStatement();
-                case 96:
+                case 97:
                     return parseForOrForInOrForOfStatement();
-                case 85:
-                    return parseBreakOrContinueStatement(240);
-                case 80:
-                    return parseBreakOrContinueStatement(241);
-                case 104:
+                case 86:
+                    return parseBreakOrContinueStatement(244);
+                case 81:
+                    return parseBreakOrContinueStatement(245);
+                case 105:
                     return parseReturnStatement();
-                case 115:
+                case 116:
                     return parseWithStatement();
-                case 106:
+                case 107:
                     return parseSwitchStatement();
-                case 108:
+                case 109:
                     return parseThrowStatement();
-                case 110:
-                case 82:
-                case 95:
+                case 111:
+                case 83:
+                case 96:
                     return parseTryStatement();
-                case 86:
+                case 87:
                     return parseDebuggerStatement();
                 case 59:
                     return parseDeclaration();
-                case 129:
-                case 117:
-                case 149:
-                case 139:
-                case 140:
-                case 133:
-                case 84:
-                case 91:
+                case 131:
+                case 118:
+                case 151:
+                case 141:
+                case 142:
+                case 135:
+                case 85:
                 case 92:
-                case 99:
-                case 120:
+                case 93:
+                case 100:
                 case 121:
                 case 122:
-                case 125:
                 case 123:
-                case 142:
-                case 154:
+                case 126:
+                case 124:
+                case 144:
+                case 156:
                     if (isStartOfDeclaration()) {
                         return parseDeclaration();
                     }
@@ -26840,7 +28366,7 @@ var ts;
             return parseExpressionOrLabeledStatement();
         }
         function isDeclareModifier(modifier) {
-            return modifier.kind === 133;
+            return modifier.kind === 135;
         }
         function parseDeclaration() {
             var isAmbient = ts.some(lookAhead(function () { return (parseDecorators(), parseModifiers()); }), isDeclareModifier);
@@ -26875,40 +28401,40 @@ var ts;
         }
         function parseDeclarationWorker(pos, hasJSDoc, decorators, modifiers) {
             switch (token()) {
-                case 112:
-                case 118:
-                case 84:
+                case 113:
+                case 119:
+                case 85:
                     return parseVariableStatement(pos, hasJSDoc, decorators, modifiers);
-                case 97:
+                case 98:
                     return parseFunctionDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 83:
+                case 84:
                     return parseClassDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 117:
+                case 118:
                     return parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 149:
+                case 151:
                     return parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 91:
+                case 92:
                     return parseEnumDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 154:
-                case 139:
-                case 140:
+                case 156:
+                case 141:
+                case 142:
                     return parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 99:
+                case 100:
                     return parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, decorators, modifiers);
-                case 92:
+                case 93:
                     nextToken();
                     switch (token()) {
-                        case 87:
-                        case 62:
+                        case 88:
+                        case 63:
                             return parseExportAssignment(pos, hasJSDoc, decorators, modifiers);
-                        case 126:
+                        case 127:
                             return parseNamespaceExportDeclaration(pos, hasJSDoc, decorators, modifiers);
                         default:
                             return parseExportDeclaration(pos, hasJSDoc, decorators, modifiers);
                     }
                 default:
                     if (decorators || modifiers) {
-                        var missing = createMissingNode(271, true, ts.Diagnostics.Declaration_expected);
+                        var missing = createMissingNode(275, true, ts.Diagnostics.Declaration_expected);
                         ts.setTextRangePos(missing, pos);
                         missing.decorators = decorators;
                         missing.modifiers = modifiers;
@@ -26972,7 +28498,7 @@ var ts;
         function isBindingIdentifierOrPrivateIdentifierOrPattern() {
             return token() === 18
                 || token() === 22
-                || token() === 79
+                || token() === 80
                 || isBindingIdentifier();
         }
         function parseIdentifierOrPattern(privateIdentifierDiagnosticMessage) {
@@ -26989,27 +28515,28 @@ var ts;
         }
         function parseVariableDeclaration(allowExclamation) {
             var pos = getNodePos();
+            var hasJSDoc = hasPrecedingJSDocComment();
             var name = parseIdentifierOrPattern(ts.Diagnostics.Private_identifiers_are_not_allowed_in_variable_declarations);
             var exclamationToken;
-            if (allowExclamation && name.kind === 78 &&
+            if (allowExclamation && name.kind === 79 &&
                 token() === 53 && !scanner.hasPrecedingLineBreak()) {
                 exclamationToken = parseTokenNode();
             }
             var type = parseTypeAnnotation();
             var initializer = isInOrOfKeyword(token()) ? undefined : parseInitializer();
             var node = factory.createVariableDeclaration(name, exclamationToken, type, initializer);
-            return finishNode(node, pos);
+            return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseVariableDeclarationList(inForStatementInitializer) {
             var pos = getNodePos();
             var flags = 0;
             switch (token()) {
-                case 112:
+                case 113:
                     break;
-                case 118:
+                case 119:
                     flags |= 1;
                     break;
-                case 84:
+                case 85:
                     flags |= 2;
                     break;
                 default:
@@ -27017,7 +28544,7 @@ var ts;
             }
             nextToken();
             var declarations;
-            if (token() === 156 && lookAhead(canFollowContextualOfKeyword)) {
+            if (token() === 159 && lookAhead(canFollowContextualOfKeyword)) {
                 declarations = createMissingList();
             }
             else {
@@ -27041,7 +28568,7 @@ var ts;
         function parseFunctionDeclaration(pos, hasJSDoc, decorators, modifiers) {
             var savedAwaitContext = inAwaitContext();
             var modifierFlags = ts.modifiersToFlags(modifiers);
-            parseExpected(97);
+            parseExpected(98);
             var asteriskToken = parseOptionalToken(41);
             var name = modifierFlags & 512 ? parseOptionalBindingIdentifier() : parseBindingIdentifier();
             var isGenerator = asteriskToken ? 1 : 0;
@@ -27057,8 +28584,8 @@ var ts;
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseConstructorName() {
-            if (token() === 132) {
-                return parseExpected(132);
+            if (token() === 134) {
+                return parseExpected(134);
             }
             if (token() === 10 && lookAhead(nextToken) === 20) {
                 return tryParse(function () {
@@ -27096,7 +28623,7 @@ var ts;
             var exclamationToken = !questionToken && !scanner.hasPrecedingLineBreak() ? parseOptionalToken(53) : undefined;
             var type = parseTypeAnnotation();
             var initializer = doOutsideOfContext(8192 | 32768 | 4096, parseInitializer);
-            parseSemicolon();
+            parseSemicolonAfterPropertyName(name, type, initializer);
             var node = factory.createPropertyDeclaration(decorators, modifiers, name, questionToken || exclamationToken, type, initializer);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
@@ -27115,11 +28642,11 @@ var ts;
             var parameters = parseParameters(0);
             var type = parseReturnType(58, false);
             var body = parseFunctionBlockOrSemicolon(0);
-            var node = kind === 167
+            var node = kind === 171
                 ? factory.createGetAccessorDeclaration(decorators, modifiers, name, parameters, type, body)
                 : factory.createSetAccessorDeclaration(decorators, modifiers, name, parameters, body);
             node.typeParameters = typeParameters;
-            if (type && node.kind === 168)
+            if (type && node.kind === 172)
                 node.type = type;
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
@@ -27146,7 +28673,7 @@ var ts;
                 return true;
             }
             if (idToken !== undefined) {
-                if (!ts.isKeyword(idToken) || idToken === 146 || idToken === 134) {
+                if (!ts.isKeyword(idToken) || idToken === 148 || idToken === 136) {
                     return true;
                 }
                 switch (token()) {
@@ -27154,7 +28681,7 @@ var ts;
                     case 29:
                     case 53:
                     case 58:
-                    case 62:
+                    case 63:
                     case 57:
                         return true;
                     default:
@@ -27163,8 +28690,23 @@ var ts;
             }
             return false;
         }
+        function parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers) {
+            parseExpectedToken(124);
+            var body = parseClassStaticBlockBody();
+            return withJSDoc(finishNode(factory.createClassStaticBlockDeclaration(decorators, modifiers, body), pos), hasJSDoc);
+        }
+        function parseClassStaticBlockBody() {
+            var savedYieldContext = inYieldContext();
+            var savedAwaitContext = inAwaitContext();
+            setYieldContext(false);
+            setAwaitContext(true);
+            var body = parseBlock(false);
+            setYieldContext(savedYieldContext);
+            setAwaitContext(savedAwaitContext);
+            return body;
+        }
         function parseDecoratorExpression() {
-            if (inAwaitContext() && token() === 130) {
+            if (inAwaitContext() && token() === 132) {
                 var pos = getNodePos();
                 var awaitExpression = parseIdentifier(ts.Diagnostics.Expression_expected);
                 nextToken();
@@ -27189,14 +28731,20 @@ var ts;
             }
             return list && createNodeArray(list, pos);
         }
-        function tryParseModifier(permitInvalidConstAsModifier) {
+        function tryParseModifier(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStaticModifier) {
             var pos = getNodePos();
             var kind = token();
-            if (token() === 84 && permitInvalidConstAsModifier) {
+            if (token() === 85 && permitInvalidConstAsModifier) {
                 if (!tryParse(nextTokenIsOnSameLineAndCanFollowModifier)) {
                     return undefined;
                 }
             }
+            else if (stopOnStartOfClassStaticBlock && token() === 124 && lookAhead(nextTokenIsOpenBrace)) {
+                return undefined;
+            }
+            else if (hasSeenStaticModifier && token() === 124) {
+                return undefined;
+            }
             else {
                 if (!parseAnyContextualModifier()) {
                     return undefined;
@@ -27204,20 +28752,22 @@ var ts;
             }
             return finishNode(factory.createToken(kind), pos);
         }
-        function parseModifiers(permitInvalidConstAsModifier) {
+        function parseModifiers(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock) {
             var pos = getNodePos();
-            var list, modifier;
-            while (modifier = tryParseModifier(permitInvalidConstAsModifier)) {
+            var list, modifier, hasSeenStatic = false;
+            while (modifier = tryParseModifier(permitInvalidConstAsModifier, stopOnStartOfClassStaticBlock, hasSeenStatic)) {
+                if (modifier.kind === 124)
+                    hasSeenStatic = true;
                 list = ts.append(list, modifier);
             }
             return list && createNodeArray(list, pos);
         }
         function parseModifiersForArrowFunction() {
             var modifiers;
-            if (token() === 129) {
+            if (token() === 131) {
                 var pos = getNodePos();
                 nextToken();
-                var modifier = finishNode(factory.createToken(129), pos);
+                var modifier = finishNode(factory.createToken(131), pos);
                 modifiers = createNodeArray([modifier], pos);
             }
             return modifiers;
@@ -27230,14 +28780,17 @@ var ts;
             }
             var hasJSDoc = hasPrecedingJSDocComment();
             var decorators = parseDecorators();
-            var modifiers = parseModifiers(true);
-            if (parseContextualModifier(134)) {
-                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 167);
+            var modifiers = parseModifiers(true, true);
+            if (token() === 124 && lookAhead(nextTokenIsOpenBrace)) {
+                return parseClassStaticBlockDeclaration(pos, hasJSDoc, decorators, modifiers);
             }
-            if (parseContextualModifier(146)) {
-                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 168);
+            if (parseContextualModifier(136)) {
+                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 171);
             }
-            if (token() === 132 || token() === 10) {
+            if (parseContextualModifier(148)) {
+                return parseAccessorDeclaration(pos, hasJSDoc, decorators, modifiers, 172);
+            }
+            if (token() === 134 || token() === 10) {
                 var constructorDeclaration = tryParseConstructorDeclaration(pos, hasJSDoc, decorators, modifiers);
                 if (constructorDeclaration) {
                     return constructorDeclaration;
@@ -27264,20 +28817,20 @@ var ts;
                 }
             }
             if (decorators || modifiers) {
-                var name = createMissingNode(78, true, ts.Diagnostics.Declaration_expected);
+                var name = createMissingNode(79, true, ts.Diagnostics.Declaration_expected);
                 return parsePropertyDeclaration(pos, hasJSDoc, decorators, modifiers, name, undefined);
             }
             return ts.Debug.fail("Should not have attempted to parse class member declaration.");
         }
         function parseClassExpression() {
-            return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), undefined, undefined, 221);
+            return parseClassDeclarationOrExpression(getNodePos(), hasPrecedingJSDocComment(), undefined, undefined, 225);
         }
         function parseClassDeclaration(pos, hasJSDoc, decorators, modifiers) {
-            return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 252);
+            return parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, 256);
         }
         function parseClassDeclarationOrExpression(pos, hasJSDoc, decorators, modifiers, kind) {
             var savedAwaitContext = inAwaitContext();
-            parseExpected(83);
+            parseExpected(84);
             var name = parseNameOfClassDeclarationOrExpression();
             var typeParameters = parseTypeParameters();
             if (ts.some(modifiers, ts.isExportModifier))
@@ -27292,7 +28845,7 @@ var ts;
                 members = createMissingList();
             }
             setAwaitContext(savedAwaitContext);
-            var node = kind === 252
+            var node = kind === 256
                 ? factory.createClassDeclaration(decorators, modifiers, name, typeParameters, heritageClauses, members)
                 : factory.createClassExpression(decorators, modifiers, name, typeParameters, heritageClauses, members);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
@@ -27303,7 +28856,7 @@ var ts;
                 : undefined;
         }
         function isImplementsClause() {
-            return token() === 116 && lookAhead(nextTokenIsIdentifierOrKeyword);
+            return token() === 117 && lookAhead(nextTokenIsIdentifierOrKeyword);
         }
         function parseHeritageClauses() {
             if (isHeritageClause()) {
@@ -27314,7 +28867,7 @@ var ts;
         function parseHeritageClause() {
             var pos = getNodePos();
             var tok = token();
-            ts.Debug.assert(tok === 93 || tok === 116);
+            ts.Debug.assert(tok === 94 || tok === 117);
             nextToken();
             var types = parseDelimitedList(7, parseExpressionWithTypeArguments);
             return finishNode(factory.createHeritageClause(tok, types), pos);
@@ -27330,13 +28883,13 @@ var ts;
                 parseBracketedList(20, parseType, 29, 31) : undefined;
         }
         function isHeritageClause() {
-            return token() === 93 || token() === 116;
+            return token() === 94 || token() === 117;
         }
         function parseClassMembers() {
             return parseList(5, parseClassElement);
         }
         function parseInterfaceDeclaration(pos, hasJSDoc, decorators, modifiers) {
-            parseExpected(117);
+            parseExpected(118);
             var name = parseIdentifier();
             var typeParameters = parseTypeParameters();
             var heritageClauses = parseHeritageClauses();
@@ -27345,11 +28898,11 @@ var ts;
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
-            parseExpected(149);
+            parseExpected(151);
             var name = parseIdentifier();
             var typeParameters = parseTypeParameters();
-            parseExpected(62);
-            var type = token() === 136 && tryParse(parseKeywordAndNoDot) || parseType();
+            parseExpected(63);
+            var type = token() === 138 && tryParse(parseKeywordAndNoDot) || parseType();
             parseSemicolon();
             var node = factory.createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
@@ -27362,7 +28915,7 @@ var ts;
             return withJSDoc(finishNode(factory.createEnumMember(name, initializer), pos), hasJSDoc);
         }
         function parseEnumDeclaration(pos, hasJSDoc, decorators, modifiers) {
-            parseExpected(91);
+            parseExpected(92);
             var name = parseIdentifier();
             var members;
             if (parseExpected(18)) {
@@ -27399,7 +28952,7 @@ var ts;
         function parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
             var flags = 0;
             var name;
-            if (token() === 154) {
+            if (token() === 156) {
                 name = parseIdentifier();
                 flags |= 1024;
             }
@@ -27419,14 +28972,14 @@ var ts;
         }
         function parseModuleDeclaration(pos, hasJSDoc, decorators, modifiers) {
             var flags = 0;
-            if (token() === 154) {
+            if (token() === 156) {
                 return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers);
             }
-            else if (parseOptional(140)) {
+            else if (parseOptional(142)) {
                 flags |= 16;
             }
             else {
-                parseExpected(139);
+                parseExpected(141);
                 if (token() === 10) {
                     return parseAmbientExternalModuleDeclaration(pos, hasJSDoc, decorators, modifiers);
                 }
@@ -27434,18 +28987,21 @@ var ts;
             return parseModuleOrNamespaceDeclaration(pos, hasJSDoc, decorators, modifiers, flags);
         }
         function isExternalModuleReference() {
-            return token() === 143 &&
+            return token() === 145 &&
                 lookAhead(nextTokenIsOpenParen);
         }
         function nextTokenIsOpenParen() {
             return nextToken() === 20;
         }
+        function nextTokenIsOpenBrace() {
+            return nextToken() === 18;
+        }
         function nextTokenIsSlash() {
             return nextToken() === 43;
         }
         function parseNamespaceExportDeclaration(pos, hasJSDoc, decorators, modifiers) {
-            parseExpected(126);
-            parseExpected(140);
+            parseExpected(127);
+            parseExpected(142);
             var name = parseIdentifier();
             parseSemicolon();
             var node = factory.createNamespaceExportDeclaration(name);
@@ -27454,14 +29010,14 @@ var ts;
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseImportDeclarationOrImportEqualsDeclaration(pos, hasJSDoc, decorators, modifiers) {
-            parseExpected(99);
+            parseExpected(100);
             var afterImportPos = scanner.getStartPos();
             var identifier;
             if (isIdentifier()) {
                 identifier = parseIdentifier();
             }
             var isTypeOnly = false;
-            if (token() !== 153 &&
+            if (token() !== 155 &&
                 (identifier === null || identifier === void 0 ? void 0 : identifier.escapedText) === "type" &&
                 (isIdentifier() || tokenAfterImportDefinitelyProducesImportDeclaration())) {
                 isTypeOnly = true;
@@ -27475,21 +29031,52 @@ var ts;
                 token() === 41 ||
                 token() === 18) {
                 importClause = parseImportClause(identifier, afterImportPos, isTypeOnly);
-                parseExpected(153);
+                parseExpected(155);
             }
             var moduleSpecifier = parseModuleSpecifier();
+            var assertClause;
+            if (token() === 129 && !scanner.hasPrecedingLineBreak()) {
+                assertClause = parseAssertClause();
+            }
             parseSemicolon();
-            var node = factory.createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier);
+            var node = factory.createImportDeclaration(decorators, modifiers, importClause, moduleSpecifier, assertClause);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
+        function parseAssertEntry() {
+            var pos = getNodePos();
+            var name = ts.tokenIsIdentifierOrKeyword(token()) ? parseIdentifierName() : parseLiteralLikeNode(10);
+            parseExpected(58);
+            var value = parseLiteralLikeNode(10);
+            return finishNode(factory.createAssertEntry(name, value), pos);
+        }
+        function parseAssertClause() {
+            var pos = getNodePos();
+            parseExpected(129);
+            var openBracePosition = scanner.getTokenPos();
+            if (parseExpected(18)) {
+                var multiLine = scanner.hasPrecedingLineBreak();
+                var elements = parseDelimitedList(24, parseAssertEntry, true);
+                if (!parseExpected(19)) {
+                    var lastError = ts.lastOrUndefined(parseDiagnostics);
+                    if (lastError && lastError.code === ts.Diagnostics._0_expected.code) {
+                        ts.addRelatedInfo(lastError, ts.createDetachedDiagnostic(fileName, openBracePosition, 1, ts.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
+                    }
+                }
+                return finishNode(factory.createAssertClause(elements, multiLine), pos);
+            }
+            else {
+                var elements = createNodeArray([], getNodePos(), undefined, false);
+                return finishNode(factory.createAssertClause(elements, false), pos);
+            }
+        }
         function tokenAfterImportDefinitelyProducesImportDeclaration() {
             return token() === 41 || token() === 18;
         }
         function tokenAfterImportedIdentifierDefinitelyProducesImportDeclaration() {
-            return token() === 27 || token() === 153;
+            return token() === 27 || token() === 155;
         }
         function parseImportEqualsDeclaration(pos, hasJSDoc, decorators, modifiers, identifier, isTypeOnly) {
-            parseExpected(62);
+            parseExpected(63);
             var moduleReference = parseModuleReference();
             parseSemicolon();
             var node = factory.createImportEqualsDeclaration(decorators, modifiers, isTypeOnly, identifier, moduleReference);
@@ -27500,7 +29087,7 @@ var ts;
             var namedBindings;
             if (!identifier ||
                 parseOptional(27)) {
-                namedBindings = token() === 41 ? parseNamespaceImport() : parseNamedImportsOrExports(264);
+                namedBindings = token() === 41 ? parseNamespaceImport() : parseNamedImportsOrExports(268);
             }
             return finishNode(factory.createImportClause(isTypeOnly, identifier, namedBindings), pos);
         }
@@ -27511,7 +29098,7 @@ var ts;
         }
         function parseExternalModuleReference() {
             var pos = getNodePos();
-            parseExpected(143);
+            parseExpected(145);
             parseExpected(20);
             var expression = parseModuleSpecifier();
             parseExpected(21);
@@ -27530,49 +29117,82 @@ var ts;
         function parseNamespaceImport() {
             var pos = getNodePos();
             parseExpected(41);
-            parseExpected(126);
+            parseExpected(127);
             var name = parseIdentifier();
             return finishNode(factory.createNamespaceImport(name), pos);
         }
         function parseNamedImportsOrExports(kind) {
             var pos = getNodePos();
-            var node = kind === 264
+            var node = kind === 268
                 ? factory.createNamedImports(parseBracketedList(23, parseImportSpecifier, 18, 19))
                 : factory.createNamedExports(parseBracketedList(23, parseExportSpecifier, 18, 19));
             return finishNode(node, pos);
         }
         function parseExportSpecifier() {
-            return parseImportOrExportSpecifier(270);
+            return parseImportOrExportSpecifier(274);
         }
         function parseImportSpecifier() {
-            return parseImportOrExportSpecifier(265);
+            return parseImportOrExportSpecifier(269);
         }
         function parseImportOrExportSpecifier(kind) {
             var pos = getNodePos();
             var checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier();
             var checkIdentifierStart = scanner.getTokenPos();
             var checkIdentifierEnd = scanner.getTextPos();
-            var identifierName = parseIdentifierName();
+            var isTypeOnly = false;
             var propertyName;
-            var name;
-            if (token() === 126) {
-                propertyName = identifierName;
-                parseExpected(126);
-                checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier();
-                checkIdentifierStart = scanner.getTokenPos();
-                checkIdentifierEnd = scanner.getTextPos();
-                name = parseIdentifierName();
+            var canParseAsKeyword = true;
+            var name = parseIdentifierName();
+            if (name.escapedText === "type") {
+                if (token() === 127) {
+                    var firstAs = parseIdentifierName();
+                    if (token() === 127) {
+                        var secondAs = parseIdentifierName();
+                        if (ts.tokenIsIdentifierOrKeyword(token())) {
+                            isTypeOnly = true;
+                            propertyName = firstAs;
+                            name = parseNameWithKeywordCheck();
+                            canParseAsKeyword = false;
+                        }
+                        else {
+                            propertyName = name;
+                            name = secondAs;
+                            canParseAsKeyword = false;
+                        }
+                    }
+                    else if (ts.tokenIsIdentifierOrKeyword(token())) {
+                        propertyName = name;
+                        canParseAsKeyword = false;
+                        name = parseNameWithKeywordCheck();
+                    }
+                    else {
+                        isTypeOnly = true;
+                        name = firstAs;
+                    }
+                }
+                else if (ts.tokenIsIdentifierOrKeyword(token())) {
+                    isTypeOnly = true;
+                    name = parseNameWithKeywordCheck();
+                }
             }
-            else {
-                name = identifierName;
+            if (canParseAsKeyword && token() === 127) {
+                propertyName = name;
+                parseExpected(127);
+                name = parseNameWithKeywordCheck();
             }
-            if (kind === 265 && checkIdentifierIsKeyword) {
+            if (kind === 269 && checkIdentifierIsKeyword) {
                 parseErrorAt(checkIdentifierStart, checkIdentifierEnd, ts.Diagnostics.Identifier_expected);
             }
-            var node = kind === 265
-                ? factory.createImportSpecifier(propertyName, name)
-                : factory.createExportSpecifier(propertyName, name);
+            var node = kind === 269
+                ? factory.createImportSpecifier(isTypeOnly, propertyName, name)
+                : factory.createExportSpecifier(isTypeOnly, propertyName, name);
             return finishNode(node, pos);
+            function parseNameWithKeywordCheck() {
+                checkIdentifierIsKeyword = ts.isKeyword(token()) && !isIdentifier();
+                checkIdentifierStart = scanner.getTokenPos();
+                checkIdentifierEnd = scanner.getTextPos();
+                return parseIdentifierName();
+            }
         }
         function parseNamespaceExport(pos) {
             return finishNode(factory.createNamespaceExport(parseIdentifierName()), pos);
@@ -27582,36 +29202,40 @@ var ts;
             setAwaitContext(true);
             var exportClause;
             var moduleSpecifier;
-            var isTypeOnly = parseOptional(149);
+            var assertClause;
+            var isTypeOnly = parseOptional(151);
             var namespaceExportPos = getNodePos();
             if (parseOptional(41)) {
-                if (parseOptional(126)) {
+                if (parseOptional(127)) {
                     exportClause = parseNamespaceExport(namespaceExportPos);
                 }
-                parseExpected(153);
+                parseExpected(155);
                 moduleSpecifier = parseModuleSpecifier();
             }
             else {
-                exportClause = parseNamedImportsOrExports(268);
-                if (token() === 153 || (token() === 10 && !scanner.hasPrecedingLineBreak())) {
-                    parseExpected(153);
+                exportClause = parseNamedImportsOrExports(272);
+                if (token() === 155 || (token() === 10 && !scanner.hasPrecedingLineBreak())) {
+                    parseExpected(155);
                     moduleSpecifier = parseModuleSpecifier();
                 }
             }
+            if (moduleSpecifier && token() === 129 && !scanner.hasPrecedingLineBreak()) {
+                assertClause = parseAssertClause();
+            }
             parseSemicolon();
             setAwaitContext(savedAwaitContext);
-            var node = factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier);
+            var node = factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause);
             return withJSDoc(finishNode(node, pos), hasJSDoc);
         }
         function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) {
             var savedAwaitContext = inAwaitContext();
             setAwaitContext(true);
             var isExportEquals;
-            if (parseOptional(62)) {
+            if (parseOptional(63)) {
                 isExportEquals = true;
             }
             else {
-                parseExpected(87);
+                parseExpected(88);
             }
             var expression = parseAssignmentExpressionOrHigher();
             parseSemicolon();
@@ -27625,7 +29249,7 @@ var ts;
                     getImportMetaIfNecessary(sourceFile);
         }
         function isAnExternalModuleIndicatorNode(node) {
-            return hasModifierOfKind(node, 92)
+            return hasModifierOfKind(node, 93)
                 || ts.isImportEqualsDeclaration(node) && ts.isExternalModuleReference(node.moduleReference)
                 || ts.isImportDeclaration(node)
                 || ts.isExportAssignment(node)
@@ -27643,7 +29267,7 @@ var ts;
             return ts.some(node.modifiers, function (m) { return m.kind === kind; });
         }
         function isImportMeta(node) {
-            return ts.isMetaProperty(node) && node.keywordToken === 99 && node.name.escapedText === "meta";
+            return ts.isMetaProperty(node) && node.keywordToken === 100 && node.name.escapedText === "meta";
         }
         var JSDocParser;
         (function (JSDocParser) {
@@ -27676,7 +29300,13 @@ var ts;
             function parseJSDocNameReference() {
                 var pos = getNodePos();
                 var hasBrace = parseOptional(18);
+                var p2 = getNodePos();
                 var entityName = parseEntityName(false);
+                while (token() === 80) {
+                    reScanHashToken();
+                    nextTokenJSDoc();
+                    entityName = finishNode(factory.createJSDocMemberName(entityName, parseIdentifier()), p2);
+                }
                 if (hasBrace) {
                     parseExpectedJSDoc(19);
                 }
@@ -27726,7 +29356,10 @@ var ts;
                 var tags;
                 var tagsPos;
                 var tagsEnd;
+                var linkEnd;
+                var commentsPos;
                 var comments = [];
+                var parts = [];
                 return scanner.scanRange(start + 3, length - 5, function () {
                     var state = 1;
                     var margin;
@@ -27750,6 +29383,8 @@ var ts;
                             case 59:
                                 if (state === 0 || state === 1) {
                                     removeTrailingWhitespace(comments);
+                                    if (!commentsPos)
+                                        commentsPos = getNodePos();
                                     addTag(parseTag(indent));
                                     state = 0;
                                     margin = undefined;
@@ -27786,6 +29421,21 @@ var ts;
                                 break;
                             case 1:
                                 break loop;
+                            case 18:
+                                state = 2;
+                                var commentEnd = scanner.getStartPos();
+                                var linkStart = scanner.getTextPos() - 1;
+                                var link = parseJSDocLink(linkStart);
+                                if (link) {
+                                    if (!linkEnd) {
+                                        removeLeadingNewlines(comments);
+                                    }
+                                    parts.push(finishNode(factory.createJSDocText(comments.join("")), linkEnd !== null && linkEnd !== void 0 ? linkEnd : start, commentEnd));
+                                    parts.push(link);
+                                    comments = [];
+                                    linkEnd = scanner.getTextPos();
+                                    break;
+                                }
                             default:
                                 state = 2;
                                 pushComment(scanner.getTokenText());
@@ -27793,9 +29443,14 @@ var ts;
                         }
                         nextTokenJSDoc();
                     }
-                    removeLeadingNewlines(comments);
                     removeTrailingWhitespace(comments);
-                    return createJSDocComment();
+                    if (parts.length && comments.length) {
+                        parts.push(finishNode(factory.createJSDocText(comments.join("")), linkEnd !== null && linkEnd !== void 0 ? linkEnd : start, commentsPos));
+                    }
+                    if (parts.length && tags)
+                        ts.Debug.assertIsDefined(commentsPos, "having parsed tags implies that the end of the comment span should be set");
+                    var tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd);
+                    return finishNode(factory.createJSDocComment(parts.length ? createNodeArray(parts, start, commentsPos) : comments.length ? comments.join("") : undefined, tagsArray), start, end);
                 });
                 function removeLeadingNewlines(comments) {
                     while (comments.length && (comments[0] === "\n" || comments[0] === "\r")) {
@@ -27807,11 +29462,6 @@ var ts;
                         comments.pop();
                     }
                 }
-                function createJSDocComment() {
-                    var comment = comments.length ? comments.join("") : undefined;
-                    var tagsArray = tags && createNodeArray(tags, tagsPos, tagsEnd);
-                    return finishNode(factory.createJSDocComment(comment, tagsArray), start, end);
-                }
                 function isNextNonwhitespaceTokenEndOfFile() {
                     while (true) {
                         nextTokenJSDoc();
@@ -27890,6 +29540,9 @@ var ts;
                         case "readonly":
                             tag = parseSimpleTag(start, factory.createJSDocReadonlyTag, tagName, margin, indentText);
                             break;
+                        case "override":
+                            tag = parseSimpleTag(start, factory.createJSDocOverrideTag, tagName, margin, indentText);
+                            break;
                         case "deprecated":
                             hasDeprecatedTag = true;
                             tag = parseSimpleTag(start, factory.createJSDocDeprecatedTag, tagName, margin, indentText);
@@ -27936,7 +29589,10 @@ var ts;
                     return parseTagComments(margin, indentText.slice(margin));
                 }
                 function parseTagComments(indent, initialMargin) {
+                    var commentsPos = getNodePos();
                     var comments = [];
+                    var parts = [];
+                    var linkEnd;
                     var state = 0;
                     var previousWhitespace = true;
                     var margin;
@@ -27962,7 +29618,8 @@ var ts;
                                 indent = 0;
                                 break;
                             case 59:
-                                if (state === 3 || !previousWhitespace && state === 2) {
+                                if (state === 3
+                                    || state === 2 && (!previousWhitespace || lookAhead(isNextJSDocTokenWhitespace))) {
                                     comments.push(scanner.getTokenText());
                                     break;
                                 }
@@ -27983,13 +29640,18 @@ var ts;
                                 break;
                             case 18:
                                 state = 2;
-                                if (lookAhead(function () { return nextTokenJSDoc() === 59 && ts.tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && scanner.getTokenText() === "link"; })) {
-                                    pushComment(scanner.getTokenText());
-                                    nextTokenJSDoc();
+                                var commentEnd = scanner.getStartPos();
+                                var linkStart = scanner.getTextPos() - 1;
+                                var link = parseJSDocLink(linkStart);
+                                if (link) {
+                                    parts.push(finishNode(factory.createJSDocText(comments.join("")), linkEnd !== null && linkEnd !== void 0 ? linkEnd : commentsPos, commentEnd));
+                                    parts.push(link);
+                                    comments = [];
+                                    linkEnd = scanner.getTextPos();
+                                }
+                                else {
                                     pushComment(scanner.getTokenText());
-                                    nextTokenJSDoc();
                                 }
-                                pushComment(scanner.getTokenText());
                                 break;
                             case 61:
                                 if (state === 3) {
@@ -28018,11 +29680,61 @@ var ts;
                     }
                     removeLeadingNewlines(comments);
                     removeTrailingWhitespace(comments);
-                    return comments.length === 0 ? undefined : comments.join("");
+                    if (parts.length) {
+                        if (comments.length) {
+                            parts.push(finishNode(factory.createJSDocText(comments.join("")), linkEnd !== null && linkEnd !== void 0 ? linkEnd : commentsPos));
+                        }
+                        return createNodeArray(parts, commentsPos, scanner.getTextPos());
+                    }
+                    else if (comments.length) {
+                        return comments.join("");
+                    }
+                }
+                function isNextJSDocTokenWhitespace() {
+                    var next = nextTokenJSDoc();
+                    return next === 5 || next === 4;
+                }
+                function parseJSDocLink(start) {
+                    var linkType = tryParse(parseJSDocLinkPrefix);
+                    if (!linkType) {
+                        return undefined;
+                    }
+                    nextTokenJSDoc();
+                    skipWhitespace();
+                    var p2 = getNodePos();
+                    var name = ts.tokenIsIdentifierOrKeyword(token())
+                        ? parseEntityName(true)
+                        : undefined;
+                    if (name) {
+                        while (token() === 80) {
+                            reScanHashToken();
+                            nextTokenJSDoc();
+                            name = finishNode(factory.createJSDocMemberName(name, parseIdentifier()), p2);
+                        }
+                    }
+                    var text = [];
+                    while (token() !== 19 && token() !== 4 && token() !== 1) {
+                        text.push(scanner.getTokenText());
+                        nextTokenJSDoc();
+                    }
+                    var create = linkType === "link" ? factory.createJSDocLink
+                        : linkType === "linkcode" ? factory.createJSDocLinkCode
+                            : factory.createJSDocLinkPlain;
+                    return finishNode(create(name, text.join("")), start, scanner.getTextPos());
+                }
+                function parseJSDocLinkPrefix() {
+                    skipWhitespaceOrAsterisk();
+                    if (token() === 18
+                        && nextTokenJSDoc() === 59
+                        && ts.tokenIsIdentifierOrKeyword(nextTokenJSDoc())) {
+                        var kind = scanner.getTokenValue();
+                        if (kind === "link" || kind === "linkcode" || kind === "linkplain") {
+                            return kind;
+                        }
+                    }
                 }
                 function parseUnknownTag(start, tagName, indent, indentText) {
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocUnknownTag(tagName, parseTrailingTagComments(start, end, indent, indentText)), start, end);
+                    return finishNode(factory.createJSDocUnknownTag(tagName, parseTrailingTagComments(start, getNodePos(), indent, indentText)), start);
                 }
                 function addTag(tag) {
                     if (!tag) {
@@ -28053,7 +29765,7 @@ var ts;
                     }
                     if (isBracketed) {
                         skipWhitespace();
-                        if (parseOptionalToken(62)) {
+                        if (parseOptionalToken(63)) {
                             parseExpression();
                         }
                         parseExpected(23);
@@ -28062,9 +29774,9 @@ var ts;
                 }
                 function isObjectOrObjectArrayTypeReference(node) {
                     switch (node.kind) {
-                        case 145:
+                        case 147:
                             return true;
-                        case 178:
+                        case 182:
                             return isObjectOrObjectArrayTypeReference(node.elementType);
                         default:
                             return ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "Object" && !node.typeArguments;
@@ -28076,7 +29788,7 @@ var ts;
                     skipWhitespaceOrAsterisk();
                     var _a = parseBracketNameInPropertyAndParamTag(), name = _a.name, isBracketed = _a.isBracketed;
                     var indentText = skipWhitespaceOrAsterisk();
-                    if (isNameFirst) {
+                    if (isNameFirst && !lookAhead(parseJSDocLinkPrefix)) {
                         typeExpression = tryParseTypeExpression();
                     }
                     var comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
@@ -28096,12 +29808,12 @@ var ts;
                         var child = void 0;
                         var children = void 0;
                         while (child = tryParse(function () { return parseChildParameterOrPropertyTag(target, indent, name); })) {
-                            if (child.kind === 326 || child.kind === 333) {
+                            if (child.kind === 338 || child.kind === 345) {
                                 children = ts.append(children, child);
                             }
                         }
                         if (children) {
-                            var literal = finishNode(factory.createJSDocTypeLiteral(children, typeExpression.type.kind === 178), pos);
+                            var literal = finishNode(factory.createJSDocTypeLiteral(children, typeExpression.type.kind === 182), pos);
                             return finishNode(factory.createJSDocTypeExpression(literal), pos);
                         }
                     }
@@ -28111,27 +29823,35 @@ var ts;
                         parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText);
                     }
                     var typeExpression = tryParseTypeExpression();
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start, end, indent, indentText)), start, end);
+                    return finishNode(factory.createJSDocReturnTag(tagName, typeExpression, parseTrailingTagComments(start, getNodePos(), indent, indentText)), start);
                 }
                 function parseTypeTag(start, tagName, indent, indentText) {
                     if (ts.some(tags, ts.isJSDocTypeTag)) {
                         parseErrorAt(tagName.pos, scanner.getTokenPos(), ts.Diagnostics._0_tag_already_specified, tagName.escapedText);
                     }
                     var typeExpression = parseJSDocTypeExpression(true);
-                    var end = getNodePos();
-                    var comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, end, indent, indentText) : undefined;
-                    return finishNode(factory.createJSDocTypeTag(tagName, typeExpression, comments), start, end);
+                    var comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, getNodePos(), indent, indentText) : undefined;
+                    return finishNode(factory.createJSDocTypeTag(tagName, typeExpression, comments), start);
                 }
                 function parseSeeTag(start, tagName, indent, indentText) {
-                    var nameExpression = parseJSDocNameReference();
-                    var end = getNodePos();
-                    var comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, end, indent, indentText) : undefined;
-                    return finishNode(factory.createJSDocSeeTag(tagName, nameExpression, comments), start, end);
+                    var isMarkdownOrJSDocLink = token() === 22
+                        || lookAhead(function () { return nextTokenJSDoc() === 59 && ts.tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && scanner.getTokenValue() === "link"; });
+                    var nameExpression = isMarkdownOrJSDocLink ? undefined : parseJSDocNameReference();
+                    var comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, getNodePos(), indent, indentText) : undefined;
+                    return finishNode(factory.createJSDocSeeTag(tagName, nameExpression, comments), start);
                 }
                 function parseAuthorTag(start, tagName, indent, indentText) {
-                    var comments = parseAuthorNameAndEmail() + (parseTrailingTagComments(start, end, indent, indentText) || "");
-                    return finishNode(factory.createJSDocAuthorTag(tagName, comments || undefined), start);
+                    var commentStart = getNodePos();
+                    var textOnly = parseAuthorNameAndEmail();
+                    var commentEnd = scanner.getStartPos();
+                    var comments = parseTrailingTagComments(start, commentEnd, indent, indentText);
+                    if (!comments) {
+                        commentEnd = scanner.getStartPos();
+                    }
+                    var allParts = typeof comments !== "string"
+                        ? createNodeArray(ts.concatenate([finishNode(textOnly, commentStart, commentEnd)], comments), commentStart)
+                        : textOnly.text + comments;
+                    return finishNode(factory.createJSDocAuthorTag(tagName, allParts), start);
                 }
                 function parseAuthorNameAndEmail() {
                     var comments = [];
@@ -28152,17 +29872,15 @@ var ts;
                         comments.push(scanner.getTokenText());
                         token = nextTokenJSDoc();
                     }
-                    return comments.join("");
+                    return factory.createJSDocText(comments.join(""));
                 }
                 function parseImplementsTag(start, tagName, margin, indentText) {
                     var className = parseExpressionWithTypeArgumentsForAugments();
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocImplementsTag(tagName, className, parseTrailingTagComments(start, end, margin, indentText)), start, end);
+                    return finishNode(factory.createJSDocImplementsTag(tagName, className, parseTrailingTagComments(start, getNodePos(), margin, indentText)), start);
                 }
                 function parseAugmentsTag(start, tagName, margin, indentText) {
                     var className = parseExpressionWithTypeArgumentsForAugments();
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start, end, margin, indentText)), start, end);
+                    return finishNode(factory.createJSDocAugmentsTag(tagName, className, parseTrailingTagComments(start, getNodePos(), margin, indentText)), start);
                 }
                 function parseExpressionWithTypeArgumentsForAugments() {
                     var usedBrace = parseOptional(18);
@@ -28186,20 +29904,17 @@ var ts;
                     return node;
                 }
                 function parseSimpleTag(start, createTag, tagName, margin, indentText) {
-                    var end = getNodePos();
-                    return finishNode(createTag(tagName, parseTrailingTagComments(start, end, margin, indentText)), start, end);
+                    return finishNode(createTag(tagName, parseTrailingTagComments(start, getNodePos(), margin, indentText)), start);
                 }
                 function parseThisTag(start, tagName, margin, indentText) {
                     var typeExpression = parseJSDocTypeExpression(true);
                     skipWhitespace();
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocThisTag(tagName, typeExpression, parseTrailingTagComments(start, end, margin, indentText)), start, end);
+                    return finishNode(factory.createJSDocThisTag(tagName, typeExpression, parseTrailingTagComments(start, getNodePos(), margin, indentText)), start);
                 }
                 function parseEnumTag(start, tagName, margin, indentText) {
                     var typeExpression = parseJSDocTypeExpression(true);
                     skipWhitespace();
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start, end, margin, indentText)), start, end);
+                    return finishNode(factory.createJSDocEnumTag(tagName, typeExpression, parseTrailingTagComments(start, getNodePos(), margin, indentText)), start);
                 }
                 function parseTypedefTag(start, tagName, indent, indentText) {
                     var _a;
@@ -28216,7 +29931,7 @@ var ts;
                         var hasChildren = false;
                         while (child = tryParse(function () { return parseChildPropertyTag(indent); })) {
                             hasChildren = true;
-                            if (child.kind === 329) {
+                            if (child.kind === 341) {
                                 if (childTypeTag) {
                                     parseErrorAtCurrentToken(ts.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
                                     var lastError = ts.lastOrUndefined(parseDiagnostics);
@@ -28234,7 +29949,7 @@ var ts;
                             }
                         }
                         if (hasChildren) {
-                            var isArrayType = typeExpression && typeExpression.type.kind === 178;
+                            var isArrayType = typeExpression && typeExpression.type.kind === 182;
                             var jsdocTypeLiteral = factory.createJSDocTypeLiteral(jsDocPropertyTags, isArrayType);
                             typeExpression = childTypeTag && childTypeTag.typeExpression && !isObjectOrObjectArrayTypeReference(childTypeTag.typeExpression.type) ?
                                 childTypeTag.typeExpression :
@@ -28284,17 +29999,16 @@ var ts;
                     var returnTag = tryParse(function () {
                         if (parseOptionalJsdoc(59)) {
                             var tag = parseTag(indent);
-                            if (tag && tag.kind === 327) {
+                            if (tag && tag.kind === 339) {
                                 return tag;
                             }
                         }
                     });
                     var typeExpression = finishNode(factory.createJSDocSignature(undefined, parameters, returnTag), start);
-                    var end = getNodePos();
                     if (!comment) {
-                        comment = parseTrailingTagComments(start, end, indent, indentText);
+                        comment = parseTrailingTagComments(start, getNodePos(), indent, indentText);
                     }
-                    return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start, end);
+                    return finishNode(factory.createJSDocCallbackTag(tagName, typeExpression, fullName, comment), start);
                 }
                 function escapedTextsEqual(a, b) {
                     while (!ts.isIdentifier(a) || !ts.isIdentifier(b)) {
@@ -28319,7 +30033,7 @@ var ts;
                             case 59:
                                 if (canParseTag) {
                                     var child = tryParseChildTag(target, indent);
-                                    if (child && (child.kind === 326 || child.kind === 333) &&
+                                    if (child && (child.kind === 338 || child.kind === 345) &&
                                         target !== 4 &&
                                         name && (ts.isIdentifier(child.name) || !escapedTextsEqual(name, child.name.left))) {
                                         return false;
@@ -28338,7 +30052,7 @@ var ts;
                                 }
                                 seenAsterisk = true;
                                 break;
-                            case 78:
+                            case 79:
                                 canParseTag = false;
                                 break;
                             case 1:
@@ -28375,15 +30089,32 @@ var ts;
                 }
                 function parseTemplateTagTypeParameter() {
                     var typeParameterPos = getNodePos();
+                    var isBracketed = parseOptionalJsdoc(22);
+                    if (isBracketed) {
+                        skipWhitespace();
+                    }
                     var name = parseJSDocIdentifierName(ts.Diagnostics.Unexpected_token_A_type_parameter_name_was_expected_without_curly_braces);
-                    return finishNode(factory.createTypeParameterDeclaration(name, undefined, undefined), typeParameterPos);
+                    var defaultType;
+                    if (isBracketed) {
+                        skipWhitespace();
+                        parseExpected(63);
+                        defaultType = doInsideOfContext(4194304, parseJSDocType);
+                        parseExpected(23);
+                    }
+                    if (ts.nodeIsMissing(name)) {
+                        return undefined;
+                    }
+                    return finishNode(factory.createTypeParameterDeclaration(name, undefined, defaultType), typeParameterPos);
                 }
                 function parseTemplateTagTypeParameters() {
                     var pos = getNodePos();
                     var typeParameters = [];
                     do {
                         skipWhitespace();
-                        typeParameters.push(parseTemplateTagTypeParameter());
+                        var node = parseTemplateTagTypeParameter();
+                        if (node !== undefined) {
+                            typeParameters.push(node);
+                        }
                         skipWhitespaceOrAsterisk();
                     } while (parseOptionalJsdoc(27));
                     return createNodeArray(typeParameters, pos);
@@ -28391,8 +30122,7 @@ var ts;
                 function parseTemplateTag(start, tagName, indent, indentText) {
                     var constraint = token() === 18 ? parseJSDocTypeExpression() : undefined;
                     var typeParameters = parseTemplateTagTypeParameters();
-                    var end = getNodePos();
-                    return finishNode(factory.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start, end, indent, indentText)), start, end);
+                    return finishNode(factory.createJSDocTemplateTag(tagName, constraint, typeParameters, parseTrailingTagComments(start, getNodePos(), indent, indentText)), start);
                 }
                 function parseOptionalJsdoc(t) {
                     if (token() === t) {
@@ -28417,7 +30147,7 @@ var ts;
                 }
                 function parseJSDocIdentifierName(message) {
                     if (!ts.tokenIsIdentifierOrKeyword(token())) {
-                        return createMissingNode(78, !message, message || ts.Diagnostics.Identifier_expected);
+                        return createMissingNode(79, !message, message || ts.Diagnostics.Identifier_expected);
                     }
                     identifierCount++;
                     var pos = scanner.getTokenPos();
@@ -28457,6 +30187,7 @@ var ts;
             updateTokenPositionsAndMarkElements(incrementalSourceFile, changeRange.span.start, ts.textSpanEnd(changeRange.span), ts.textSpanEnd(ts.textChangeRangeNewSpan(changeRange)), delta, oldText, newText, aggressiveChecks);
             var result = Parser.parseSourceFile(sourceFile.fileName, newText, sourceFile.languageVersion, syntaxCursor, true, sourceFile.scriptKind);
             result.commentDirectives = getNewCommentDirectives(sourceFile.commentDirectives, result.commentDirectives, changeRange.span.start, ts.textSpanEnd(changeRange.span), delta, oldText, newText, aggressiveChecks);
+            result.impliedNodeFormat = sourceFile.impliedNodeFormat;
             return result;
         }
         IncrementalParser.updateSourceFile = updateSourceFile;
@@ -28529,8 +30260,8 @@ var ts;
             function visitArray(array) {
                 array._children = undefined;
                 ts.setTextRangePosEnd(array, array.pos + delta, array.end + delta);
-                for (var _i = 0, array_8 = array; _i < array_8.length; _i++) {
-                    var node = array_8[_i];
+                for (var _i = 0, array_9 = array; _i < array_9.length; _i++) {
+                    var node = array_9[_i];
                     visitNode(node);
                 }
             }
@@ -28539,7 +30270,7 @@ var ts;
             switch (node.kind) {
                 case 10:
                 case 8:
-                case 78:
+                case 79:
                     return true;
             }
             return false;
@@ -28613,8 +30344,8 @@ var ts;
                     array.intersectsChange = true;
                     array._children = undefined;
                     adjustIntersectingElement(array, changeStart, changeRangeOldEnd, changeRangeNewEnd, delta);
-                    for (var _i = 0, array_9 = array; _i < array_9.length; _i++) {
-                        var node = array_9[_i];
+                    for (var _i = 0, array_10 = array; _i < array_10.length; _i++) {
+                        var node = array_10[_i];
                         visitNode(node);
                     }
                     return;
@@ -28756,7 +30487,7 @@ var ts;
         IncrementalParser.createSyntaxCursor = createSyntaxCursor;
     })(IncrementalParser || (IncrementalParser = {}));
     function isDeclarationFileName(fileName) {
-        return ts.fileExtensionIs(fileName, ".d.ts");
+        return ts.fileExtensionIsOneOf(fileName, [".d.ts", ".d.mts", ".d.cts"]);
     }
     ts.isDeclarationFileName = isDeclarationFileName;
     function processCommentPragmas(context, sourceText) {
@@ -28863,7 +30594,7 @@ var ts;
         if (namedArgRegExCache.has(name)) {
             return namedArgRegExCache.get(name);
         }
-        var result = new RegExp("(\\s" + name + "\\s*=\\s*)('|\")(.+?)\\2", "im");
+        var result = new RegExp("(\\s".concat(name, "\\s*=\\s*)(?:(?:'([^']*)')|(?:\"([^\"]*)\"))"), "im");
         namedArgRegExCache.set(name, result);
         return result;
     }
@@ -28887,16 +30618,17 @@ var ts;
                         return;
                     }
                     else if (matchResult) {
+                        var value = matchResult[2] || matchResult[3];
                         if (arg.captureSpan) {
-                            var startPos = range.pos + matchResult.index + matchResult[1].length + matchResult[2].length;
+                            var startPos = range.pos + matchResult.index + matchResult[1].length + 1;
                             argument[arg.name] = {
-                                value: matchResult[3],
+                                value: value,
                                 pos: startPos,
-                                end: startPos + matchResult[3].length
+                                end: startPos + value.length
                             };
                         }
                         else {
-                            argument[arg.name] = matchResult[3];
+                            argument[arg.name] = value;
                         }
                     }
                 }
@@ -28912,7 +30644,7 @@ var ts;
             return addPragmaForMatch(pragmas, range, 2, singleLine);
         }
         if (range.kind === 3) {
-            var multiLinePragmaRegEx = /\s*@(\S+)\s*(.*)\s*$/gim;
+            var multiLinePragmaRegEx = /@(\S+)(\s+.*)?$/gim;
             var multiLineMatch = void 0;
             while (multiLineMatch = multiLinePragmaRegEx.exec(text)) {
                 addPragmaForMatch(pragmas, range, 4, multiLineMatch);
@@ -28939,7 +30671,7 @@ var ts;
             return {};
         if (!pragma.args)
             return {};
-        var args = text.split(/\s+/);
+        var args = ts.trimString(text).split(/\s+/);
         var argMap = {};
         for (var i = 0; i < pragma.args.length; i++) {
             var argument = pragma.args[i];
@@ -28957,10 +30689,10 @@ var ts;
         if (lhs.kind !== rhs.kind) {
             return false;
         }
-        if (lhs.kind === 78) {
+        if (lhs.kind === 79) {
             return lhs.escapedText === rhs.escapedText;
         }
-        if (lhs.kind === 107) {
+        if (lhs.kind === 108) {
             return true;
         }
         return lhs.name.escapedText === rhs.name.escapedText &&
@@ -28970,7 +30702,7 @@ var ts;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
-    ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean" };
+    ts.compileOnSaveCommandLineOption = { name: "compileOnSave", type: "boolean", defaultValueDescription: "false" };
     var jsxOptionMap = new ts.Map(ts.getEntries({
         "preserve": 1,
         "react-native": 3,
@@ -28992,6 +30724,7 @@ var ts;
         ["es2018", "lib.es2018.d.ts"],
         ["es2019", "lib.es2019.d.ts"],
         ["es2020", "lib.es2020.d.ts"],
+        ["es2021", "lib.es2021.d.ts"],
         ["esnext", "lib.esnext.d.ts"],
         ["dom", "lib.dom.d.ts"],
         ["dom.iterable", "lib.dom.iterable.d.ts"],
@@ -29029,14 +30762,18 @@ var ts;
         ["es2020.string", "lib.es2020.string.d.ts"],
         ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"],
         ["es2020.intl", "lib.es2020.intl.d.ts"],
+        ["es2021.promise", "lib.es2021.promise.d.ts"],
+        ["es2021.string", "lib.es2021.string.d.ts"],
+        ["es2021.weakref", "lib.es2021.weakref.d.ts"],
+        ["es2021.intl", "lib.es2021.intl.d.ts"],
         ["esnext.array", "lib.es2019.array.d.ts"],
         ["esnext.symbol", "lib.es2019.symbol.d.ts"],
         ["esnext.asynciterable", "lib.es2018.asynciterable.d.ts"],
         ["esnext.intl", "lib.esnext.intl.d.ts"],
         ["esnext.bigint", "lib.es2020.bigint.d.ts"],
-        ["esnext.string", "lib.esnext.string.d.ts"],
-        ["esnext.promise", "lib.esnext.promise.d.ts"],
-        ["esnext.weakref", "lib.esnext.weakref.d.ts"]
+        ["esnext.string", "lib.es2021.string.d.ts"],
+        ["esnext.promise", "lib.es2021.promise.d.ts"],
+        ["esnext.weakref", "lib.es2021.weakref.d.ts"]
     ];
     ts.libs = libEntries.map(function (entry) { return entry[0]; });
     ts.libMap = new ts.Map(libEntries);
@@ -29047,11 +30784,12 @@ var ts;
                 fixedpollinginterval: ts.WatchFileKind.FixedPollingInterval,
                 prioritypollinginterval: ts.WatchFileKind.PriorityPollingInterval,
                 dynamicprioritypolling: ts.WatchFileKind.DynamicPriorityPolling,
+                fixedchunksizepolling: ts.WatchFileKind.FixedChunkSizePolling,
                 usefsevents: ts.WatchFileKind.UseFsEvents,
                 usefseventsonparentdirectory: ts.WatchFileKind.UseFsEventsOnParentDirectory,
             })),
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_strategy_for_watching_file_Colon_FixedPollingInterval_default_PriorityPollingInterval_DynamicPriorityPolling_UseFsEvents_UseFsEventsOnParentDirectory,
+            category: ts.Diagnostics.Watch_and_Build_Modes,
+            description: ts.Diagnostics.Specify_how_the_TypeScript_watch_mode_works,
         },
         {
             name: "watchDirectory",
@@ -29059,9 +30797,10 @@ var ts;
                 usefsevents: ts.WatchDirectoryKind.UseFsEvents,
                 fixedpollinginterval: ts.WatchDirectoryKind.FixedPollingInterval,
                 dynamicprioritypolling: ts.WatchDirectoryKind.DynamicPriorityPolling,
+                fixedchunksizepolling: ts.WatchDirectoryKind.FixedChunkSizePolling,
             })),
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_strategy_for_watching_directory_on_platforms_that_don_t_support_recursive_watching_natively_Colon_UseFsEvents_default_FixedPollingInterval_DynamicPriorityPolling,
+            category: ts.Diagnostics.Watch_and_Build_Modes,
+            description: ts.Diagnostics.Specify_how_directories_are_watched_on_systems_that_lack_recursive_file_watching_functionality,
         },
         {
             name: "fallbackPolling",
@@ -29069,15 +30808,17 @@ var ts;
                 fixedinterval: ts.PollingWatchKind.FixedInterval,
                 priorityinterval: ts.PollingWatchKind.PriorityInterval,
                 dynamicpriority: ts.PollingWatchKind.DynamicPriority,
+                fixedchunksize: ts.PollingWatchKind.FixedChunkSize,
             })),
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_strategy_for_creating_a_polling_watch_when_it_fails_to_create_using_file_system_events_Colon_FixedInterval_default_PriorityInterval_DynamicPriority,
+            category: ts.Diagnostics.Watch_and_Build_Modes,
+            description: ts.Diagnostics.Specify_what_approach_the_watcher_should_use_if_the_system_runs_out_of_native_file_watchers,
         },
         {
             name: "synchronousWatchDirectory",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
+            category: ts.Diagnostics.Watch_and_Build_Modes,
             description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
+            defaultValueDescription: "false",
         },
         {
             name: "excludeDirectories",
@@ -29088,8 +30829,8 @@ var ts;
                 isFilePath: true,
                 extraValidation: specToDiagnostic
             },
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
+            category: ts.Diagnostics.Watch_and_Build_Modes,
+            description: ts.Diagnostics.Remove_a_list_of_directories_from_the_watch_process,
         },
         {
             name: "excludeFiles",
@@ -29100,8 +30841,8 @@ var ts;
                 isFilePath: true,
                 extraValidation: specToDiagnostic
             },
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Synchronously_call_callbacks_and_update_the_state_of_directory_watchers_on_platforms_that_don_t_support_recursive_watching_natively,
+            category: ts.Diagnostics.Watch_and_Build_Modes,
+            description: ts.Diagnostics.Remove_a_list_of_files_from_the_watch_mode_s_processing,
         },
     ];
     ts.commonOptionsWithBuild = [
@@ -29112,76 +30853,90 @@ var ts;
             showInSimplifiedHelpView: true,
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Print_this_message,
+            defaultValueDescription: "false",
         },
         {
             name: "help",
             shortName: "?",
-            type: "boolean"
+            type: "boolean",
+            defaultValueDescription: "false",
         },
         {
             name: "watch",
             shortName: "w",
             type: "boolean",
             showInSimplifiedHelpView: true,
+            isCommandLineOnly: true,
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Watch_input_files,
+            defaultValueDescription: "false",
         },
         {
             name: "preserveWatchOutput",
             type: "boolean",
             showInSimplifiedHelpView: false,
-            category: ts.Diagnostics.Command_line_Options,
-            description: ts.Diagnostics.Whether_to_keep_outdated_console_output_in_watch_mode_instead_of_clearing_the_screen,
+            category: ts.Diagnostics.Output_Formatting,
+            description: ts.Diagnostics.Disable_wiping_the_console_in_watch_mode,
+            defaultValueDescription: "false",
         },
         {
             name: "listFiles",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Print_names_of_files_part_of_the_compilation
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Print_all_of_the_files_read_during_the_compilation,
+            defaultValueDescription: "false"
         },
         {
             name: "explainFiles",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Print_names_of_files_and_the_reason_they_are_part_of_the_compilation
-        }, {
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Print_files_read_during_the_compilation_including_why_it_was_included,
+            defaultValueDescription: "false",
+        },
+        {
             name: "listEmittedFiles",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Print_names_of_generated_files_part_of_the_compilation
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Print_the_names_of_emitted_files_after_a_compilation,
+            defaultValueDescription: "false"
         },
         {
             name: "pretty",
             type: "boolean",
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Command_line_Options,
-            description: ts.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental
+            category: ts.Diagnostics.Output_Formatting,
+            description: ts.Diagnostics.Enable_color_and_formatting_in_TypeScript_s_output_to_make_compiler_errors_easier_to_read,
+            defaultValueDescription: "true"
         },
         {
             name: "traceResolution",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Enable_tracing_of_the_name_resolution_process
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Log_paths_used_during_the_moduleResolution_process,
+            defaultValueDescription: "false"
         },
         {
             name: "diagnostics",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Show_diagnostic_information
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Output_compiler_performance_information_after_building,
+            defaultValueDescription: "false"
         },
         {
             name: "extendedDiagnostics",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Show_verbose_diagnostic_information
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Output_more_detailed_compiler_performance_information_after_building,
+            defaultValueDescription: "false"
         },
         {
             name: "generateCpuProfile",
             type: "string",
             isFilePath: true,
             paramType: ts.Diagnostics.FILE_OR_DIRECTORY,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Generates_a_CPU_profile
+            category: ts.Diagnostics.Compiler_Diagnostics,
+            description: ts.Diagnostics.Emit_a_v8_CPU_profile_of_the_compiler_run_for_debugging,
+            defaultValueDescription: "profile.cpuprofile"
         },
         {
             name: "generateTrace",
@@ -29189,30 +30944,34 @@ var ts;
             isFilePath: true,
             isCommandLineOnly: true,
             paramType: ts.Diagnostics.DIRECTORY,
-            category: ts.Diagnostics.Advanced_Options,
+            category: ts.Diagnostics.Compiler_Diagnostics,
             description: ts.Diagnostics.Generates_an_event_trace_and_a_list_of_types
         },
         {
             name: "incremental",
             shortName: "i",
             type: "boolean",
-            category: ts.Diagnostics.Basic_Options,
+            category: ts.Diagnostics.Projects,
             description: ts.Diagnostics.Enable_incremental_compilation,
-            transpileOptionValue: undefined
+            transpileOptionValue: undefined,
+            defaultValueDescription: ts.Diagnostics.false_unless_composite_is_set
         },
         {
             name: "assumeChangesOnlyAffectDirectDependencies",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Have_recompiles_in_incremental_and_watch_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it
+            category: ts.Diagnostics.Watch_and_Build_Modes,
+            description: ts.Diagnostics.Have_recompiles_in_projects_that_use_incremental_and_watch_mode_assume_that_changes_within_a_file_will_only_affect_files_directly_depending_on_it,
+            defaultValueDescription: "false",
         },
         {
             name: "locale",
             type: "string",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.The_locale_used_when_displaying_messages_to_the_user_e_g_en_us
+            category: ts.Diagnostics.Command_line_Options,
+            isCommandLineOnly: true,
+            description: ts.Diagnostics.Set_the_language_of_the_messaging_from_TypeScript_This_does_not_affect_emit,
+            defaultValueDescription: ts.Diagnostics.Platform_specific
         },
     ];
     ts.targetOptionDeclaration = {
@@ -29228,6 +30987,7 @@ var ts;
             es2018: 5,
             es2019: 6,
             es2020: 7,
+            es2021: 8,
             esnext: 99,
         })),
         affectsSourceFile: true,
@@ -29235,16 +30995,18 @@ var ts;
         affectsEmit: true,
         paramType: ts.Diagnostics.VERSION,
         showInSimplifiedHelpView: true,
-        category: ts.Diagnostics.Basic_Options,
-        description: ts.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_ES2015_ES2016_ES2017_ES2018_ES2019_ES2020_or_ESNEXT,
+        category: ts.Diagnostics.Language_and_Environment,
+        description: ts.Diagnostics.Set_the_JavaScript_language_version_for_emitted_JavaScript_and_include_compatible_library_declarations,
+        defaultValueDescription: "ES3"
     };
-    ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild), [
+    var commandOptionsWithoutBuild = [
         {
             name: "all",
             type: "boolean",
             showInSimplifiedHelpView: true,
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Show_all_compiler_options,
+            defaultValueDescription: "false",
         },
         {
             name: "version",
@@ -29253,6 +31015,7 @@ var ts;
             showInSimplifiedHelpView: true,
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Print_the_compiler_s_version,
+            defaultValueDescription: "false",
         },
         {
             name: "init",
@@ -29260,6 +31023,7 @@ var ts;
             showInSimplifiedHelpView: true,
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file,
+            defaultValueDescription: "false",
         },
         {
             name: "project",
@@ -29277,14 +31041,17 @@ var ts;
             shortName: "b",
             showInSimplifiedHelpView: true,
             category: ts.Diagnostics.Command_line_Options,
-            description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date
+            description: ts.Diagnostics.Build_one_or_more_projects_and_their_dependencies_if_out_of_date,
+            defaultValueDescription: "false",
         },
         {
             name: "showConfig",
             type: "boolean",
+            showInSimplifiedHelpView: true,
             category: ts.Diagnostics.Command_line_Options,
             isCommandLineOnly: true,
-            description: ts.Diagnostics.Print_the_final_configuration_instead_of_building
+            description: ts.Diagnostics.Print_the_final_configuration_instead_of_building,
+            defaultValueDescription: "false",
         },
         {
             name: "listFilesOnly",
@@ -29293,7 +31060,8 @@ var ts;
             affectsSemanticDiagnostics: true,
             affectsEmit: true,
             isCommandLineOnly: true,
-            description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing
+            description: ts.Diagnostics.Print_names_of_files_that_are_part_of_the_compilation_and_then_stop_processing,
+            defaultValueDescription: "false",
         },
         ts.targetOptionDeclaration,
         {
@@ -29308,14 +31076,17 @@ var ts;
                 es6: ts.ModuleKind.ES2015,
                 es2015: ts.ModuleKind.ES2015,
                 es2020: ts.ModuleKind.ES2020,
-                esnext: ts.ModuleKind.ESNext
+                es2022: ts.ModuleKind.ES2022,
+                esnext: ts.ModuleKind.ESNext,
+                node12: ts.ModuleKind.Node12,
+                nodenext: ts.ModuleKind.NodeNext,
             })),
             affectsModuleResolution: true,
             affectsEmit: true,
             paramType: ts.Diagnostics.KIND,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Specify_module_code_generation_Colon_none_commonjs_amd_system_umd_es2015_es2020_or_ESNext,
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_what_module_code_is_generated,
         },
         {
             name: "lib",
@@ -29324,10 +31095,10 @@ var ts;
                 name: "lib",
                 type: ts.libMap
             },
-            affectsModuleResolution: true,
+            affectsProgramStructure: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Specify_library_files_to_be_included_in_the_compilation,
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Specify_a_set_of_bundled_library_declaration_files_that_describe_the_target_runtime_environment,
             transpileOptionValue: undefined
         },
         {
@@ -29335,14 +31106,17 @@ var ts;
             type: "boolean",
             affectsModuleResolution: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Allow_javascript_files_to_be_compiled
+            category: ts.Diagnostics.JavaScript_Support,
+            description: ts.Diagnostics.Allow_JavaScript_files_to_be_a_part_of_your_program_Use_the_checkJS_option_to_get_errors_from_these_files,
+            defaultValueDescription: "false"
         },
         {
             name: "checkJs",
             type: "boolean",
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Report_errors_in_js_files
+            showInSimplifiedHelpView: true,
+            category: ts.Diagnostics.JavaScript_Support,
+            description: ts.Diagnostics.Enable_error_reporting_in_type_checked_JavaScript_files,
+            defaultValueDescription: "false"
         },
         {
             name: "jsx",
@@ -29352,8 +31126,9 @@ var ts;
             affectsModuleResolution: true,
             paramType: ts.Diagnostics.KIND,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Specify_JSX_code_generation_Colon_preserve_react_native_react_react_jsx_or_react_jsxdev,
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Specify_what_JSX_code_is_generated,
+            defaultValueDescription: "undefined"
         },
         {
             name: "declaration",
@@ -29361,34 +31136,39 @@ var ts;
             type: "boolean",
             affectsEmit: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Generates_corresponding_d_ts_file,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Emit,
+            transpileOptionValue: undefined,
+            description: ts.Diagnostics.Generate_d_ts_files_from_TypeScript_and_JavaScript_files_in_your_project,
+            defaultValueDescription: ts.Diagnostics.false_unless_composite_is_set,
         },
         {
             name: "declarationMap",
             type: "boolean",
             affectsEmit: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Generates_a_sourcemap_for_each_corresponding_d_ts_file,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Emit,
+            transpileOptionValue: undefined,
+            defaultValueDescription: "false",
+            description: ts.Diagnostics.Create_sourcemaps_for_d_ts_files
         },
         {
             name: "emitDeclarationOnly",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Only_emit_d_ts_declaration_files,
-            transpileOptionValue: undefined
+            showInSimplifiedHelpView: true,
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Only_output_d_ts_files_and_not_JavaScript_files,
+            transpileOptionValue: undefined,
+            defaultValueDescription: "false",
         },
         {
             name: "sourceMap",
             type: "boolean",
             affectsEmit: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Generates_corresponding_map_file,
+            category: ts.Diagnostics.Emit,
+            defaultValueDescription: "false",
+            description: ts.Diagnostics.Create_source_map_files_for_emitted_JavaScript_files,
         },
         {
             name: "outFile",
@@ -29397,9 +31177,9 @@ var ts;
             isFilePath: true,
             paramType: ts.Diagnostics.FILE,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Concatenate_and_emit_output_to_single_file,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Specify_a_file_that_bundles_all_outputs_into_one_JavaScript_file_If_declaration_is_true_also_designates_a_file_that_bundles_all_d_ts_output,
+            transpileOptionValue: undefined,
         },
         {
             name: "outDir",
@@ -29408,8 +31188,8 @@ var ts;
             isFilePath: true,
             paramType: ts.Diagnostics.DIRECTORY,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Redirect_output_structure_to_the_directory,
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Specify_an_output_folder_for_all_emitted_files,
         },
         {
             name: "rootDir",
@@ -29417,17 +31197,19 @@ var ts;
             affectsEmit: true,
             isFilePath: true,
             paramType: ts.Diagnostics.LOCATION,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Specify_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_the_root_folder_within_your_source_files,
+            defaultValueDescription: ts.Diagnostics.Computed_from_the_list_of_input_files
         },
         {
             name: "composite",
             type: "boolean",
             affectsEmit: true,
             isTSConfigOnly: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Enable_project_compilation,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Projects,
+            transpileOptionValue: undefined,
+            defaultValueDescription: "false",
+            description: ts.Diagnostics.Enable_constraints_that_allow_a_TypeScript_project_to_be_used_with_project_references,
         },
         {
             name: "tsBuildInfoFile",
@@ -29435,202 +31217,237 @@ var ts;
             affectsEmit: true,
             isFilePath: true,
             paramType: ts.Diagnostics.FILE,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Specify_file_to_store_incremental_compilation_information,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Projects,
+            transpileOptionValue: undefined,
+            defaultValueDescription: ".tsbuildinfo",
+            description: ts.Diagnostics.Specify_the_folder_for_tsbuildinfo_incremental_compilation_files,
         },
         {
             name: "removeComments",
             type: "boolean",
             affectsEmit: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Do_not_emit_comments_to_output,
+            category: ts.Diagnostics.Emit,
+            defaultValueDescription: "false",
+            description: ts.Diagnostics.Disable_emitting_comments,
         },
         {
             name: "noEmit",
             type: "boolean",
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Do_not_emit_outputs,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Disable_emitting_files_from_a_compilation,
+            transpileOptionValue: undefined,
+            defaultValueDescription: "false"
         },
         {
             name: "importHelpers",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Import_emit_helpers_from_tslib
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Allow_importing_helper_functions_from_tslib_once_per_project_instead_of_including_them_per_file,
+            defaultValueDescription: "false"
         },
         {
             name: "importsNotUsedAsValues",
             type: new ts.Map(ts.getEntries({
                 remove: 0,
                 preserve: 1,
-                error: 2
+                error: 2,
             })),
             affectsEmit: true,
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
+            category: ts.Diagnostics.Emit,
             description: ts.Diagnostics.Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types
         },
         {
             name: "downlevelIteration",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Provide_full_support_for_iterables_in_for_of_spread_and_destructuring_when_targeting_ES5_or_ES3
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Emit_more_compliant_but_verbose_and_less_performant_JavaScript_for_iteration,
+            defaultValueDescription: "false"
         },
         {
             name: "isolatedModules",
             type: "boolean",
-            category: ts.Diagnostics.Basic_Options,
-            description: ts.Diagnostics.Transpile_each_file_as_a_separate_module_similar_to_ts_transpileModule,
-            transpileOptionValue: true
+            category: ts.Diagnostics.Interop_Constraints,
+            description: ts.Diagnostics.Ensure_that_each_file_can_be_safely_transpiled_without_relying_on_other_imports,
+            transpileOptionValue: true,
+            defaultValueDescription: "false"
         },
         {
             name: "strict",
             type: "boolean",
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Enable_all_strict_type_checking_options
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enable_all_strict_type_checking_options,
+            defaultValueDescription: "false"
         },
         {
             name: "noImplicitAny",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enable_error_reporting_for_expressions_and_declarations_with_an_implied_any_type,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
         },
         {
             name: "strictNullChecks",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Enable_strict_null_checks
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.When_type_checking_take_into_account_null_and_undefined,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
         },
         {
             name: "strictFunctionTypes",
             type: "boolean",
-            affectsSemanticDiagnostics: true,
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Enable_strict_checking_of_function_types
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.When_assigning_functions_check_to_ensure_parameters_and_the_return_values_are_subtype_compatible,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
         },
         {
             name: "strictBindCallApply",
             type: "boolean",
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Check_that_the_arguments_for_bind_call_and_apply_methods_match_the_original_function,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
         },
         {
             name: "strictPropertyInitialization",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Enable_strict_checking_of_property_initialization_in_classes
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Check_for_class_properties_that_are_declared_but_not_set_in_the_constructor,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
         },
         {
             name: "noImplicitThis",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Raise_error_on_this_expressions_with_an_implied_any_type,
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enable_error_reporting_when_this_is_given_the_type_any,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
+        },
+        {
+            name: "useUnknownInCatchVariables",
+            type: "boolean",
+            affectsSemanticDiagnostics: true,
+            strictFlag: true,
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Type_catch_clause_variables_as_unknown_instead_of_any,
+            defaultValueDescription: "false",
         },
         {
             name: "alwaysStrict",
             type: "boolean",
             affectsSourceFile: true,
             strictFlag: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Strict_Type_Checking_Options,
-            description: ts.Diagnostics.Parse_in_strict_mode_and_emit_use_strict_for_each_source_file
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Ensure_use_strict_is_always_emitted,
+            defaultValueDescription: ts.Diagnostics.false_unless_strict_is_set
         },
         {
             name: "noUnusedLocals",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Additional_Checks,
-            description: ts.Diagnostics.Report_errors_on_unused_locals,
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enable_error_reporting_when_a_local_variables_aren_t_read,
+            defaultValueDescription: "false"
         },
         {
             name: "noUnusedParameters",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Additional_Checks,
-            description: ts.Diagnostics.Report_errors_on_unused_parameters,
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Raise_an_error_when_a_function_parameter_isn_t_read,
+            defaultValueDescription: "false"
+        },
+        {
+            name: "exactOptionalPropertyTypes",
+            type: "boolean",
+            affectsSemanticDiagnostics: true,
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Interpret_optional_property_types_as_written_rather_than_adding_undefined,
+            defaultValueDescription: "false",
         },
         {
             name: "noImplicitReturns",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Additional_Checks,
-            description: ts.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enable_error_reporting_for_codepaths_that_do_not_explicitly_return_in_a_function,
+            defaultValueDescription: "false"
         },
         {
             name: "noFallthroughCasesInSwitch",
             type: "boolean",
             affectsBindDiagnostics: true,
             affectsSemanticDiagnostics: true,
-            showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Additional_Checks,
-            description: ts.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enable_error_reporting_for_fallthrough_cases_in_switch_statements,
+            defaultValueDescription: "false",
         },
         {
             name: "noUncheckedIndexedAccess",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            showInSimplifiedHelpView: false,
-            category: ts.Diagnostics.Additional_Checks,
-            description: ts.Diagnostics.Include_undefined_in_index_signature_results
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Include_undefined_in_index_signature_results,
+            defaultValueDescription: "false",
+        },
+        {
+            name: "noImplicitOverride",
+            type: "boolean",
+            affectsSemanticDiagnostics: true,
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Ensure_overriding_members_in_derived_classes_are_marked_with_an_override_modifier,
+            defaultValueDescription: "false",
         },
         {
             name: "noPropertyAccessFromIndexSignature",
             type: "boolean",
             showInSimplifiedHelpView: false,
-            category: ts.Diagnostics.Additional_Checks,
-            description: ts.Diagnostics.Require_undeclared_properties_from_index_signatures_to_use_element_accesses
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Enforces_using_indexed_accessors_for_keys_declared_using_an_indexed_type,
+            defaultValueDescription: "false"
         },
         {
             name: "moduleResolution",
             type: new ts.Map(ts.getEntries({
                 node: ts.ModuleResolutionKind.NodeJs,
                 classic: ts.ModuleResolutionKind.Classic,
+                node12: ts.ModuleResolutionKind.Node12,
+                nodenext: ts.ModuleResolutionKind.NodeNext,
             })),
             affectsModuleResolution: true,
             paramType: ts.Diagnostics.STRATEGY,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.Specify_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_how_TypeScript_looks_up_a_file_from_a_given_module_specifier,
+            defaultValueDescription: ts.Diagnostics.module_AMD_or_UMD_or_System_or_ES6_then_Classic_Otherwise_Node
         },
         {
             name: "baseUrl",
             type: "string",
             affectsModuleResolution: true,
             isFilePath: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.Base_directory_to_resolve_non_absolute_module_names
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_the_base_directory_to_resolve_non_relative_module_names
         },
         {
             name: "paths",
             type: "object",
             affectsModuleResolution: true,
             isTSConfigOnly: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.A_series_of_entries_which_re_map_imports_to_lookup_locations_relative_to_the_baseUrl,
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_a_set_of_entries_that_re_map_imports_to_additional_lookup_locations,
             transpileOptionValue: undefined
         },
         {
@@ -29643,9 +31460,10 @@ var ts;
                 isFilePath: true
             },
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.List_of_root_folders_whose_combined_content_represents_the_structure_of_the_project_at_runtime,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Allow_multiple_folders_to_be_treated_as_one_when_resolving_modules,
+            transpileOptionValue: undefined,
+            defaultValueDescription: ts.Diagnostics.Computed_from_the_list_of_input_files
         },
         {
             name: "typeRoots",
@@ -29656,8 +31474,8 @@ var ts;
                 isFilePath: true
             },
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.List_of_folders_to_include_type_definitions_from
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_multiple_folders_that_act_like_Slashnode_modules_Slash_types
         },
         {
             name: "types",
@@ -29666,18 +31484,19 @@ var ts;
                 name: "types",
                 type: "string"
             },
-            affectsModuleResolution: true,
+            affectsProgramStructure: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.Type_declaration_files_to_be_included_in_compilation,
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Specify_type_package_names_to_be_included_without_being_referenced_in_a_source_file,
             transpileOptionValue: undefined
         },
         {
             name: "allowSyntheticDefaultImports",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking
+            category: ts.Diagnostics.Interop_Constraints,
+            description: ts.Diagnostics.Allow_import_x_from_y_when_a_module_doesn_t_have_a_default_export,
+            defaultValueDescription: ts.Diagnostics.module_system_or_esModuleInterop
         },
         {
             name: "esModuleInterop",
@@ -29685,78 +31504,86 @@ var ts;
             affectsSemanticDiagnostics: true,
             affectsEmit: true,
             showInSimplifiedHelpView: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.Enables_emit_interoperability_between_CommonJS_and_ES_Modules_via_creation_of_namespace_objects_for_all_imports_Implies_allowSyntheticDefaultImports
+            category: ts.Diagnostics.Interop_Constraints,
+            description: ts.Diagnostics.Emit_additional_JavaScript_to_ease_support_for_importing_CommonJS_modules_This_enables_allowSyntheticDefaultImports_for_type_compatibility,
+            defaultValueDescription: "false"
         },
         {
             name: "preserveSymlinks",
             type: "boolean",
-            category: ts.Diagnostics.Module_Resolution_Options,
-            description: ts.Diagnostics.Do_not_resolve_the_real_path_of_symlinks,
+            category: ts.Diagnostics.Interop_Constraints,
+            description: ts.Diagnostics.Disable_resolving_symlinks_to_their_realpath_This_correlates_to_the_same_flag_in_node,
+            defaultValueDescription: "false",
         },
         {
             name: "allowUmdGlobalAccess",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Module_Resolution_Options,
+            category: ts.Diagnostics.Modules,
             description: ts.Diagnostics.Allow_accessing_UMD_globals_from_modules,
+            defaultValueDescription: "false"
         },
         {
             name: "sourceRoot",
             type: "string",
             affectsEmit: true,
             paramType: ts.Diagnostics.LOCATION,
-            category: ts.Diagnostics.Source_Map_Options,
-            description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Specify_the_root_path_for_debuggers_to_find_the_reference_source_code,
         },
         {
             name: "mapRoot",
             type: "string",
             affectsEmit: true,
             paramType: ts.Diagnostics.LOCATION,
-            category: ts.Diagnostics.Source_Map_Options,
+            category: ts.Diagnostics.Emit,
             description: ts.Diagnostics.Specify_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,
         },
         {
             name: "inlineSourceMap",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Source_Map_Options,
-            description: ts.Diagnostics.Emit_a_single_file_with_source_maps_instead_of_having_a_separate_file
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Include_sourcemap_files_inside_the_emitted_JavaScript,
+            defaultValueDescription: "false"
         },
         {
             name: "inlineSources",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Source_Map_Options,
-            description: ts.Diagnostics.Emit_the_source_alongside_the_sourcemaps_within_a_single_file_requires_inlineSourceMap_or_sourceMap_to_be_set
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Include_source_code_in_the_sourcemaps_inside_the_emitted_JavaScript,
+            defaultValueDescription: "false"
         },
         {
             name: "experimentalDecorators",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Experimental_Options,
-            description: ts.Diagnostics.Enables_experimental_support_for_ES7_decorators
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Enable_experimental_support_for_TC39_stage_2_draft_decorators,
+            defaultValueDescription: "false",
         },
         {
             name: "emitDecoratorMetadata",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             affectsEmit: true,
-            category: ts.Diagnostics.Experimental_Options,
-            description: ts.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Emit_design_type_metadata_for_decorated_declarations_in_source_files,
+            defaultValueDescription: "false",
         },
         {
             name: "jsxFactory",
             type: "string",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_the_JSX_factory_function_to_use_when_targeting_react_JSX_emit_e_g_React_createElement_or_h
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Specify_the_JSX_factory_function_used_when_targeting_React_JSX_emit_e_g_React_createElement_or_h,
+            defaultValueDescription: "`React.createElement`"
         },
         {
             name: "jsxFragmentFactory",
             type: "string",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Specify_the_JSX_Fragment_reference_used_for_fragments_when_targeting_React_JSX_emit_e_g_React_Fragment_or_Fragment
         },
         {
             name: "jsxImportSource",
@@ -29764,51 +31591,57 @@ var ts;
             affectsSemanticDiagnostics: true,
             affectsEmit: true,
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Specify_module_specifier_used_to_import_the_JSX_factory_functions_when_using_jsx_Colon_react_jsx_Asterisk,
+            defaultValueDescription: "react"
         },
         {
             name: "resolveJsonModule",
             type: "boolean",
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Include_modules_imported_with_json_extension
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Enable_importing_json_files,
+            defaultValueDescription: "false"
         },
         {
             name: "out",
             type: "string",
             affectsEmit: true,
             isFilePath: false,
-            category: ts.Diagnostics.Advanced_Options,
+            category: ts.Diagnostics.Backwards_Compatibility,
             paramType: ts.Diagnostics.FILE,
-            description: ts.Diagnostics.Deprecated_Use_outFile_instead_Concatenate_and_emit_output_to_single_file,
-            transpileOptionValue: undefined
+            transpileOptionValue: undefined,
+            description: ts.Diagnostics.Deprecated_setting_Use_outFile_instead,
         },
         {
             name: "reactNamespace",
             type: "string",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Deprecated_Use_jsxFactory_instead_Specify_the_object_invoked_for_createElement_when_targeting_react_JSX_emit
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Specify_the_object_invoked_for_createElement_This_only_applies_when_targeting_react_JSX_emit,
+            defaultValueDescription: "`React`",
         },
         {
             name: "skipDefaultLibCheck",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Deprecated_Use_skipLibCheck_instead_Skip_type_checking_of_default_library_declaration_files
+            category: ts.Diagnostics.Completeness,
+            description: ts.Diagnostics.Skip_type_checking_d_ts_files_that_are_included_with_TypeScript,
+            defaultValueDescription: "false",
         },
         {
             name: "charset",
             type: "string",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.The_character_set_of_the_input_files
+            category: ts.Diagnostics.Backwards_Compatibility,
+            description: ts.Diagnostics.No_longer_supported_In_early_versions_manually_set_the_text_encoding_for_reading_files,
+            defaultValueDescription: "utf8"
         },
         {
             name: "emitBOM",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Emit_a_UTF_8_Byte_Order_Mark_BOM_in_the_beginning_of_output_files,
+            defaultValueDescription: "false"
         },
         {
             name: "newLine",
@@ -29818,95 +31651,108 @@ var ts;
             })),
             affectsEmit: true,
             paramType: ts.Diagnostics.NEWLINE,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Specify_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Set_the_newline_character_for_emitting_files,
+            defaultValueDescription: ts.Diagnostics.Platform_specific
         },
         {
             name: "noErrorTruncation",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_truncate_error_messages
+            category: ts.Diagnostics.Output_Formatting,
+            description: ts.Diagnostics.Disable_truncating_types_in_error_messages,
+            defaultValueDescription: "false"
         },
         {
             name: "noLib",
             type: "boolean",
-            affectsModuleResolution: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_include_the_default_library_file_lib_d_ts,
-            transpileOptionValue: true
+            category: ts.Diagnostics.Language_and_Environment,
+            affectsProgramStructure: true,
+            description: ts.Diagnostics.Disable_including_any_library_files_including_the_default_lib_d_ts,
+            transpileOptionValue: true,
+            defaultValueDescription: "false"
         },
         {
             name: "noResolve",
             type: "boolean",
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_add_triple_slash_references_or_imported_modules_to_the_list_of_compiled_files,
-            transpileOptionValue: true
+            category: ts.Diagnostics.Modules,
+            description: ts.Diagnostics.Disallow_import_s_require_s_or_reference_s_from_expanding_the_number_of_files_TypeScript_should_add_to_a_project,
+            transpileOptionValue: true,
+            defaultValueDescription: "false"
         },
         {
             name: "stripInternal",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Disable_emitting_declarations_that_have_internal_in_their_JSDoc_comments,
+            defaultValueDescription: "false",
         },
         {
             name: "disableSizeLimit",
             type: "boolean",
-            affectsSourceFile: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Disable_size_limitations_on_JavaScript_projects
+            affectsProgramStructure: true,
+            category: ts.Diagnostics.Editor_Support,
+            description: ts.Diagnostics.Remove_the_20mb_cap_on_total_source_code_size_for_JavaScript_files_in_the_TypeScript_language_server,
+            defaultValueDescription: "false"
         },
         {
             name: "disableSourceOfProjectReferenceRedirect",
             type: "boolean",
             isTSConfigOnly: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Disable_use_of_source_files_instead_of_declaration_files_from_referenced_projects
+            category: ts.Diagnostics.Projects,
+            description: ts.Diagnostics.Disable_preferring_source_files_instead_of_declaration_files_when_referencing_composite_projects,
+            defaultValueDescription: "false",
         },
         {
             name: "disableSolutionSearching",
             type: "boolean",
             isTSConfigOnly: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Disable_solution_searching_for_this_project
+            category: ts.Diagnostics.Projects,
+            description: ts.Diagnostics.Opt_a_project_out_of_multi_project_reference_checking_when_editing,
+            defaultValueDescription: "false",
         },
         {
             name: "disableReferencedProjectLoad",
             type: "boolean",
             isTSConfigOnly: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Disable_loading_referenced_projects
+            category: ts.Diagnostics.Projects,
+            description: ts.Diagnostics.Reduce_the_number_of_projects_loaded_automatically_by_TypeScript,
+            defaultValueDescription: "false",
         },
         {
             name: "noImplicitUseStrict",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_emit_use_strict_directives_in_module_output
+            category: ts.Diagnostics.Backwards_Compatibility,
+            description: ts.Diagnostics.Disable_adding_use_strict_directives_in_emitted_JavaScript_files,
+            defaultValueDescription: "false"
         },
         {
             name: "noEmitHelpers",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_generate_custom_helper_functions_like_extends_in_compiled_output
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Disable_generating_custom_helper_functions_like_extends_in_compiled_output,
+            defaultValueDescription: "false"
         },
         {
             name: "noEmitOnError",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Emit,
+            transpileOptionValue: undefined,
+            description: ts.Diagnostics.Disable_emitting_files_if_any_type_checking_errors_are_reported,
+            defaultValueDescription: "false"
         },
         {
             name: "preserveConstEnums",
             type: "boolean",
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Disable_erasing_const_enum_declarations_in_generated_code,
+            defaultValueDescription: "false",
         },
         {
             name: "declarationDir",
@@ -29914,80 +31760,98 @@ var ts;
             affectsEmit: true,
             isFilePath: true,
             paramType: ts.Diagnostics.DIRECTORY,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Output_directory_for_generated_declaration_files,
-            transpileOptionValue: undefined
+            category: ts.Diagnostics.Emit,
+            transpileOptionValue: undefined,
+            description: ts.Diagnostics.Specify_the_output_directory_for_generated_declaration_files,
         },
         {
             name: "skipLibCheck",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Skip_type_checking_of_declaration_files,
+            category: ts.Diagnostics.Completeness,
+            description: ts.Diagnostics.Skip_type_checking_all_d_ts_files,
+            defaultValueDescription: "false"
         },
         {
             name: "allowUnusedLabels",
             type: "boolean",
             affectsBindDiagnostics: true,
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_report_errors_on_unused_labels
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Disable_error_reporting_for_unused_labels,
+            defaultValueDescription: "undefined"
         },
         {
             name: "allowUnreachableCode",
             type: "boolean",
             affectsBindDiagnostics: true,
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Do_not_report_errors_on_unreachable_code
+            category: ts.Diagnostics.Type_Checking,
+            description: ts.Diagnostics.Disable_error_reporting_for_unreachable_code,
+            defaultValueDescription: "undefined"
         },
         {
             name: "suppressExcessPropertyErrors",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Suppress_excess_property_checks_for_object_literals,
+            category: ts.Diagnostics.Backwards_Compatibility,
+            description: ts.Diagnostics.Disable_reporting_of_excess_property_errors_during_the_creation_of_object_literals,
+            defaultValueDescription: "false"
         },
         {
             name: "suppressImplicitAnyIndexErrors",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures,
+            category: ts.Diagnostics.Backwards_Compatibility,
+            description: ts.Diagnostics.Suppress_noImplicitAny_errors_when_indexing_objects_that_lack_index_signatures,
+            defaultValueDescription: "false"
         },
         {
             name: "forceConsistentCasingInFileNames",
             type: "boolean",
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file
+            category: ts.Diagnostics.Interop_Constraints,
+            description: ts.Diagnostics.Ensure_that_casing_is_correct_in_imports,
+            defaultValueDescription: "false"
         },
         {
             name: "maxNodeModuleJsDepth",
             type: "number",
             affectsModuleResolution: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.The_maximum_dependency_depth_to_search_under_node_modules_and_load_JavaScript_files
+            category: ts.Diagnostics.JavaScript_Support,
+            description: ts.Diagnostics.Specify_the_maximum_folder_depth_used_for_checking_JavaScript_files_from_node_modules_Only_applicable_with_allowJs,
+            defaultValueDescription: "0"
         },
         {
             name: "noStrictGenericChecks",
             type: "boolean",
             affectsSemanticDiagnostics: true,
-            category: ts.Diagnostics.Advanced_Options,
+            category: ts.Diagnostics.Backwards_Compatibility,
             description: ts.Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types,
+            defaultValueDescription: "false"
         },
         {
             name: "useDefineForClassFields",
             type: "boolean",
             affectsSemanticDiagnostics: true,
             affectsEmit: true,
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Emit_class_fields_with_Define_instead_of_Set,
+            category: ts.Diagnostics.Language_and_Environment,
+            description: ts.Diagnostics.Emit_ECMAScript_standard_compliant_class_fields,
+            defaultValueDescription: ts.Diagnostics.true_for_ES2022_and_above_including_ESNext
+        },
+        {
+            name: "preserveValueImports",
+            type: "boolean",
+            affectsEmit: true,
+            category: ts.Diagnostics.Emit,
+            description: ts.Diagnostics.Preserve_unused_imported_values_in_the_JavaScript_output_that_would_otherwise_be_removed,
+            defaultValueDescription: "false",
         },
         {
             name: "keyofStringsOnly",
             type: "boolean",
-            category: ts.Diagnostics.Advanced_Options,
-            description: ts.Diagnostics.Resolve_keyof_to_string_valued_property_names_only_no_numbers_or_symbols,
+            category: ts.Diagnostics.Backwards_Compatibility,
+            description: ts.Diagnostics.Make_keyof_only_return_strings_instead_of_string_numbers_or_symbols_Legacy_option,
+            defaultValueDescription: "false"
         },
         {
             name: "plugins",
@@ -29997,55 +31861,65 @@ var ts;
                 name: "plugin",
                 type: "object"
             },
-            description: ts.Diagnostics.List_of_language_service_plugins
+            description: ts.Diagnostics.List_of_language_service_plugins,
+            category: ts.Diagnostics.Editor_Support,
         },
-    ]);
+    ];
+    ts.optionDeclarations = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), commandOptionsWithoutBuild, true);
     ts.semanticDiagnosticsOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsSemanticDiagnostics; });
     ts.affectsEmitOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsEmit; });
     ts.moduleResolutionOptionDeclarations = ts.optionDeclarations.filter(function (option) { return !!option.affectsModuleResolution; });
     ts.sourceFileAffectingCompilerOptions = ts.optionDeclarations.filter(function (option) {
         return !!option.affectsSourceFile || !!option.affectsModuleResolution || !!option.affectsBindDiagnostics;
     });
+    ts.optionsAffectingProgramStructure = ts.optionDeclarations.filter(function (option) { return !!option.affectsProgramStructure; });
     ts.transpileOptionValueCompilerOptions = ts.optionDeclarations.filter(function (option) {
         return ts.hasProperty(option, "transpileOptionValue");
     });
-    ts.buildOpts = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild), [
+    ts.optionsForBuild = [
         {
             name: "verbose",
             shortName: "v",
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Enable_verbose_logging,
-            type: "boolean"
+            type: "boolean",
+            defaultValueDescription: "false",
         },
         {
             name: "dry",
             shortName: "d",
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Show_what_would_be_built_or_deleted_if_specified_with_clean,
-            type: "boolean"
+            type: "boolean",
+            defaultValueDescription: "false",
         },
         {
             name: "force",
             shortName: "f",
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Build_all_projects_including_those_that_appear_to_be_up_to_date,
-            type: "boolean"
+            type: "boolean",
+            defaultValueDescription: "false",
         },
         {
             name: "clean",
             category: ts.Diagnostics.Command_line_Options,
             description: ts.Diagnostics.Delete_the_outputs_of_all_projects,
-            type: "boolean"
+            type: "boolean",
+            defaultValueDescription: "false",
         }
-    ]);
+    ];
+    ts.buildOpts = __spreadArray(__spreadArray([], ts.commonOptionsWithBuild, true), ts.optionsForBuild, true);
     ts.typeAcquisitionDeclarations = [
         {
             name: "enableAutoDiscovery",
             type: "boolean",
+            defaultValueDescription: "false",
         },
         {
             name: "enable",
             type: "boolean",
+            defaultValueDescription: "false",
         },
         {
             name: "include",
@@ -30066,6 +31940,7 @@ var ts;
         {
             name: "disableFilenameBasedTypeAcquisition",
             type: "boolean",
+            defaultValueDescription: "false",
         },
     ];
     function createOptionNameMap(optionDeclarations) {
@@ -30085,9 +31960,13 @@ var ts;
         return optionsNameMapCache || (optionsNameMapCache = createOptionNameMap(ts.optionDeclarations));
     }
     ts.getOptionsNameMap = getOptionsNameMap;
+    var compilerOptionsAlternateMode = {
+        diagnostic: ts.Diagnostics.Compiler_option_0_may_only_be_used_with_build,
+        getOptionsNameMap: getBuildOptionsNameMap
+    };
     ts.defaultInitCompilerOptions = {
         module: ts.ModuleKind.CommonJS,
-        target: 1,
+        target: 3,
         strict: true,
         esModuleInterop: true,
         forceConsistentCasingInFileNames: true,
@@ -30109,16 +31988,16 @@ var ts;
     }
     ts.createCompilerDiagnosticForInvalidCustomType = createCompilerDiagnosticForInvalidCustomType;
     function createDiagnosticForInvalidCustomType(opt, createDiagnostic) {
-        var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'" + key + "'"; }).join(", ");
-        return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--" + opt.name, namesOfType);
+        var namesOfType = ts.arrayFrom(opt.type.keys()).map(function (key) { return "'".concat(key, "'"); }).join(", ");
+        return createDiagnostic(ts.Diagnostics.Argument_for_0_option_must_be_Colon_1, "--".concat(opt.name), namesOfType);
     }
     function parseCustomTypeOption(opt, value, errors) {
-        return convertJsonOptionOfCustomType(opt, trimString(value || ""), errors);
+        return convertJsonOptionOfCustomType(opt, ts.trimString(value || ""), errors);
     }
     ts.parseCustomTypeOption = parseCustomTypeOption;
     function parseListTypeOption(opt, value, errors) {
         if (value === void 0) { value = ""; }
-        value = trimString(value);
+        value = ts.trimString(value);
         if (ts.startsWith(value, "-")) {
             return undefined;
         }
@@ -30140,6 +32019,10 @@ var ts;
         return option.name;
     }
     function createUnknownOptionError(unknownOption, diagnostics, createDiagnostics, unknownOptionErrorText) {
+        var _a;
+        if ((_a = diagnostics.alternateMode) === null || _a === void 0 ? void 0 : _a.getOptionsNameMap().optionsNameMap.has(unknownOption.toLowerCase())) {
+            return createDiagnostics(diagnostics.alternateMode.diagnostic, unknownOption);
+        }
         var possibleOption = ts.getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);
         return possibleOption ?
             createDiagnostics(diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) :
@@ -30288,6 +32171,7 @@ var ts;
         return i;
     }
     ts.compilerOptionsDidYouMeanDiagnostics = {
+        alternateMode: compilerOptionsAlternateMode,
         getOptionsNameMap: getOptionsNameMap,
         optionDeclarations: ts.optionDeclarations,
         unknownOptionDiagnostic: ts.Diagnostics.Unknown_compiler_option_0,
@@ -30318,7 +32202,12 @@ var ts;
     function getBuildOptionsNameMap() {
         return buildOptionsNameMapCache || (buildOptionsNameMapCache = createOptionNameMap(ts.buildOpts));
     }
+    var buildOptionsAlternateMode = {
+        diagnostic: ts.Diagnostics.Compiler_option_0_may_not_be_used_with_build,
+        getOptionsNameMap: getOptionsNameMap
+    };
     var buildOptionsDidYouMeanDiagnostics = {
+        alternateMode: buildOptionsAlternateMode,
         getOptionsNameMap: getBuildOptionsNameMap,
         optionDeclarations: ts.buildOpts,
         unknownOptionDiagnostic: ts.Diagnostics.Unknown_build_option_0,
@@ -30377,7 +32266,7 @@ var ts;
     function parseConfigFileTextToJson(fileName, jsonText) {
         var jsonSourceFile = ts.parseJsonText(fileName, jsonText);
         return {
-            config: convertToObject(jsonSourceFile, jsonSourceFile.parseDiagnostics),
+            config: convertConfigFileToObject(jsonSourceFile, jsonSourceFile.parseDiagnostics, false, undefined),
             error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : undefined
         };
     }
@@ -30462,7 +32351,8 @@ var ts;
                     },
                     {
                         name: "extends",
-                        type: "string"
+                        type: "string",
+                        category: ts.Diagnostics.File_Management,
                     },
                     {
                         name: "references",
@@ -30470,7 +32360,8 @@ var ts;
                         element: {
                             name: "references",
                             type: "object"
-                        }
+                        },
+                        category: ts.Diagnostics.Projects,
                     },
                     {
                         name: "files",
@@ -30478,7 +32369,8 @@ var ts;
                         element: {
                             name: "files",
                             type: "string"
-                        }
+                        },
+                        category: ts.Diagnostics.File_Management,
                     },
                     {
                         name: "include",
@@ -30486,7 +32378,9 @@ var ts;
                         element: {
                             name: "include",
                             type: "string"
-                        }
+                        },
+                        category: ts.Diagnostics.File_Management,
+                        defaultValueDescription: ts.Diagnostics.if_files_is_specified_otherwise_Asterisk_Asterisk_Slash_Asterisk
                     },
                     {
                         name: "exclude",
@@ -30494,7 +32388,9 @@ var ts;
                         element: {
                             name: "exclude",
                             type: "string"
-                        }
+                        },
+                        category: ts.Diagnostics.File_Management,
+                        defaultValueDescription: ts.Diagnostics.node_modules_bower_components_jspm_packages_plus_the_value_of_outDir_if_one_is_specified
                     },
                     ts.compileOnSaveCommandLineOption
                 ])
@@ -30502,22 +32398,39 @@ var ts;
         }
         return _tsconfigRootOptions;
     }
+    function convertConfigFileToObject(sourceFile, errors, reportOptionsErrors, optionsIterator) {
+        var _a;
+        var rootExpression = (_a = sourceFile.statements[0]) === null || _a === void 0 ? void 0 : _a.expression;
+        var knownRootOptions = reportOptionsErrors ? getTsconfigRootOptionsMap() : undefined;
+        if (rootExpression && rootExpression.kind !== 204) {
+            errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, rootExpression, ts.Diagnostics.The_root_value_of_a_0_file_must_be_an_object, ts.getBaseFileName(sourceFile.fileName) === "jsconfig.json" ? "jsconfig.json" : "tsconfig.json"));
+            if (ts.isArrayLiteralExpression(rootExpression)) {
+                var firstObject = ts.find(rootExpression.elements, ts.isObjectLiteralExpression);
+                if (firstObject) {
+                    return convertToObjectWorker(sourceFile, firstObject, errors, true, knownRootOptions, optionsIterator);
+                }
+            }
+            return {};
+        }
+        return convertToObjectWorker(sourceFile, rootExpression, errors, true, knownRootOptions, optionsIterator);
+    }
     function convertToObject(sourceFile, errors) {
-        return convertToObjectWorker(sourceFile, errors, true, undefined, undefined);
+        var _a;
+        return convertToObjectWorker(sourceFile, (_a = sourceFile.statements[0]) === null || _a === void 0 ? void 0 : _a.expression, errors, true, undefined, undefined);
     }
     ts.convertToObject = convertToObject;
-    function convertToObjectWorker(sourceFile, errors, returnValue, knownRootOptions, jsonConversionNotifier) {
-        if (!sourceFile.statements.length) {
+    function convertToObjectWorker(sourceFile, rootExpression, errors, returnValue, knownRootOptions, jsonConversionNotifier) {
+        if (!rootExpression) {
             return returnValue ? {} : undefined;
         }
-        return convertPropertyValueToJson(sourceFile.statements[0].expression, knownRootOptions);
+        return convertPropertyValueToJson(rootExpression, knownRootOptions);
         function isRootOptionMap(knownOptions) {
             return knownRootOptions && knownRootOptions.elementOptions === knownOptions;
         }
         function convertObjectLiteralExpressionToJson(node, knownOptions, extraKeyDiagnostics, parentOption) {
             var result = returnValue ? {} : undefined;
             var _loop_4 = function (element) {
-                if (element.kind !== 288) {
+                if (element.kind !== 294) {
                     errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, element, ts.Diagnostics.Property_assignment_expected));
                     return "continue";
                 }
@@ -30578,13 +32491,13 @@ var ts;
         function convertPropertyValueToJson(valueExpression, option) {
             var invalidReported;
             switch (valueExpression.kind) {
-                case 109:
+                case 110:
                     reportInvalidOptionValue(option && option.type !== "boolean");
                     return validateValue(true);
-                case 94:
+                case 95:
                     reportInvalidOptionValue(option && option.type !== "boolean");
                     return validateValue(false);
-                case 103:
+                case 104:
                     reportInvalidOptionValue(option && option.name === "extends");
                     return validateValue(null);
                 case 10:
@@ -30604,13 +32517,13 @@ var ts;
                 case 8:
                     reportInvalidOptionValue(option && option.type !== "number");
                     return validateValue(Number(valueExpression.text));
-                case 214:
+                case 218:
                     if (valueExpression.operator !== 40 || valueExpression.operand.kind !== 8) {
                         break;
                     }
                     reportInvalidOptionValue(option && option.type !== "number");
                     return validateValue(-Number(valueExpression.operand.text));
-                case 200:
+                case 204:
                     reportInvalidOptionValue(option && option.type !== "object");
                     var objectLiteralExpression = valueExpression;
                     if (option) {
@@ -30620,7 +32533,7 @@ var ts;
                     else {
                         return validateValue(convertObjectLiteralExpressionToJson(objectLiteralExpression, undefined, undefined, undefined));
                     }
-                case 199:
+                case 203:
                     reportInvalidOptionValue(option && option.type !== "list");
                     return validateValue(convertArrayLiteralExpressionToJson(valueExpression.elements, option && option.element));
             }
@@ -30636,7 +32549,7 @@ var ts;
                 if (!invalidReported) {
                     var diagnostic = (_a = option === null || option === void 0 ? void 0 : option.extraValidation) === null || _a === void 0 ? void 0 : _a.call(option, value);
                     if (diagnostic) {
-                        errors.push(ts.createDiagnosticForNodeInSourceFile.apply(void 0, __spreadArray([sourceFile, valueExpression], diagnostic)));
+                        errors.push(ts.createDiagnosticForNodeInSourceFile.apply(void 0, __spreadArray([sourceFile, valueExpression], diagnostic, false)));
                         return undefined;
                     }
                 }
@@ -30746,7 +32659,7 @@ var ts;
         var getCanonicalFileName = pathOptions && ts.createGetCanonicalFileName(pathOptions.useCaseSensitiveFileNames);
         var _loop_5 = function (name) {
             if (ts.hasProperty(options, name)) {
-                if (optionsNameMap.has(name) && optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options) {
+                if (optionsNameMap.has(name) && (optionsNameMap.get(name).category === ts.Diagnostics.Command_line_Options || optionsNameMap.get(name).category === ts.Diagnostics.Output_Formatting)) {
                     return "continue";
                 }
                 var value = options[name];
@@ -30777,44 +32690,53 @@ var ts;
         }
         return result;
     }
-    function generateTSConfig(options, fileNames, newLine) {
+    function getCompilerOptionsDiffValue(options, newLine) {
+        var compilerOptionsMap = getSerializedCompilerOption(options);
+        return getOverwrittenDefaultOptions();
+        function makePadding(paddingLength) {
+            return Array(paddingLength + 1).join(" ");
+        }
+        function getOverwrittenDefaultOptions() {
+            var result = [];
+            var tab = makePadding(2);
+            commandOptionsWithoutBuild.forEach(function (cmd) {
+                if (!compilerOptionsMap.has(cmd.name)) {
+                    return;
+                }
+                var newValue = compilerOptionsMap.get(cmd.name);
+                var defaultValue = getDefaultValueForOption(cmd);
+                if (newValue !== defaultValue) {
+                    result.push("".concat(tab).concat(cmd.name, ": ").concat(newValue));
+                }
+                else if (ts.hasProperty(ts.defaultInitCompilerOptions, cmd.name)) {
+                    result.push("".concat(tab).concat(cmd.name, ": ").concat(defaultValue));
+                }
+            });
+            return result.join(newLine) + newLine;
+        }
+    }
+    ts.getCompilerOptionsDiffValue = getCompilerOptionsDiffValue;
+    function getSerializedCompilerOption(options) {
         var compilerOptions = ts.extend(options, ts.defaultInitCompilerOptions);
-        var compilerOptionsMap = serializeCompilerOptions(compilerOptions);
+        return serializeCompilerOptions(compilerOptions);
+    }
+    function generateTSConfig(options, fileNames, newLine) {
+        var compilerOptionsMap = getSerializedCompilerOption(options);
         return writeConfigurations();
-        function getDefaultValueForOption(option) {
-            switch (option.type) {
-                case "number":
-                    return 1;
-                case "boolean":
-                    return true;
-                case "string":
-                    return option.isFilePath ? "./" : "";
-                case "list":
-                    return [];
-                case "object":
-                    return {};
-                default:
-                    var iterResult = option.type.keys().next();
-                    if (!iterResult.done)
-                        return iterResult.value;
-                    return ts.Debug.fail("Expected 'option.type' to have entries.");
-            }
-        }
         function makePadding(paddingLength) {
             return Array(paddingLength + 1).join(" ");
         }
-        function isAllowedOption(_a) {
-            var category = _a.category, name = _a.name;
-            return category !== undefined
-                && category !== ts.Diagnostics.Command_line_Options
-                && (category !== ts.Diagnostics.Advanced_Options || compilerOptionsMap.has(name));
+        function isAllowedOptionForOutput(_a) {
+            var category = _a.category, name = _a.name, isCommandLineOnly = _a.isCommandLineOnly;
+            var categoriesToSkip = [ts.Diagnostics.Command_line_Options, ts.Diagnostics.Editor_Support, ts.Diagnostics.Compiler_Diagnostics, ts.Diagnostics.Backwards_Compatibility, ts.Diagnostics.Watch_and_Build_Modes, ts.Diagnostics.Output_Formatting];
+            return !isCommandLineOnly && category !== undefined && (!categoriesToSkip.includes(category) || compilerOptionsMap.has(name));
         }
         function writeConfigurations() {
             var categorizedOptions = ts.createMultiMap();
             for (var _i = 0, optionDeclarations_1 = ts.optionDeclarations; _i < optionDeclarations_1.length; _i++) {
                 var option = optionDeclarations_1[_i];
                 var category = option.category;
-                if (isAllowedOption(option)) {
+                if (isAllowedOptionForOutput(option)) {
                     categorizedOptions.add(ts.getLocaleSpecificMessage(category), option);
                 }
             }
@@ -30825,19 +32747,19 @@ var ts;
                 if (entries.length !== 0) {
                     entries.push({ value: "" });
                 }
-                entries.push({ value: "/* " + category + " */" });
+                entries.push({ value: "/* ".concat(category, " */") });
                 for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
                     var option = options_1[_i];
                     var optionName = void 0;
                     if (compilerOptionsMap.has(option.name)) {
-                        optionName = "\"" + option.name + "\": " + JSON.stringify(compilerOptionsMap.get(option.name)) + ((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
+                        optionName = "\"".concat(option.name, "\": ").concat(JSON.stringify(compilerOptionsMap.get(option.name))).concat((seenKnownKeys += 1) === compilerOptionsMap.size ? "" : ",");
                     }
                     else {
-                        optionName = "// \"" + option.name + "\": " + JSON.stringify(getDefaultValueForOption(option)) + ",";
+                        optionName = "// \"".concat(option.name, "\": ").concat(JSON.stringify(getDefaultValueForOption(option)), ",");
                     }
                     entries.push({
                         value: optionName,
-                        description: "/* " + (option.description && ts.getLocaleSpecificMessage(option.description) || option.name) + " */"
+                        description: "/* ".concat(option.description && ts.getLocaleSpecificMessage(option.description) || option.name, " */")
                     });
                     marginLength = Math.max(optionName.length, marginLength);
                 }
@@ -30845,24 +32767,24 @@ var ts;
             var tab = makePadding(2);
             var result = [];
             result.push("{");
-            result.push(tab + "\"compilerOptions\": {");
-            result.push("" + tab + tab + "/* " + ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file) + " */");
+            result.push("".concat(tab, "\"compilerOptions\": {"));
+            result.push("".concat(tab).concat(tab, "/* ").concat(ts.getLocaleSpecificMessage(ts.Diagnostics.Visit_https_Colon_Slash_Slashaka_ms_Slashtsconfig_json_to_read_more_about_this_file), " */"));
             result.push("");
             for (var _a = 0, entries_2 = entries; _a < entries_2.length; _a++) {
                 var entry = entries_2[_a];
                 var value = entry.value, _b = entry.description, description = _b === void 0 ? "" : _b;
-                result.push(value && "" + tab + tab + value + (description && (makePadding(marginLength - value.length + 2) + description)));
+                result.push(value && "".concat(tab).concat(tab).concat(value).concat(description && (makePadding(marginLength - value.length + 2) + description)));
             }
             if (fileNames.length) {
-                result.push(tab + "},");
-                result.push(tab + "\"files\": [");
+                result.push("".concat(tab, "},"));
+                result.push("".concat(tab, "\"files\": ["));
                 for (var i = 0; i < fileNames.length; i++) {
-                    result.push("" + tab + tab + JSON.stringify(fileNames[i]) + (i === fileNames.length - 1 ? "" : ","));
+                    result.push("".concat(tab).concat(tab).concat(JSON.stringify(fileNames[i])).concat(i === fileNames.length - 1 ? "" : ","));
                 }
-                result.push(tab + "]");
+                result.push("".concat(tab, "]"));
             }
             else {
-                result.push(tab + "}");
+                result.push("".concat(tab, "}"));
             }
             result.push("}");
             return result.join(newLine) + newLine;
@@ -30994,6 +32916,7 @@ var ts;
                 validatedFilesSpec: ts.filter(filesSpecs, ts.isString),
                 validatedIncludeSpecs: validatedIncludeSpecs,
                 validatedExcludeSpecs: validatedExcludeSpecs,
+                pathPatterns: undefined,
             };
         }
         function getFileNames(basePath) {
@@ -31085,7 +33008,7 @@ var ts;
         basePath = ts.normalizeSlashes(basePath);
         var resolvedPath = ts.getNormalizedAbsolutePath(configFileName || "", basePath);
         if (resolutionStack.indexOf(resolvedPath) >= 0) {
-            errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, __spreadArray(__spreadArray([], resolutionStack), [resolvedPath]).join(" -> ")));
+            errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Circularity_detected_while_resolving_configuration_Colon_0, __spreadArray(__spreadArray([], resolutionStack, true), [resolvedPath], false).join(" -> ")));
             return { raw: json || convertToObject(sourceFile, errors) };
         }
         var ownConfig = json ?
@@ -31145,6 +33068,7 @@ var ts;
         var typeAcquisition, typingOptionstypeAcquisition;
         var watchOptions;
         var extendedConfigPath;
+        var rootCompilerOptions;
         var optionsIterator = {
             onSetValidOptionKeyValueInParent: function (parentOption, option, value) {
                 var currentOption;
@@ -31180,9 +33104,12 @@ var ts;
                 if (key === "excludes") {
                     errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, keyNode, ts.Diagnostics.Unknown_option_excludes_Did_you_mean_exclude));
                 }
+                if (ts.find(commandOptionsWithoutBuild, function (opt) { return opt.name === key; })) {
+                    rootCompilerOptions = ts.append(rootCompilerOptions, keyNode);
+                }
             }
         };
-        var json = convertToObjectWorker(sourceFile, errors, true, getTsconfigRootOptionsMap(), optionsIterator);
+        var json = convertConfigFileToObject(sourceFile, errors, true, optionsIterator);
         if (!typeAcquisition) {
             if (typingOptionstypeAcquisition) {
                 typeAcquisition = (typingOptionstypeAcquisition.enableAutoDiscovery !== undefined) ?
@@ -31197,6 +33124,9 @@ var ts;
                 typeAcquisition = getDefaultTypeAcquisition(configFileName);
             }
         }
+        if (rootCompilerOptions && json && json.compilerOptions === undefined) {
+            errors.push(ts.createDiagnosticForNodeInSourceFile(sourceFile, rootCompilerOptions[0], ts.Diagnostics._0_should_be_set_inside_the_compilerOptions_object_of_the_config_json_file, ts.getTextOfPropertyName(rootCompilerOptions[0])));
+        }
         return { raw: json, options: options, watchOptions: watchOptions, typeAcquisition: typeAcquisition, extendedConfigPath: extendedConfigPath };
     }
     function getExtendsConfigPath(extendedConfig, host, basePath, errors, createDiagnostic) {
@@ -31204,7 +33134,7 @@ var ts;
         if (ts.isRootedDiskPath(extendedConfig) || ts.startsWith(extendedConfig, "./") || ts.startsWith(extendedConfig, "../")) {
             var extendedConfigPath = ts.getNormalizedAbsolutePath(extendedConfig, basePath);
             if (!host.fileExists(extendedConfigPath) && !ts.endsWith(extendedConfigPath, ".json")) {
-                extendedConfigPath = extendedConfigPath + ".json";
+                extendedConfigPath = "".concat(extendedConfigPath, ".json");
                 if (!host.fileExists(extendedConfigPath)) {
                     errors.push(createDiagnostic(ts.Diagnostics.File_0_not_found, extendedConfig));
                     return undefined;
@@ -31375,12 +33305,7 @@ var ts;
     function convertJsonOptionOfListType(option, values, basePath, errors) {
         return ts.filter(ts.map(values, function (v) { return convertJsonOption(option.element, v, basePath, errors); }), function (v) { return !!v; });
     }
-    function trimString(s) {
-        return typeof s.trim === "function" ? s.trim() : s.replace(/^[\s]+|[\s]+$/g, "");
-    }
     var invalidTrailingRecursionPattern = /(^|\/)\*\*\/?$/;
-    var invalidDotDotAfterRecursiveWildcardPattern = /(^|\/)\*\*\/(.*\/)?\.\.($|\/)/;
-    var watchRecursivePattern = /\/[^/]*?[*?][^/]*\//;
     var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
     function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, extraFileExtensions) {
         if (extraFileExtensions === void 0) { extraFileExtensions = ts.emptyArray; }
@@ -31391,7 +33316,7 @@ var ts;
         var wildCardJsonFileMap = new ts.Map();
         var validatedFilesSpec = configFileSpecs.validatedFilesSpec, validatedIncludeSpecs = configFileSpecs.validatedIncludeSpecs, validatedExcludeSpecs = configFileSpecs.validatedExcludeSpecs;
         var supportedExtensions = ts.getSupportedExtensions(options, extraFileExtensions);
-        var supportedExtensionsWithJsonIfResolveJsonModule = ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
+        var supportedExtensionsWithJsonIfResolveJsonModule = ts.getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
         if (validatedFilesSpec) {
             for (var _i = 0, validatedFilesSpec_1 = validatedFilesSpec; _i < validatedFilesSpec_1.length; _i++) {
                 var fileName = validatedFilesSpec_1[_i];
@@ -31405,7 +33330,7 @@ var ts;
                 if (ts.fileExtensionIs(file, ".json")) {
                     if (!jsonOnlyIncludeRegexes) {
                         var includes = validatedIncludeSpecs.filter(function (s) { return ts.endsWith(s, ".json"); });
-                        var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^" + pattern + "$"; });
+                        var includeFilePatterns = ts.map(ts.getRegularExpressionsForWildcards(includes, basePath, "files"), function (pattern) { return "^".concat(pattern, "$"); });
                         jsonOnlyIncludeRegexes = includeFilePatterns ? includeFilePatterns.map(function (pattern) { return ts.getRegexFromPattern(pattern, host.useCaseSensitiveFileNames); }) : ts.emptyArray;
                     }
                     var includeIndex = ts.findIndex(jsonOnlyIncludeRegexes, function (re) { return re.test(file); });
@@ -31426,7 +33351,7 @@ var ts;
                     wildcardFileMap.set(key, file);
                 }
             };
-            for (var _a = 0, _b = host.readDirectory(basePath, supportedExtensionsWithJsonIfResolveJsonModule, validatedExcludeSpecs, validatedIncludeSpecs, undefined); _a < _b.length; _a++) {
+            for (var _a = 0, _b = host.readDirectory(basePath, ts.flatten(supportedExtensionsWithJsonIfResolveJsonModule), validatedExcludeSpecs, validatedIncludeSpecs, undefined); _a < _b.length; _a++) {
                 var file = _b[_a];
                 _loop_6(file);
             }
@@ -31452,8 +33377,16 @@ var ts;
         return matchesExcludeWorker(pathToCheck, validatedExcludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath);
     }
     ts.isExcludedFile = isExcludedFile;
+    function invalidDotDotAfterRecursiveWildcard(s) {
+        var wildcardIndex = ts.startsWith(s, "**/") ? 0 : s.indexOf("/**/");
+        if (wildcardIndex === -1) {
+            return false;
+        }
+        var lastDotIndex = ts.endsWith(s, "/..") ? s.length : s.lastIndexOf("/../");
+        return lastDotIndex > wildcardIndex;
+    }
     function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory) {
-        return matchesExcludeWorker(pathToCheck, ts.filter(excludeSpecs, function (spec) { return !invalidDotDotAfterRecursiveWildcardPattern.test(spec); }), useCaseSensitiveFileNames, currentDirectory);
+        return matchesExcludeWorker(pathToCheck, ts.filter(excludeSpecs, function (spec) { return !invalidDotDotAfterRecursiveWildcard(spec); }), useCaseSensitiveFileNames, currentDirectory);
     }
     ts.matchesExclude = matchesExclude;
     function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames, currentDirectory, basePath) {
@@ -31486,7 +33419,7 @@ var ts;
         if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
             return [ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
         }
-        else if (invalidDotDotAfterRecursiveWildcardPattern.test(spec)) {
+        else if (invalidDotDotAfterRecursiveWildcard(spec)) {
             return [ts.Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
         }
     }
@@ -31531,9 +33464,14 @@ var ts;
     function getWildcardDirectoryFromSpec(spec, useCaseSensitiveFileNames) {
         var match = wildcardDirectoryPattern.exec(spec);
         if (match) {
+            var questionWildcardIndex = spec.indexOf("?");
+            var starWildcardIndex = spec.indexOf("*");
+            var lastDirectorySeperatorIndex = spec.lastIndexOf(ts.directorySeparator);
             return {
                 key: useCaseSensitiveFileNames ? match[0] : ts.toFileNameLowerCase(match[0]),
-                flags: watchRecursivePattern.test(spec) ? 1 : 0
+                flags: (questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex)
+                    || (starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex)
+                    ? 1 : 0
             };
         }
         if (ts.isImplicitGlob(spec)) {
@@ -31545,23 +33483,36 @@ var ts;
         return undefined;
     }
     function hasFileWithHigherPriorityExtension(file, literalFiles, wildcardFiles, extensions, keyMapper) {
-        var extensionPriority = ts.getExtensionPriority(file, extensions);
-        var adjustedExtensionPriority = ts.adjustExtensionPriority(extensionPriority, extensions);
-        for (var i = 0; i < adjustedExtensionPriority; i++) {
-            var higherPriorityExtension = extensions[i];
-            var higherPriorityPath = keyMapper(ts.changeExtension(file, higherPriorityExtension));
+        var extensionGroup = ts.forEach(extensions, function (group) { return ts.fileExtensionIsOneOf(file, group) ? group : undefined; });
+        if (!extensionGroup) {
+            return false;
+        }
+        for (var _i = 0, extensionGroup_1 = extensionGroup; _i < extensionGroup_1.length; _i++) {
+            var ext = extensionGroup_1[_i];
+            if (ts.fileExtensionIs(file, ext)) {
+                return false;
+            }
+            var higherPriorityPath = keyMapper(ts.changeExtension(file, ext));
             if (literalFiles.has(higherPriorityPath) || wildcardFiles.has(higherPriorityPath)) {
+                if (ext === ".d.ts" && (ts.fileExtensionIs(file, ".js") || ts.fileExtensionIs(file, ".jsx"))) {
+                    continue;
+                }
                 return true;
             }
         }
         return false;
     }
     function removeWildcardFilesWithLowerPriorityExtension(file, wildcardFiles, extensions, keyMapper) {
-        var extensionPriority = ts.getExtensionPriority(file, extensions);
-        var nextExtensionPriority = ts.getNextLowestExtensionPriority(extensionPriority, extensions);
-        for (var i = nextExtensionPriority; i < extensions.length; i++) {
-            var lowerPriorityExtension = extensions[i];
-            var lowerPriorityPath = keyMapper(ts.changeExtension(file, lowerPriorityExtension));
+        var extensionGroup = ts.forEach(extensions, function (group) { return ts.fileExtensionIsOneOf(file, group) ? group : undefined; });
+        if (!extensionGroup) {
+            return;
+        }
+        for (var i = extensionGroup.length - 1; i >= 0; i--) {
+            var ext = extensionGroup[i];
+            if (ts.fileExtensionIs(file, ext)) {
+                return;
+            }
+            var lowerPriorityPath = keyMapper(ts.changeExtension(file, ext));
             wildcardFiles.delete(lowerPriorityPath);
         }
     }
@@ -31599,6 +33550,25 @@ var ts;
                 });
         }
     }
+    function getDefaultValueForOption(option) {
+        switch (option.type) {
+            case "number":
+                return 1;
+            case "boolean":
+                return true;
+            case "string":
+                return option.isFilePath ? "./" : "";
+            case "list":
+                return [];
+            case "object":
+                return {};
+            default:
+                var iterResult = option.type.keys().next();
+                if (!iterResult.done)
+                    return iterResult.value;
+                return ts.Debug.fail("Expected 'option.type' to have entries.");
+        }
+    }
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -31732,7 +33702,7 @@ var ts;
         var bestVersionKey = result.version, bestVersionPaths = result.paths;
         if (typeof bestVersionPaths !== "object") {
             if (state.traceEnabled) {
-                trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['" + bestVersionKey + "']", "object", typeof bestVersionPaths);
+                trace(state.host, ts.Diagnostics.Expected_type_of_0_field_in_package_json_to_be_1_got_2, "typesVersions['".concat(bestVersionKey, "']"), "object", typeof bestVersionPaths);
             }
             return;
         }
@@ -31786,13 +33756,28 @@ var ts;
         return typeRoots;
     }
     var nodeModulesAtTypes = ts.combinePaths("node_modules", "@types");
-    function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference) {
+    function arePathsEqual(path1, path2, host) {
+        var useCaseSensitiveFileNames = typeof host.useCaseSensitiveFileNames === "function" ? host.useCaseSensitiveFileNames() : host.useCaseSensitiveFileNames;
+        return ts.comparePaths(path1, path2, !useCaseSensitiveFileNames) === 0;
+    }
+    function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, cache) {
         var traceEnabled = isTraceEnabled(options, host);
         if (redirectedReference) {
             options = redirectedReference.commandLine.options;
         }
-        var failedLookupLocations = [];
-        var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations };
+        var containingDirectory = containingFile ? ts.getDirectoryPath(containingFile) : undefined;
+        var perFolderCache = containingDirectory ? cache && cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference) : undefined;
+        var result = perFolderCache && perFolderCache.get(typeReferenceDirectiveName, undefined);
+        if (result) {
+            if (traceEnabled) {
+                trace(host, ts.Diagnostics.Resolving_type_reference_directive_0_containing_file_1, typeReferenceDirectiveName, containingFile);
+                if (redirectedReference)
+                    trace(host, ts.Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName);
+                trace(host, ts.Diagnostics.Resolution_for_type_reference_directive_0_was_found_in_cache_from_location_1, typeReferenceDirectiveName, containingDirectory);
+                traceResult(result);
+            }
+            return result;
+        }
         var typeRoots = getEffectiveTypeRoots(options, host);
         if (traceEnabled) {
             if (containingFile === undefined) {
@@ -31815,6 +33800,8 @@ var ts;
                 trace(host, ts.Diagnostics.Using_compiler_options_of_project_reference_redirect_0, redirectedReference.sourceFile.fileName);
             }
         }
+        var failedLookupLocations = [];
+        var moduleResolutionState = { compilerOptions: options, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.AllFeatures, conditions: ["node", "require", "types"] };
         var resolved = primaryLookup();
         var primary = true;
         if (!resolved) {
@@ -31825,17 +33812,31 @@ var ts;
         if (resolved) {
             var fileName = resolved.fileName, packageId = resolved.packageId;
             var resolvedFileName = options.preserveSymlinks ? fileName : realPath(fileName, host, traceEnabled);
-            if (traceEnabled) {
-                if (packageId) {
-                    trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3, typeReferenceDirectiveName, resolvedFileName, ts.packageIdToString(packageId), primary);
-                }
-                else {
-                    trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, resolvedFileName, primary);
-                }
+            resolvedTypeReferenceDirective = {
+                primary: primary,
+                resolvedFileName: resolvedFileName,
+                originalPath: arePathsEqual(fileName, resolvedFileName, host) ? undefined : fileName,
+                packageId: packageId,
+                isExternalLibraryImport: pathContainsNodeModules(fileName),
+            };
+        }
+        result = { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
+        perFolderCache === null || perFolderCache === void 0 ? void 0 : perFolderCache.set(typeReferenceDirectiveName, undefined, result);
+        if (traceEnabled)
+            traceResult(result);
+        return result;
+        function traceResult(result) {
+            var _a;
+            if (!((_a = result.resolvedTypeReferenceDirective) === null || _a === void 0 ? void 0 : _a.resolvedFileName)) {
+                trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
+            }
+            else if (result.resolvedTypeReferenceDirective.packageId) {
+                trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_with_Package_ID_2_primary_Colon_3, typeReferenceDirectiveName, result.resolvedTypeReferenceDirective.resolvedFileName, ts.packageIdToString(result.resolvedTypeReferenceDirective.packageId), result.resolvedTypeReferenceDirective.primary);
+            }
+            else {
+                trace(host, ts.Diagnostics.Type_reference_directive_0_was_successfully_resolved_to_1_primary_Colon_2, typeReferenceDirectiveName, result.resolvedTypeReferenceDirective.resolvedFileName, result.resolvedTypeReferenceDirective.primary);
             }
-            resolvedTypeReferenceDirective = { primary: primary, resolvedFileName: resolvedFileName, packageId: packageId, isExternalLibraryImport: pathContainsNodeModules(fileName) };
         }
-        return { resolvedTypeReferenceDirective: resolvedTypeReferenceDirective, failedLookupLocations: failedLookupLocations };
         function primaryLookup() {
             if (typeRoots && typeRoots.length) {
                 if (traceEnabled) {
@@ -31863,20 +33864,16 @@ var ts;
                 if (traceEnabled) {
                     trace(host, ts.Diagnostics.Looking_up_in_node_modules_folder_initial_location_0, initialLocationForSecondaryLookup);
                 }
-                var result = void 0;
+                var result_4;
                 if (!ts.isExternalModuleNameRelative(typeReferenceDirectiveName)) {
                     var searchResult = loadModuleFromNearestNodeModulesDirectory(Extensions.DtsOnly, typeReferenceDirectiveName, initialLocationForSecondaryLookup, moduleResolutionState, undefined, undefined);
-                    result = searchResult && searchResult.value;
+                    result_4 = searchResult && searchResult.value;
                 }
                 else {
                     var candidate = ts.normalizePathAndParts(ts.combinePaths(initialLocationForSecondaryLookup, typeReferenceDirectiveName)).path;
-                    result = nodeLoadModuleByRelativeName(Extensions.DtsOnly, candidate, false, moduleResolutionState, true);
+                    result_4 = nodeLoadModuleByRelativeName(Extensions.DtsOnly, candidate, false, moduleResolutionState, true);
                 }
-                var resolvedFile = resolvedTypeScriptOnly(result);
-                if (!resolvedFile && traceEnabled) {
-                    trace(host, ts.Diagnostics.Type_reference_directive_0_was_not_resolved, typeReferenceDirectiveName);
-                }
-                return resolvedFile;
+                return resolvedTypeScriptOnly(result_4);
             }
             else {
                 if (traceEnabled) {
@@ -31916,21 +33913,20 @@ var ts;
         return result;
     }
     ts.getAutomaticTypeDirectiveNames = getAutomaticTypeDirectiveNames;
-    function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options) {
-        return createModuleResolutionCacheWithMaps(createCacheWithRedirects(options), createCacheWithRedirects(options), currentDirectory, getCanonicalFileName);
-    }
-    ts.createModuleResolutionCache = createModuleResolutionCache;
     function createCacheWithRedirects(options) {
         var ownMap = new ts.Map();
         var redirectsMap = new ts.Map();
         return {
-            ownMap: ownMap,
+            getOwnMap: getOwnMap,
             redirectsMap: redirectsMap,
             getOrCreateMapOfCacheRedirects: getOrCreateMapOfCacheRedirects,
             clear: clear,
             setOwnOptions: setOwnOptions,
             setOwnMap: setOwnMap
         };
+        function getOwnMap() {
+            return ownMap;
+        }
         function setOwnOptions(newOptions) {
             options = newOptions;
         }
@@ -31955,25 +33951,133 @@ var ts;
         }
     }
     ts.createCacheWithRedirects = createCacheWithRedirects;
-    function createModuleResolutionCacheWithMaps(directoryToModuleNameMap, moduleNameToDirectoryMap, currentDirectory, getCanonicalFileName) {
-        return { getOrCreateCacheForDirectory: getOrCreateCacheForDirectory, getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, directoryToModuleNameMap: directoryToModuleNameMap, moduleNameToDirectoryMap: moduleNameToDirectoryMap };
+    function createPackageJsonInfoCache(currentDirectory, getCanonicalFileName) {
+        var cache;
+        return { getPackageJsonInfo: getPackageJsonInfo, setPackageJsonInfo: setPackageJsonInfo, clear: clear, entries: entries };
+        function getPackageJsonInfo(packageJsonPath) {
+            return cache === null || cache === void 0 ? void 0 : cache.get(ts.toPath(packageJsonPath, currentDirectory, getCanonicalFileName));
+        }
+        function setPackageJsonInfo(packageJsonPath, info) {
+            (cache || (cache = new ts.Map())).set(ts.toPath(packageJsonPath, currentDirectory, getCanonicalFileName), info);
+        }
+        function clear() {
+            cache = undefined;
+        }
+        function entries() {
+            var iter = cache === null || cache === void 0 ? void 0 : cache.entries();
+            return iter ? ts.arrayFrom(iter) : [];
+        }
+    }
+    function getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) {
+        var cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
+        var result = cache.get(key);
+        if (!result) {
+            result = create();
+            cache.set(key, result);
+        }
+        return result;
+    }
+    function updateRedirectsMap(options, directoryToModuleNameMap, moduleNameToDirectoryMap) {
+        if (!options.configFile)
+            return;
+        if (directoryToModuleNameMap.redirectsMap.size === 0) {
+            ts.Debug.assert(!moduleNameToDirectoryMap || moduleNameToDirectoryMap.redirectsMap.size === 0);
+            ts.Debug.assert(directoryToModuleNameMap.getOwnMap().size === 0);
+            ts.Debug.assert(!moduleNameToDirectoryMap || moduleNameToDirectoryMap.getOwnMap().size === 0);
+            directoryToModuleNameMap.redirectsMap.set(options.configFile.path, directoryToModuleNameMap.getOwnMap());
+            moduleNameToDirectoryMap === null || moduleNameToDirectoryMap === void 0 ? void 0 : moduleNameToDirectoryMap.redirectsMap.set(options.configFile.path, moduleNameToDirectoryMap.getOwnMap());
+        }
+        else {
+            ts.Debug.assert(!moduleNameToDirectoryMap || moduleNameToDirectoryMap.redirectsMap.size > 0);
+            var ref = {
+                sourceFile: options.configFile,
+                commandLine: { options: options }
+            };
+            directoryToModuleNameMap.setOwnMap(directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(ref));
+            moduleNameToDirectoryMap === null || moduleNameToDirectoryMap === void 0 ? void 0 : moduleNameToDirectoryMap.setOwnMap(moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(ref));
+        }
+        directoryToModuleNameMap.setOwnOptions(options);
+        moduleNameToDirectoryMap === null || moduleNameToDirectoryMap === void 0 ? void 0 : moduleNameToDirectoryMap.setOwnOptions(options);
+    }
+    function createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap) {
+        return {
+            getOrCreateCacheForDirectory: getOrCreateCacheForDirectory,
+            clear: clear,
+            update: update,
+        };
+        function clear() {
+            directoryToModuleNameMap.clear();
+        }
+        function update(options) {
+            updateRedirectsMap(options, directoryToModuleNameMap);
+        }
         function getOrCreateCacheForDirectory(directoryName, redirectedReference) {
             var path = ts.toPath(directoryName, currentDirectory, getCanonicalFileName);
-            return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, function () { return new ts.Map(); });
-        }
-        function getOrCreateCacheForModuleName(nonRelativeModuleName, redirectedReference) {
-            ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
-            return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, nonRelativeModuleName, createPerModuleNameCache);
+            return getOrCreateCache(directoryToModuleNameMap, redirectedReference, path, function () { return createModeAwareCache(); });
         }
-        function getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) {
-            var cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
-            var result = cache.get(key);
-            if (!result) {
-                result = create();
-                cache.set(key, result);
+    }
+    function createModeAwareCache() {
+        var underlying = new ts.Map();
+        var memoizedReverseKeys = new ts.Map();
+        var cache = {
+            get: function (specifier, mode) {
+                return underlying.get(getUnderlyingCacheKey(specifier, mode));
+            },
+            set: function (specifier, mode, value) {
+                underlying.set(getUnderlyingCacheKey(specifier, mode), value);
+                return cache;
+            },
+            delete: function (specifier, mode) {
+                underlying.delete(getUnderlyingCacheKey(specifier, mode));
+                return cache;
+            },
+            has: function (specifier, mode) {
+                return underlying.has(getUnderlyingCacheKey(specifier, mode));
+            },
+            forEach: function (cb) {
+                return underlying.forEach(function (elem, key) {
+                    var _a = memoizedReverseKeys.get(key), specifier = _a[0], mode = _a[1];
+                    return cb(elem, specifier, mode);
+                });
+            },
+            size: function () {
+                return underlying.size;
             }
+        };
+        return cache;
+        function getUnderlyingCacheKey(specifier, mode) {
+            var result = mode === undefined ? specifier : "".concat(mode, "|").concat(specifier);
+            memoizedReverseKeys.set(result, [specifier, mode]);
             return result;
         }
+    }
+    ts.createModeAwareCache = createModeAwareCache;
+    function zipToModeAwareCache(file, keys, values) {
+        ts.Debug.assert(keys.length === values.length);
+        var map = createModeAwareCache();
+        for (var i = 0; i < keys.length; ++i) {
+            map.set(keys[i], ts.getModeForResolutionAtIndex(file, i), values[i]);
+        }
+        return map;
+    }
+    ts.zipToModeAwareCache = zipToModeAwareCache;
+    function createModuleResolutionCache(currentDirectory, getCanonicalFileName, options, directoryToModuleNameMap, moduleNameToDirectoryMap) {
+        var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
+        moduleNameToDirectoryMap || (moduleNameToDirectoryMap = createCacheWithRedirects(options));
+        var packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName);
+        return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { getOrCreateCacheForModuleName: getOrCreateCacheForModuleName, clear: clear, update: update, getPackageJsonInfoCache: function () { return packageJsonInfoCache; } });
+        function clear() {
+            preDirectoryResolutionCache.clear();
+            moduleNameToDirectoryMap.clear();
+            packageJsonInfoCache.clear();
+        }
+        function update(options) {
+            updateRedirectsMap(options, directoryToModuleNameMap, moduleNameToDirectoryMap);
+        }
+        function getOrCreateCacheForModuleName(nonRelativeModuleName, mode, redirectedReference) {
+            ts.Debug.assert(!ts.isExternalModuleNameRelative(nonRelativeModuleName));
+            return getOrCreateCache(moduleNameToDirectoryMap, redirectedReference, mode === undefined ? nonRelativeModuleName : "".concat(mode, "|").concat(nonRelativeModuleName), createPerModuleNameCache);
+        }
         function createPerModuleNameCache() {
             var directoryPathMap = new ts.Map();
             return { get: get, set: set };
@@ -32021,14 +34125,26 @@ var ts;
             }
         }
     }
-    ts.createModuleResolutionCacheWithMaps = createModuleResolutionCacheWithMaps;
-    function resolveModuleNameFromCache(moduleName, containingFile, cache) {
+    ts.createModuleResolutionCache = createModuleResolutionCache;
+    function createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, options, packageJsonInfoCache, directoryToModuleNameMap) {
+        var preDirectoryResolutionCache = createPerDirectoryResolutionCache(currentDirectory, getCanonicalFileName, directoryToModuleNameMap || (directoryToModuleNameMap = createCacheWithRedirects(options)));
+        packageJsonInfoCache || (packageJsonInfoCache = createPackageJsonInfoCache(currentDirectory, getCanonicalFileName));
+        return __assign(__assign(__assign({}, packageJsonInfoCache), preDirectoryResolutionCache), { clear: clear });
+        function clear() {
+            preDirectoryResolutionCache.clear();
+            packageJsonInfoCache.clear();
+        }
+    }
+    ts.createTypeReferenceDirectiveResolutionCache = createTypeReferenceDirectiveResolutionCache;
+    function resolveModuleNameFromCache(moduleName, containingFile, cache, mode) {
         var containingDirectory = ts.getDirectoryPath(containingFile);
         var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory);
-        return perFolderCache && perFolderCache.get(moduleName);
+        if (!perFolderCache)
+            return undefined;
+        return perFolderCache.get(moduleName, mode);
     }
     ts.resolveModuleNameFromCache = resolveModuleNameFromCache;
-    function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
+    function resolveModuleName(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
         var traceEnabled = isTraceEnabled(compilerOptions, host);
         if (redirectedReference) {
             compilerOptions = redirectedReference.commandLine.options;
@@ -32041,7 +34157,7 @@ var ts;
         }
         var containingDirectory = ts.getDirectoryPath(containingFile);
         var perFolderCache = cache && cache.getOrCreateCacheForDirectory(containingDirectory, redirectedReference);
-        var result = perFolderCache && perFolderCache.get(moduleName);
+        var result = perFolderCache && perFolderCache.get(moduleName, resolutionMode);
         if (result) {
             if (traceEnabled) {
                 trace(host, ts.Diagnostics.Resolution_for_module_0_was_found_in_cache_from_location_1, moduleName, containingDirectory);
@@ -32050,7 +34166,20 @@ var ts;
         else {
             var moduleResolution = compilerOptions.moduleResolution;
             if (moduleResolution === undefined) {
-                moduleResolution = ts.getEmitModuleKind(compilerOptions) === ts.ModuleKind.CommonJS ? ts.ModuleResolutionKind.NodeJs : ts.ModuleResolutionKind.Classic;
+                switch (ts.getEmitModuleKind(compilerOptions)) {
+                    case ts.ModuleKind.CommonJS:
+                        moduleResolution = ts.ModuleResolutionKind.NodeJs;
+                        break;
+                    case ts.ModuleKind.Node12:
+                        moduleResolution = ts.ModuleResolutionKind.Node12;
+                        break;
+                    case ts.ModuleKind.NodeNext:
+                        moduleResolution = ts.ModuleResolutionKind.NodeNext;
+                        break;
+                    default:
+                        moduleResolution = ts.ModuleResolutionKind.Classic;
+                        break;
+                }
                 if (traceEnabled) {
                     trace(host, ts.Diagnostics.Module_resolution_kind_is_not_specified_using_0, ts.ModuleResolutionKind[moduleResolution]);
                 }
@@ -32062,6 +34191,12 @@ var ts;
             }
             ts.perfLogger.logStartResolveModule(moduleName);
             switch (moduleResolution) {
+                case ts.ModuleResolutionKind.Node12:
+                    result = node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
+                    break;
+                case ts.ModuleResolutionKind.NodeNext:
+                    result = nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
+                    break;
                 case ts.ModuleResolutionKind.NodeJs:
                     result = nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
                     break;
@@ -32069,15 +34204,15 @@ var ts;
                     result = classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference);
                     break;
                 default:
-                    return ts.Debug.fail("Unexpected moduleResolution: " + moduleResolution);
+                    return ts.Debug.fail("Unexpected moduleResolution: ".concat(moduleResolution));
             }
             if (result && result.resolvedModule)
-                ts.perfLogger.logInfoEvent("Module \"" + moduleName + "\" resolved to \"" + result.resolvedModule.resolvedFileName + "\"");
+                ts.perfLogger.logInfoEvent("Module \"".concat(moduleName, "\" resolved to \"").concat(result.resolvedModule.resolvedFileName, "\""));
             ts.perfLogger.logStopResolveModule((result && result.resolvedModule) ? "" + result.resolvedModule.resolvedFileName : "null");
             if (perFolderCache) {
-                perFolderCache.set(moduleName, result);
+                perFolderCache.set(moduleName, resolutionMode, result);
                 if (!ts.isExternalModuleNameRelative(moduleName)) {
-                    cache.getOrCreateCacheForModuleName(moduleName, redirectedReference).set(containingDirectory, result);
+                    cache.getOrCreateCacheForModuleName(moduleName, resolutionMode, redirectedReference).set(containingDirectory, result);
                 }
             }
         }
@@ -32109,7 +34244,8 @@ var ts;
         }
     }
     function tryLoadModuleUsingPathsIfEligible(extensions, moduleName, loader, state) {
-        var _a = state.compilerOptions, baseUrl = _a.baseUrl, paths = _a.paths;
+        var _a;
+        var _b = state.compilerOptions, baseUrl = _b.baseUrl, paths = _b.paths, configFile = _b.configFile;
         if (paths && !ts.pathIsRelative(moduleName)) {
             if (state.traceEnabled) {
                 if (baseUrl) {
@@ -32118,7 +34254,8 @@ var ts;
                 trace(state.host, ts.Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName);
             }
             var baseDirectory = ts.getPathsBasePath(state.compilerOptions, state.host);
-            return tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, loader, false, state);
+            var pathPatterns = (configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) ? (_a = configFile.configFileSpecs).pathPatterns || (_a.pathPatterns = ts.tryParsePatterns(paths)) : undefined;
+            return tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, false, state);
         }
     }
     function tryLoadModuleUsingRootDirs(extensions, moduleName, containingDirectory, loader, state) {
@@ -32200,32 +34337,60 @@ var ts;
     function resolveJSModule(moduleName, initialDir, host) {
         var _a = tryResolveJSModuleWorker(moduleName, initialDir, host), resolvedModule = _a.resolvedModule, failedLookupLocations = _a.failedLookupLocations;
         if (!resolvedModule) {
-            throw new Error("Could not resolve JS module '" + moduleName + "' starting at '" + initialDir + "'. Looked in: " + failedLookupLocations.join(", "));
+            throw new Error("Could not resolve JS module '".concat(moduleName, "' starting at '").concat(initialDir, "'. Looked in: ").concat(failedLookupLocations.join(", ")));
         }
         return resolvedModule.resolvedFileName;
     }
     ts.resolveJSModule = resolveJSModule;
     function tryResolveJSModule(moduleName, initialDir, host) {
-        var resolvedModule = tryResolveJSModuleWorker(moduleName, initialDir, host).resolvedModule;
-        return resolvedModule && resolvedModule.resolvedFileName;
+        return tryResolveJSModuleWorker(moduleName, initialDir, host).resolvedModule;
     }
     ts.tryResolveJSModule = tryResolveJSModule;
+    var NodeResolutionFeatures;
+    (function (NodeResolutionFeatures) {
+        NodeResolutionFeatures[NodeResolutionFeatures["None"] = 0] = "None";
+        NodeResolutionFeatures[NodeResolutionFeatures["Imports"] = 2] = "Imports";
+        NodeResolutionFeatures[NodeResolutionFeatures["SelfName"] = 4] = "SelfName";
+        NodeResolutionFeatures[NodeResolutionFeatures["Exports"] = 8] = "Exports";
+        NodeResolutionFeatures[NodeResolutionFeatures["ExportsPatternTrailers"] = 16] = "ExportsPatternTrailers";
+        NodeResolutionFeatures[NodeResolutionFeatures["AllFeatures"] = 30] = "AllFeatures";
+        NodeResolutionFeatures[NodeResolutionFeatures["EsmMode"] = 32] = "EsmMode";
+    })(NodeResolutionFeatures || (NodeResolutionFeatures = {}));
+    function node12ModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
+        return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.Imports | NodeResolutionFeatures.SelfName | NodeResolutionFeatures.Exports, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
+    }
+    function nodeNextModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
+        return nodeNextModuleNameResolverWorker(NodeResolutionFeatures.AllFeatures, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode);
+    }
+    function nodeNextModuleNameResolverWorker(features, moduleName, containingFile, compilerOptions, host, cache, redirectedReference, resolutionMode) {
+        var containingDirectory = ts.getDirectoryPath(containingFile);
+        var esmMode = resolutionMode === ts.ModuleKind.ESNext ? NodeResolutionFeatures.EsmMode : 0;
+        return nodeModuleNameResolverWorker(features | esmMode, moduleName, containingDirectory, compilerOptions, host, cache, compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions, redirectedReference);
+    }
     var jsOnlyExtensions = [Extensions.JavaScript];
     var tsExtensions = [Extensions.TypeScript, Extensions.JavaScript];
-    var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions), [Extensions.Json]);
+    var tsPlusJsonExtensions = __spreadArray(__spreadArray([], tsExtensions, true), [Extensions.Json], false);
     var tsconfigExtensions = [Extensions.TSConfig];
     function tryResolveJSModuleWorker(moduleName, initialDir, host) {
-        return nodeModuleNameResolverWorker(moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
+        return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
     }
     function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, lookupConfig) {
-        return nodeModuleNameResolverWorker(moduleName, ts.getDirectoryPath(containingFile), compilerOptions, host, cache, lookupConfig ? tsconfigExtensions : (compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions), redirectedReference);
+        return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, ts.getDirectoryPath(containingFile), compilerOptions, host, cache, lookupConfig ? tsconfigExtensions : (compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions), redirectedReference);
     }
     ts.nodeModuleNameResolver = nodeModuleNameResolver;
-    function nodeModuleNameResolverWorker(moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference) {
+    function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference) {
         var _a, _b;
         var traceEnabled = isTraceEnabled(compilerOptions, host);
         var failedLookupLocations = [];
-        var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations };
+        var state = {
+            compilerOptions: compilerOptions,
+            host: host,
+            traceEnabled: traceEnabled,
+            failedLookupLocations: failedLookupLocations,
+            packageJsonInfoCache: cache,
+            features: features,
+            conditions: features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"]
+        };
         var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
         return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
         function tryResolve(extensions) {
@@ -32235,16 +34400,25 @@ var ts;
                 return toSearchResult({ resolved: resolved, isExternalLibraryImport: pathContainsNodeModules(resolved.path) });
             }
             if (!ts.isExternalModuleNameRelative(moduleName)) {
-                if (traceEnabled) {
-                    trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
+                var resolved_1;
+                if (features & NodeResolutionFeatures.Imports && ts.startsWith(moduleName, "#")) {
+                    resolved_1 = loadModuleFromImports(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
+                }
+                if (!resolved_1 && features & NodeResolutionFeatures.SelfName) {
+                    resolved_1 = loadModuleFromSelfNameReference(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
+                }
+                if (!resolved_1) {
+                    if (traceEnabled) {
+                        trace(host, ts.Diagnostics.Loading_module_0_from_node_modules_folder_target_file_type_1, moduleName, Extensions[extensions]);
+                    }
+                    resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
                 }
-                var resolved_1 = loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, containingDirectory, state, cache, redirectedReference);
                 if (!resolved_1)
                     return undefined;
                 var resolvedValue = resolved_1.value;
                 if (!compilerOptions.preserveSymlinks && resolvedValue && !resolvedValue.originalPath) {
                     var path = realPath(resolvedValue.path, host, traceEnabled);
-                    var originalPath = path === resolvedValue.path ? undefined : resolvedValue.path;
+                    var originalPath = arePathsEqual(path, resolvedValue.path, host) ? undefined : resolvedValue.path;
                     resolvedValue = __assign(__assign({}, resolvedValue), { path: path, originalPath: originalPath });
                 }
                 return { value: resolvedValue && { resolved: resolvedValue, isExternalLibraryImport: true } };
@@ -32264,7 +34438,7 @@ var ts;
         if (traceEnabled) {
             trace(host, ts.Diagnostics.Resolving_real_path_for_0_result_1, path, real);
         }
-        ts.Debug.assert(host.fileExists(real), path + " linked to nonexistent file " + real);
+        ts.Debug.assert(host.fileExists(real), "".concat(path, " linked to nonexistent file ").concat(real));
         return real;
     }
     function nodeLoadModuleByRelativeName(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
@@ -32283,7 +34457,7 @@ var ts;
             }
             var resolvedFromFile = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state);
             if (resolvedFromFile) {
-                var packageDirectory = considerPackageJson ? parseNodeModuleFromPath(resolvedFromFile) : undefined;
+                var packageDirectory = considerPackageJson ? parseNodeModuleFromPath(resolvedFromFile.path) : undefined;
                 var packageInfo = packageDirectory ? getPackageJsonInfo(packageDirectory, false, state) : undefined;
                 return withPackageId(packageInfo, resolvedFromFile);
             }
@@ -32305,7 +34479,7 @@ var ts;
     }
     ts.pathContainsNodeModules = pathContainsNodeModules;
     function parseNodeModuleFromPath(resolved) {
-        var path = ts.normalizePath(resolved.path);
+        var path = ts.normalizePath(resolved);
         var idx = path.lastIndexOf(ts.nodeModulesPathPart);
         if (idx === -1) {
             return undefined;
@@ -32317,6 +34491,7 @@ var ts;
         }
         return path.slice(0, indexAfterPackageName);
     }
+    ts.parseNodeModuleFromPath = parseNodeModuleFromPath;
     function moveToNextDirectorySeparatorIfAvailable(path, prevSeparatorIndex) {
         var nextSeparatorIndex = path.indexOf(ts.directorySeparator, prevSeparatorIndex + 1);
         return nextSeparatorIndex === -1 ? prevSeparatorIndex : nextSeparatorIndex;
@@ -32327,22 +34502,35 @@ var ts;
     function loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) {
         if (extensions === Extensions.Json || extensions === Extensions.TSConfig) {
             var extensionLess = ts.tryRemoveExtension(candidate, ".json");
-            return (extensionLess === undefined && extensions === Extensions.Json) ? undefined : tryAddingExtensions(extensionLess || candidate, extensions, onlyRecordFailures, state);
+            var extension = extensionLess ? candidate.substring(extensionLess.length) : "";
+            return (extensionLess === undefined && extensions === Extensions.Json) ? undefined : tryAddingExtensions(extensionLess || candidate, extensions, extension, onlyRecordFailures, state);
         }
-        var resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, onlyRecordFailures, state);
-        if (resolvedByAddingExtension) {
-            return resolvedByAddingExtension;
+        if (!(state.features & NodeResolutionFeatures.EsmMode)) {
+            var resolvedByAddingExtension = tryAddingExtensions(candidate, extensions, "", onlyRecordFailures, state);
+            if (resolvedByAddingExtension) {
+                return resolvedByAddingExtension;
+            }
         }
-        if (ts.hasJSFileExtension(candidate)) {
+        return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
+    }
+    function loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state) {
+        if (ts.hasJSFileExtension(candidate) || (ts.fileExtensionIs(candidate, ".json") && state.compilerOptions.resolveJsonModule)) {
             var extensionless = ts.removeFileExtension(candidate);
+            var extension = candidate.substring(extensionless.length);
             if (state.traceEnabled) {
-                var extension = candidate.substring(extensionless.length);
                 trace(state.host, ts.Diagnostics.File_name_0_has_a_1_extension_stripping_it, candidate, extension);
             }
-            return tryAddingExtensions(extensionless, extensions, onlyRecordFailures, state);
+            return tryAddingExtensions(extensionless, extensions, extension, onlyRecordFailures, state);
         }
     }
-    function tryAddingExtensions(candidate, extensions, onlyRecordFailures, state) {
+    function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
+        if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.fileExtensionIsOneOf(candidate, [".d.ts", ".d.cts", ".d.mts"])) {
+            var result = tryFile(candidate, onlyRecordFailures, state);
+            return result !== undefined ? { path: candidate, ext: ts.forEach([".d.ts", ".d.cts", ".d.mts"], function (e) { return ts.fileExtensionIs(candidate, e) ? e : undefined; }) } : undefined;
+        }
+        return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
+    }
+    function tryAddingExtensions(candidate, extensions, originalExtension, onlyRecordFailures, state) {
         if (!onlyRecordFailures) {
             var directory = ts.getDirectoryPath(candidate);
             if (directory) {
@@ -32351,11 +34539,51 @@ var ts;
         }
         switch (extensions) {
             case Extensions.DtsOnly:
-                return tryExtension(".d.ts");
+                switch (originalExtension) {
+                    case ".mjs":
+                    case ".mts":
+                    case ".d.mts":
+                        return tryExtension(".d.mts");
+                    case ".cjs":
+                    case ".cts":
+                    case ".d.cts":
+                        return tryExtension(".d.cts");
+                    case ".json":
+                        candidate += ".json";
+                        return tryExtension(".d.ts");
+                    default: return tryExtension(".d.ts");
+                }
             case Extensions.TypeScript:
-                return tryExtension(".ts") || tryExtension(".tsx") || tryExtension(".d.ts");
+                switch (originalExtension) {
+                    case ".mjs":
+                    case ".mts":
+                    case ".d.mts":
+                        return tryExtension(".mts") || tryExtension(".d.mts");
+                    case ".cjs":
+                    case ".cts":
+                    case ".d.cts":
+                        return tryExtension(".cts") || tryExtension(".d.cts");
+                    case ".json":
+                        candidate += ".json";
+                        return tryExtension(".d.ts");
+                    default:
+                        return tryExtension(".ts") || tryExtension(".tsx") || tryExtension(".d.ts");
+                }
             case Extensions.JavaScript:
-                return tryExtension(".js") || tryExtension(".jsx");
+                switch (originalExtension) {
+                    case ".mjs":
+                    case ".mts":
+                    case ".d.mts":
+                        return tryExtension(".mjs");
+                    case ".cjs":
+                    case ".cts":
+                    case ".d.cts":
+                        return tryExtension(".cjs");
+                    case ".json":
+                        return tryExtension(".json");
+                    default:
+                        return tryExtension(".js") || tryExtension(".jsx");
+                }
             case Extensions.TSConfig:
             case Extensions.Json:
                 return tryExtension(".json");
@@ -32389,25 +34617,70 @@ var ts;
         var versionPaths = packageInfo && packageInfo.versionPaths;
         return withPackageId(packageInfo, loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageJsonContent, versionPaths));
     }
+    function getPackageScopeForPath(fileName, packageJsonInfoCache, host, options) {
+        var state = {
+            host: host,
+            compilerOptions: options,
+            traceEnabled: isTraceEnabled(options, host),
+            failedLookupLocations: [],
+            packageJsonInfoCache: packageJsonInfoCache,
+            features: 0,
+            conditions: [],
+        };
+        var parts = ts.getPathComponents(fileName);
+        parts.pop();
+        while (parts.length > 0) {
+            var pkg = getPackageJsonInfo(ts.getPathFromPathComponents(parts), false, state);
+            if (pkg) {
+                return pkg;
+            }
+            parts.pop();
+        }
+        return undefined;
+    }
+    ts.getPackageScopeForPath = getPackageScopeForPath;
     function getPackageJsonInfo(packageDirectory, onlyRecordFailures, state) {
+        var _a, _b, _c;
         var host = state.host, traceEnabled = state.traceEnabled;
-        var directoryExists = !onlyRecordFailures && ts.directoryProbablyExists(packageDirectory, host);
         var packageJsonPath = ts.combinePaths(packageDirectory, "package.json");
+        if (onlyRecordFailures) {
+            state.failedLookupLocations.push(packageJsonPath);
+            return undefined;
+        }
+        var existing = (_a = state.packageJsonInfoCache) === null || _a === void 0 ? void 0 : _a.getPackageJsonInfo(packageJsonPath);
+        if (existing !== undefined) {
+            if (typeof existing !== "boolean") {
+                if (traceEnabled)
+                    trace(host, ts.Diagnostics.File_0_exists_according_to_earlier_cached_lookups, packageJsonPath);
+                return existing;
+            }
+            else {
+                if (existing && traceEnabled)
+                    trace(host, ts.Diagnostics.File_0_does_not_exist_according_to_earlier_cached_lookups, packageJsonPath);
+                state.failedLookupLocations.push(packageJsonPath);
+                return undefined;
+            }
+        }
+        var directoryExists = ts.directoryProbablyExists(packageDirectory, host);
         if (directoryExists && host.fileExists(packageJsonPath)) {
             var packageJsonContent = ts.readJson(packageJsonPath, host);
             if (traceEnabled) {
                 trace(host, ts.Diagnostics.Found_package_json_at_0, packageJsonPath);
             }
             var versionPaths = readPackageJsonTypesVersionPaths(packageJsonContent, state);
-            return { packageDirectory: packageDirectory, packageJsonContent: packageJsonContent, versionPaths: versionPaths };
+            var result = { packageDirectory: packageDirectory, packageJsonContent: packageJsonContent, versionPaths: versionPaths };
+            (_b = state.packageJsonInfoCache) === null || _b === void 0 ? void 0 : _b.setPackageJsonInfo(packageJsonPath, result);
+            return result;
         }
         else {
             if (directoryExists && traceEnabled) {
                 trace(host, ts.Diagnostics.File_0_does_not_exist, packageJsonPath);
             }
+            (_c = state.packageJsonInfoCache) === null || _c === void 0 ? void 0 : _c.setPackageJsonInfo(packageJsonPath, directoryExists);
             state.failedLookupLocations.push(packageJsonPath);
         }
     }
+    ts.getPackageJsonInfo = getPackageJsonInfo;
     function loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, jsonContent, versionPaths) {
         var packageFile;
         if (jsonContent) {
@@ -32451,7 +34724,7 @@ var ts;
             if (state.traceEnabled) {
                 trace(state.host, ts.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, versionPaths.version, ts.version, moduleName);
             }
-            var result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);
+            var result = tryLoadModuleUsingPaths(extensions, moduleName, candidate, versionPaths.paths, undefined, loader, onlyRecordFailuresForPackageFile || onlyRecordFailuresForIndex, state);
             if (result) {
                 return removeIgnoredPackageId(result.value);
             }
@@ -32459,7 +34732,9 @@ var ts;
         var packageFileResult = packageFile && removeIgnoredPackageId(loader(extensions, packageFile, onlyRecordFailuresForPackageFile, state));
         if (packageFileResult)
             return packageFileResult;
-        return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
+        if (!(state.features & NodeResolutionFeatures.EsmMode)) {
+            return loadModuleFromFile(extensions, indexPath, onlyRecordFailuresForIndex, state);
+        }
     }
     function resolvedIfExtensionMatches(extensions, path) {
         var ext = ts.tryGetExtensionFromPath(path);
@@ -32486,6 +34761,227 @@ var ts;
         return idx === -1 ? { packageName: moduleName, rest: "" } : { packageName: moduleName.slice(0, idx), rest: moduleName.slice(idx + 1) };
     }
     ts.parsePackageName = parsePackageName;
+    function allKeysStartWithDot(obj) {
+        return ts.every(ts.getOwnKeys(obj), function (k) { return ts.startsWith(k, "."); });
+    }
+    ts.allKeysStartWithDot = allKeysStartWithDot;
+    function noKeyStartsWithDot(obj) {
+        return !ts.some(ts.getOwnKeys(obj), function (k) { return ts.startsWith(k, "."); });
+    }
+    function loadModuleFromSelfNameReference(extensions, moduleName, directory, state, cache, redirectedReference) {
+        var _a, _b;
+        var useCaseSensitiveFileNames = typeof state.host.useCaseSensitiveFileNames === "function" ? state.host.useCaseSensitiveFileNames() : state.host.useCaseSensitiveFileNames;
+        var directoryPath = ts.toPath(ts.combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a), ts.createGetCanonicalFileName(useCaseSensitiveFileNames === undefined ? true : useCaseSensitiveFileNames));
+        var scope = getPackageScopeForPath(directoryPath, state.packageJsonInfoCache, state.host, state.compilerOptions);
+        if (!scope || !scope.packageJsonContent.exports) {
+            return undefined;
+        }
+        if (typeof scope.packageJsonContent.name !== "string") {
+            return undefined;
+        }
+        var parts = ts.getPathComponents(moduleName);
+        var nameParts = ts.getPathComponents(scope.packageJsonContent.name);
+        if (!ts.every(nameParts, function (p, i) { return parts[i] === p; })) {
+            return undefined;
+        }
+        var trailingParts = parts.slice(nameParts.length);
+        return loadModuleFromExports(scope, extensions, !ts.length(trailingParts) ? "." : ".".concat(ts.directorySeparator).concat(trailingParts.join(ts.directorySeparator)), state, cache, redirectedReference);
+    }
+    function loadModuleFromExports(scope, extensions, subpath, state, cache, redirectedReference) {
+        if (!scope.packageJsonContent.exports) {
+            return undefined;
+        }
+        if (subpath === ".") {
+            var mainExport = void 0;
+            if (typeof scope.packageJsonContent.exports === "string" || Array.isArray(scope.packageJsonContent.exports) || (typeof scope.packageJsonContent.exports === "object" && noKeyStartsWithDot(scope.packageJsonContent.exports))) {
+                mainExport = scope.packageJsonContent.exports;
+            }
+            else if (ts.hasProperty(scope.packageJsonContent.exports, ".")) {
+                mainExport = scope.packageJsonContent.exports["."];
+            }
+            if (mainExport) {
+                var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, subpath, scope, false);
+                return loadModuleFromTargetImportOrExport(mainExport, "", false);
+            }
+        }
+        else if (allKeysStartWithDot(scope.packageJsonContent.exports)) {
+            if (typeof scope.packageJsonContent.exports !== "object") {
+                if (state.traceEnabled) {
+                    trace(state.host, ts.Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory);
+                }
+                return toSearchResult(undefined);
+            }
+            var result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, subpath, scope.packageJsonContent.exports, scope, false);
+            if (result) {
+                return result;
+            }
+        }
+        if (state.traceEnabled) {
+            trace(state.host, ts.Diagnostics.Export_specifier_0_does_not_exist_in_package_json_scope_at_path_1, subpath, scope.packageDirectory);
+        }
+        return toSearchResult(undefined);
+    }
+    function loadModuleFromImports(extensions, moduleName, directory, state, cache, redirectedReference) {
+        var _a, _b;
+        if (moduleName === "#" || ts.startsWith(moduleName, "#/")) {
+            if (state.traceEnabled) {
+                trace(state.host, ts.Diagnostics.Invalid_import_specifier_0_has_no_possible_resolutions, moduleName);
+            }
+            return toSearchResult(undefined);
+        }
+        var useCaseSensitiveFileNames = typeof state.host.useCaseSensitiveFileNames === "function" ? state.host.useCaseSensitiveFileNames() : state.host.useCaseSensitiveFileNames;
+        var directoryPath = ts.toPath(ts.combinePaths(directory, "dummy"), (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a), ts.createGetCanonicalFileName(useCaseSensitiveFileNames === undefined ? true : useCaseSensitiveFileNames));
+        var scope = getPackageScopeForPath(directoryPath, state.packageJsonInfoCache, state.host, state.compilerOptions);
+        if (!scope) {
+            if (state.traceEnabled) {
+                trace(state.host, ts.Diagnostics.Directory_0_has_no_containing_package_json_scope_Imports_will_not_resolve, directoryPath);
+            }
+            return toSearchResult(undefined);
+        }
+        if (!scope.packageJsonContent.imports) {
+            if (state.traceEnabled) {
+                trace(state.host, ts.Diagnostics.package_json_scope_0_has_no_imports_defined, scope.packageDirectory);
+            }
+            return toSearchResult(undefined);
+        }
+        var result = loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, scope.packageJsonContent.imports, scope, true);
+        if (result) {
+            return result;
+        }
+        if (state.traceEnabled) {
+            trace(state.host, ts.Diagnostics.Import_specifier_0_does_not_exist_in_package_json_scope_at_path_1, moduleName, scope.packageDirectory);
+        }
+        return toSearchResult(undefined);
+    }
+    function loadModuleFromImportsOrExports(extensions, state, cache, redirectedReference, moduleName, lookupTable, scope, isImports) {
+        var loadModuleFromTargetImportOrExport = getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports);
+        if (!ts.endsWith(moduleName, ts.directorySeparator) && moduleName.indexOf("*") === -1 && ts.hasProperty(lookupTable, moduleName)) {
+            var target = lookupTable[moduleName];
+            return loadModuleFromTargetImportOrExport(target, "", false);
+        }
+        var expandingKeys = ts.sort(ts.filter(ts.getOwnKeys(lookupTable), function (k) { return k.indexOf("*") !== -1 || ts.endsWith(k, "/"); }), function (a, b) { return a.length - b.length; });
+        for (var _i = 0, expandingKeys_1 = expandingKeys; _i < expandingKeys_1.length; _i++) {
+            var potentialTarget = expandingKeys_1[_i];
+            if (state.features & NodeResolutionFeatures.ExportsPatternTrailers && matchesPatternWithTrailer(potentialTarget, moduleName)) {
+                var target = lookupTable[potentialTarget];
+                var starPos = potentialTarget.indexOf("*");
+                var subpath = moduleName.substring(potentialTarget.substring(0, starPos).length, moduleName.length - (potentialTarget.length - 1 - starPos));
+                return loadModuleFromTargetImportOrExport(target, subpath, true);
+            }
+            else if (ts.endsWith(potentialTarget, "*") && ts.startsWith(moduleName, potentialTarget.substring(0, potentialTarget.length - 1))) {
+                var target = lookupTable[potentialTarget];
+                var subpath = moduleName.substring(potentialTarget.length - 1);
+                return loadModuleFromTargetImportOrExport(target, subpath, true);
+            }
+            else if (ts.startsWith(moduleName, potentialTarget)) {
+                var target = lookupTable[potentialTarget];
+                var subpath = moduleName.substring(potentialTarget.length);
+                return loadModuleFromTargetImportOrExport(target, subpath, false);
+            }
+        }
+        function matchesPatternWithTrailer(target, name) {
+            if (ts.endsWith(target, "*"))
+                return false;
+            var starPos = target.indexOf("*");
+            if (starPos === -1)
+                return false;
+            return ts.startsWith(name, target.substring(0, starPos)) && ts.endsWith(name, target.substring(starPos + 1));
+        }
+    }
+    function getLoadModuleFromTargetImportOrExport(extensions, state, cache, redirectedReference, moduleName, scope, isImports) {
+        return loadModuleFromTargetImportOrExport;
+        function loadModuleFromTargetImportOrExport(target, subpath, pattern) {
+            var _a, _b;
+            if (typeof target === "string") {
+                if (!pattern && subpath.length > 0 && !ts.endsWith(target, "/")) {
+                    if (state.traceEnabled) {
+                        trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
+                    }
+                    return toSearchResult(undefined);
+                }
+                if (!ts.startsWith(target, "./")) {
+                    if (isImports && !ts.startsWith(target, "../") && !ts.startsWith(target, "/") && !ts.isRootedDiskPath(target)) {
+                        var combinedLookup = pattern ? target.replace(/\*/g, subpath) : target + subpath;
+                        var result = nodeModuleNameResolverWorker(state.features, combinedLookup, scope.packageDirectory + "/", state.compilerOptions, state.host, cache, [extensions], redirectedReference);
+                        return toSearchResult(result.resolvedModule ? { path: result.resolvedModule.resolvedFileName, extension: result.resolvedModule.extension, packageId: result.resolvedModule.packageId, originalPath: result.resolvedModule.originalPath } : undefined);
+                    }
+                    if (state.traceEnabled) {
+                        trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
+                    }
+                    return toSearchResult(undefined);
+                }
+                var parts = ts.pathIsRelative(target) ? ts.getPathComponents(target).slice(1) : ts.getPathComponents(target);
+                var partsAfterFirst = parts.slice(1);
+                if (partsAfterFirst.indexOf("..") >= 0 || partsAfterFirst.indexOf(".") >= 0 || partsAfterFirst.indexOf("node_modules") >= 0) {
+                    if (state.traceEnabled) {
+                        trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
+                    }
+                    return toSearchResult(undefined);
+                }
+                var resolvedTarget = ts.combinePaths(scope.packageDirectory, target);
+                var subpathParts = ts.getPathComponents(subpath);
+                if (subpathParts.indexOf("..") >= 0 || subpathParts.indexOf(".") >= 0 || subpathParts.indexOf("node_modules") >= 0) {
+                    if (state.traceEnabled) {
+                        trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
+                    }
+                    return toSearchResult(undefined);
+                }
+                var finalPath = ts.getNormalizedAbsolutePath(pattern ? resolvedTarget.replace(/\*/g, subpath) : resolvedTarget + subpath, (_b = (_a = state.host).getCurrentDirectory) === null || _b === void 0 ? void 0 : _b.call(_a));
+                return toSearchResult(withPackageId(scope, loadJSOrExactTSFileName(extensions, finalPath, false, state)));
+            }
+            else if (typeof target === "object" && target !== null) {
+                if (!Array.isArray(target)) {
+                    for (var _i = 0, _c = ts.getOwnKeys(target); _i < _c.length; _i++) {
+                        var key = _c[_i];
+                        if (key === "default" || state.conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(state.conditions, key)) {
+                            var subTarget = target[key];
+                            var result = loadModuleFromTargetImportOrExport(subTarget, subpath, pattern);
+                            if (result) {
+                                return result;
+                            }
+                        }
+                    }
+                    return undefined;
+                }
+                else {
+                    if (!ts.length(target)) {
+                        if (state.traceEnabled) {
+                            trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
+                        }
+                        return toSearchResult(undefined);
+                    }
+                    for (var _d = 0, target_1 = target; _d < target_1.length; _d++) {
+                        var elem = target_1[_d];
+                        var result = loadModuleFromTargetImportOrExport(elem, subpath, pattern);
+                        if (result) {
+                            return result;
+                        }
+                    }
+                }
+            }
+            else if (target === null) {
+                if (state.traceEnabled) {
+                    trace(state.host, ts.Diagnostics.package_json_scope_0_explicitly_maps_specifier_1_to_null, scope.packageDirectory, moduleName);
+                }
+                return toSearchResult(undefined);
+            }
+            if (state.traceEnabled) {
+                trace(state.host, ts.Diagnostics.package_json_scope_0_has_invalid_type_for_target_of_specifier_1, scope.packageDirectory, moduleName);
+            }
+            return toSearchResult(undefined);
+        }
+    }
+    function isApplicableVersionedTypesKey(conditions, key) {
+        if (conditions.indexOf("types") === -1)
+            return false;
+        if (!ts.startsWith(key, "types@"))
+            return false;
+        var range = ts.VersionRange.tryParse(key.substring("types@".length));
+        if (!range)
+            return false;
+        return range.test(ts.version);
+    }
+    ts.isApplicableVersionedTypesKey = isApplicableVersionedTypesKey;
     function loadModuleFromNearestNodeModulesDirectory(extensions, moduleName, directory, state, cache, redirectedReference) {
         return loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, false, cache, redirectedReference);
     }
@@ -32493,24 +34989,24 @@ var ts;
         return loadModuleFromNearestNodeModulesDirectoryWorker(Extensions.DtsOnly, moduleName, directory, state, true, undefined, undefined);
     }
     function loadModuleFromNearestNodeModulesDirectoryWorker(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
-        var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName, redirectedReference);
+        var perModuleNameCache = cache && cache.getOrCreateCacheForModuleName(moduleName, state.features === 0 ? undefined : state.features & NodeResolutionFeatures.EsmMode ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS, redirectedReference);
         return ts.forEachAncestorDirectory(ts.normalizeSlashes(directory), function (ancestorDirectory) {
             if (ts.getBaseFileName(ancestorDirectory) !== "node_modules") {
                 var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache, moduleName, ancestorDirectory, state);
                 if (resolutionFromCache) {
                     return resolutionFromCache;
                 }
-                return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, ancestorDirectory, state, typesScopeOnly));
+                return toSearchResult(loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, ancestorDirectory, state, typesScopeOnly, cache, redirectedReference));
             }
         });
     }
-    function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly) {
+    function loadModuleFromImmediateNodeModulesDirectory(extensions, moduleName, directory, state, typesScopeOnly, cache, redirectedReference) {
         var nodeModulesFolder = ts.combinePaths(directory, "node_modules");
         var nodeModulesFolderExists = ts.directoryProbablyExists(nodeModulesFolder, state.host);
         if (!nodeModulesFolderExists && state.traceEnabled) {
             trace(state.host, ts.Diagnostics.Directory_0_does_not_exist_skipping_all_lookups_in_it, nodeModulesFolder);
         }
-        var packageResult = typesScopeOnly ? undefined : loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state);
+        var packageResult = typesScopeOnly ? undefined : loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesFolder, nodeModulesFolderExists, state, cache, redirectedReference);
         if (packageResult) {
             return packageResult;
         }
@@ -32523,26 +35019,32 @@ var ts;
                 }
                 nodeModulesAtTypesExists = false;
             }
-            return loadModuleFromSpecificNodeModulesDirectory(Extensions.DtsOnly, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, state);
+            return loadModuleFromSpecificNodeModulesDirectory(Extensions.DtsOnly, mangleScopedPackageNameWithTrace(moduleName, state), nodeModulesAtTypes_1, nodeModulesAtTypesExists, state, cache, redirectedReference);
         }
     }
-    function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state) {
+    function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
         var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName));
         var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
-        if (packageInfo) {
-            var fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state);
-            if (fromFile) {
-                return noPackageId(fromFile);
+        if (!(state.features & NodeResolutionFeatures.Exports)) {
+            if (packageInfo) {
+                var fromFile = loadModuleFromFile(extensions, candidate, !nodeModulesDirectoryExists, state);
+                if (fromFile) {
+                    return noPackageId(fromFile);
+                }
+                var fromDirectory = loadNodeModuleFromDirectoryWorker(extensions, candidate, !nodeModulesDirectoryExists, state, packageInfo.packageJsonContent, packageInfo.versionPaths);
+                return withPackageId(packageInfo, fromDirectory);
             }
-            var fromDirectory = loadNodeModuleFromDirectoryWorker(extensions, candidate, !nodeModulesDirectoryExists, state, packageInfo.packageJsonContent, packageInfo.versionPaths);
-            return withPackageId(packageInfo, fromDirectory);
         }
+        var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
         var loader = function (extensions, candidate, onlyRecordFailures, state) {
+            var _a;
+            if (packageInfo && packageInfo.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
+                return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
+            }
             var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
                 loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.packageJsonContent, packageInfo && packageInfo.versionPaths);
             return withPackageId(packageInfo, pathAndExtension);
         };
-        var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
         if (rest !== "") {
             var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
             packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
@@ -32551,7 +35053,7 @@ var ts;
                     trace(state.host, ts.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, packageInfo.versionPaths.version, ts.version, rest);
                 }
                 var packageDirectoryExists = nodeModulesDirectoryExists && ts.directoryProbablyExists(packageDirectory, state.host);
-                var fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, packageInfo.versionPaths.paths, loader, !packageDirectoryExists, state);
+                var fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, packageInfo.versionPaths.paths, undefined, loader, !packageDirectoryExists, state);
                 if (fromPaths) {
                     return fromPaths.value;
                 }
@@ -32559,8 +35061,9 @@ var ts;
         }
         return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
     }
-    function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, loader, onlyRecordFailures, state) {
-        var matchedPattern = ts.matchPatternOrExact(ts.getOwnKeys(paths), moduleName);
+    function tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, pathPatterns, loader, onlyRecordFailures, state) {
+        pathPatterns || (pathPatterns = ts.tryParsePatterns(paths));
+        var matchedPattern = ts.matchPatternOrExact(pathPatterns, moduleName);
         if (matchedPattern) {
             var matchedStar_1 = ts.isString(matchedPattern) ? undefined : ts.matchedText(matchedPattern, moduleName);
             var matchedPatternText = ts.isString(matchedPattern) ? matchedPattern : ts.patternText(matchedPattern);
@@ -32594,7 +35097,7 @@ var ts;
         return mangled;
     }
     function getTypesPackageName(packageName) {
-        return "@types/" + mangleScopedPackageName(packageName);
+        return "@types/".concat(mangleScopedPackageName(packageName));
     }
     ts.getTypesPackageName = getTypesPackageName;
     function mangleScopedPackageName(packageName) {
@@ -32634,7 +35137,7 @@ var ts;
     function classicNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference) {
         var traceEnabled = isTraceEnabled(compilerOptions, host);
         var failedLookupLocations = [];
-        var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations };
+        var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: cache, features: NodeResolutionFeatures.None, conditions: [] };
         var containingDirectory = ts.getDirectoryPath(containingFile);
         var resolved = tryResolve(Extensions.TypeScript) || tryResolve(Extensions.JavaScript);
         return createResolvedModuleWithFailedLookupLocations(resolved && resolved.value, false, failedLookupLocations, state.resultFromCache);
@@ -32644,7 +35147,7 @@ var ts;
                 return { value: resolvedUsingSettings };
             }
             if (!ts.isExternalModuleNameRelative(moduleName)) {
-                var perModuleNameCache_1 = cache && cache.getOrCreateCacheForModuleName(moduleName, redirectedReference);
+                var perModuleNameCache_1 = cache && cache.getOrCreateCacheForModuleName(moduleName, undefined, redirectedReference);
                 var resolved_3 = ts.forEachAncestorDirectory(containingDirectory, function (directory) {
                     var resolutionFromCache = tryFindNonRelativeModuleNameInCache(perModuleNameCache_1, moduleName, directory, state);
                     if (resolutionFromCache) {
@@ -32667,14 +35170,14 @@ var ts;
         }
     }
     ts.classicNameResolver = classicNameResolver;
-    function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache) {
+    function loadModuleFromGlobalCache(moduleName, projectName, compilerOptions, host, globalCache, packageJsonInfoCache) {
         var traceEnabled = isTraceEnabled(compilerOptions, host);
         if (traceEnabled) {
             trace(host, ts.Diagnostics.Auto_discovery_for_typings_is_enabled_in_project_0_Running_extra_resolution_pass_for_module_1_using_cache_location_2, projectName, moduleName, globalCache);
         }
         var failedLookupLocations = [];
-        var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations };
-        var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false);
+        var state = { compilerOptions: compilerOptions, host: host, traceEnabled: traceEnabled, failedLookupLocations: failedLookupLocations, packageJsonInfoCache: packageJsonInfoCache, features: NodeResolutionFeatures.None, conditions: [] };
+        var resolved = loadModuleFromImmediateNodeModulesDirectory(Extensions.DtsOnly, moduleName, globalCache, state, false, undefined, undefined);
         return createResolvedModuleWithFailedLookupLocations(resolved, true, failedLookupLocations, state.resultFromCache);
     }
     ts.loadModuleFromGlobalCache = loadModuleFromGlobalCache;
@@ -32705,23 +35208,23 @@ var ts;
     }
     function getModuleInstanceStateWorker(node, visited) {
         switch (node.kind) {
-            case 253:
-            case 254:
+            case 257:
+            case 258:
                 return 0;
-            case 255:
+            case 259:
                 if (ts.isEnumConst(node)) {
                     return 2;
                 }
                 break;
-            case 261:
-            case 260:
+            case 265:
+            case 264:
                 if (!(ts.hasSyntacticModifier(node, 1))) {
                     return 0;
                 }
                 break;
-            case 267:
+            case 271:
                 var exportDeclaration = node;
-                if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 268) {
+                if (!exportDeclaration.moduleSpecifier && exportDeclaration.exportClause && exportDeclaration.exportClause.kind === 272) {
                     var state = 0;
                     for (var _i = 0, _a = exportDeclaration.exportClause.elements; _i < _a.length; _i++) {
                         var specifier = _a[_i];
@@ -32736,7 +35239,7 @@ var ts;
                     return state;
                 }
                 break;
-            case 257: {
+            case 261: {
                 var state_1 = 0;
                 ts.forEachChild(node, function (n) {
                     var childState = getModuleInstanceStateCached(n, visited);
@@ -32755,9 +35258,9 @@ var ts;
                 });
                 return state_1;
             }
-            case 256:
+            case 260:
                 return getModuleInstanceState(node, visited);
-            case 78:
+            case 79:
                 if (node.isInJSDocNamespace) {
                     return 0;
                 }
@@ -32840,6 +35343,7 @@ var ts;
         var classifiableNames;
         var unreachableFlow = { flags: 1 };
         var reportedUnreachableFlow = { flags: 1 };
+        var bindBinaryExpressionFlow = createBindBinaryExpressionFlow();
         function createDiagnosticForNode(node, message, arg0, arg1, arg2) {
             return ts.createDiagnosticForNodeInSourceFile(ts.getSourceFileOfNode(node) || file, node, message, arg0, arg1, arg2);
         }
@@ -32912,16 +35416,16 @@ var ts;
             }
         }
         function getDeclarationName(node) {
-            if (node.kind === 266) {
+            if (node.kind === 270) {
                 return node.isExportEquals ? "export=" : "default";
             }
             var name = ts.getNameOfDeclaration(node);
             if (name) {
                 if (ts.isAmbientModule(node)) {
                     var moduleName = ts.getTextOfIdentifierOrLiteral(name);
-                    return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"" + moduleName + "\"");
+                    return (ts.isGlobalScopeAugmentation(node) ? "__global" : "\"".concat(moduleName, "\""));
                 }
-                if (name.kind === 158) {
+                if (name.kind === 161) {
                     var nameExpression = name.expression;
                     if (ts.isStringOrNumericLiteralLike(nameExpression)) {
                         return ts.escapeLeadingUnderscores(nameExpression.text);
@@ -32929,11 +35433,9 @@ var ts;
                     if (ts.isSignedNumericLiteral(nameExpression)) {
                         return ts.tokenToString(nameExpression.operator) + nameExpression.operand.text;
                     }
-                    ts.Debug.assert(ts.isWellKnownSymbolSyntactically(nameExpression));
-                    return ts.getPropertyNameForKnownSymbolName(ts.idText(nameExpression.name));
-                }
-                if (ts.isWellKnownSymbolSyntactically(name)) {
-                    return ts.getPropertyNameForKnownSymbolName(ts.idText(name.name));
+                    else {
+                        ts.Debug.fail("Only computed properties with literal names have declaration names");
+                    }
                 }
                 if (ts.isPrivateIdentifier(name)) {
                     var containingClass = ts.getContainingClass(node);
@@ -32946,31 +35448,31 @@ var ts;
                 return ts.isPropertyNameLiteral(name) ? ts.getEscapedTextOfIdentifierOrLiteral(name) : undefined;
             }
             switch (node.kind) {
-                case 166:
+                case 170:
                     return "__constructor";
-                case 174:
-                case 169:
-                case 313:
+                case 178:
+                case 173:
+                case 321:
                     return "__call";
-                case 175:
-                case 170:
+                case 179:
+                case 174:
                     return "__new";
-                case 171:
+                case 175:
                     return "__index";
-                case 267:
+                case 271:
                     return "__export";
-                case 297:
+                case 303:
                     return "export=";
-                case 216:
+                case 220:
                     if (ts.getAssignmentDeclarationKind(node) === 2) {
                         return "export=";
                     }
                     ts.Debug.fail("Unknown binary declaration kind");
                     break;
-                case 308:
+                case 315:
                     return (ts.isJSDocConstructSignature(node) ? "__new" : "__call");
-                case 160:
-                    ts.Debug.assert(node.parent.kind === 308, "Impossible parameter parent kind", function () { return "parent is: " + (ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind) + ", expected JSDocFunctionType"; });
+                case 163:
+                    ts.Debug.assert(node.parent.kind === 315, "Impossible parameter parent kind", function () { return "parent is: ".concat(ts.SyntaxKind ? ts.SyntaxKind[node.parent.kind] : node.parent.kind, ", expected JSDocFunctionType"); });
                     var functionType = node.parent;
                     var index = functionType.parameters.indexOf(node);
                     return "arg" + index;
@@ -32979,10 +35481,12 @@ var ts;
         function getDisplayName(node) {
             return ts.isNamedDeclaration(node) ? ts.declarationNameToString(node.name) : ts.unescapeLeadingUnderscores(ts.Debug.checkDefined(getDeclarationName(node)));
         }
-        function declareSymbol(symbolTable, parent, node, includes, excludes, isReplaceableByMethod) {
-            ts.Debug.assert(!ts.hasDynamicName(node));
+        function declareSymbol(symbolTable, parent, node, includes, excludes, isReplaceableByMethod, isComputedName) {
+            ts.Debug.assert(isComputedName || !ts.hasDynamicName(node));
             var isDefaultExport = ts.hasSyntacticModifier(node, 512) || ts.isExportSpecifier(node) && node.name.escapedText === "default";
-            var name = isDefaultExport && parent ? "default" : getDeclarationName(node);
+            var name = isComputedName ? "__computed"
+                : isDefaultExport && parent ? "default"
+                    : getDeclarationName(node);
             var symbol;
             if (name === undefined) {
                 symbol = createSymbol(0, "__missing");
@@ -33025,7 +35529,7 @@ var ts;
                             }
                             else {
                                 if (symbol.declarations && symbol.declarations.length &&
-                                    (node.kind === 266 && !node.isExportEquals)) {
+                                    (node.kind === 270 && !node.isExportEquals)) {
                                     message_1 = ts.Diagnostics.A_module_cannot_have_multiple_default_exports;
                                     messageNeedsName_1 = false;
                                     multipleDefaultExports_1 = true;
@@ -33034,7 +35538,7 @@ var ts;
                         }
                         var relatedInformation_1 = [];
                         if (ts.isTypeAliasDeclaration(node) && ts.nodeIsMissing(node.type) && ts.hasSyntacticModifier(node, 1) && symbol.flags & (2097152 | 788968 | 1920)) {
-                            relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { " + ts.unescapeLeadingUnderscores(node.name.escapedText) + " }"));
+                            relatedInformation_1.push(createDiagnosticForNode(node, ts.Diagnostics.Did_you_mean_0, "export type { ".concat(ts.unescapeLeadingUnderscores(node.name.escapedText), " }")));
                         }
                         var declarationName_1 = ts.getNameOfDeclaration(node) || node;
                         ts.forEach(symbol.declarations, function (declaration, index) {
@@ -33046,7 +35550,7 @@ var ts;
                             }
                         });
                         var diag = createDiagnosticForNode(declarationName_1, message_1, messageNeedsName_1 ? getDisplayName(node) : undefined);
-                        file.bindDiagnostics.push(ts.addRelatedInfo.apply(void 0, __spreadArray([diag], relatedInformation_1)));
+                        file.bindDiagnostics.push(ts.addRelatedInfo.apply(void 0, __spreadArray([diag], relatedInformation_1, false)));
                         symbol = createSymbol(0, name);
                     }
                 }
@@ -33063,7 +35567,7 @@ var ts;
         function declareModuleMember(node, symbolFlags, symbolExcludes) {
             var hasExportModifier = !!(ts.getCombinedModifierFlags(node) & 1) || jsdocTreatAsExported(node);
             if (symbolFlags & 2097152) {
-                if (node.kind === 270 || (node.kind === 260 && hasExportModifier)) {
+                if (node.kind === 274 || (node.kind === 264 && hasExportModifier)) {
                     return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
                 }
                 else {
@@ -33110,7 +35614,7 @@ var ts;
             var saveThisParentContainer = thisParentContainer;
             var savedBlockScopeContainer = blockScopeContainer;
             if (containerFlags & 1) {
-                if (node.kind !== 209) {
+                if (node.kind !== 213) {
                     thisParentContainer = container;
                 }
                 container = blockScopeContainer = node;
@@ -33139,7 +35643,7 @@ var ts;
                         currentFlow.node = node;
                     }
                 }
-                currentReturnTarget = isIIFE || node.kind === 166 || (ts.isInJSFile(node) && (node.kind === 251 || node.kind === 208)) ? createBranchLabel() : undefined;
+                currentReturnTarget = isIIFE || node.kind === 170 || node.kind === 169 || (ts.isInJSFile(node) && (node.kind === 255 || node.kind === 212)) ? createBranchLabel() : undefined;
                 currentExceptionTarget = undefined;
                 currentBreakTarget = undefined;
                 currentContinueTarget = undefined;
@@ -33153,13 +35657,14 @@ var ts;
                         node.flags |= 512;
                     node.endFlowNode = currentFlow;
                 }
-                if (node.kind === 297) {
+                if (node.kind === 303) {
                     node.flags |= emitFlags;
+                    node.endFlowNode = currentFlow;
                 }
                 if (currentReturnTarget) {
                     addAntecedent(currentReturnTarget, currentFlow);
                     currentFlow = finishFlowLabel(currentReturnTarget);
-                    if (node.kind === 166 || (ts.isInJSFile(node) && (node.kind === 251 || node.kind === 208))) {
+                    if (node.kind === 170 || node.kind === 169 || (ts.isInJSFile(node) && (node.kind === 255 || node.kind === 212))) {
                         node.returnFlowNode = currentFlow;
                     }
                 }
@@ -33186,8 +35691,8 @@ var ts;
             blockScopeContainer = savedBlockScopeContainer;
         }
         function bindEachFunctionsFirst(nodes) {
-            bindEach(nodes, function (n) { return n.kind === 251 ? bind(n) : undefined; });
-            bindEach(nodes, function (n) { return n.kind !== 251 ? bind(n) : undefined; });
+            bindEach(nodes, function (n) { return n.kind === 255 ? bind(n) : undefined; });
+            bindEach(nodes, function (n) { return n.kind !== 255 ? bind(n) : undefined; });
         }
         function bindEach(nodes, bindFunction) {
             if (bindFunction === void 0) { bindFunction = bind; }
@@ -33208,59 +35713,59 @@ var ts;
                 inAssignmentPattern = saveInAssignmentPattern;
                 return;
             }
-            if (node.kind >= 232 && node.kind <= 248 && !options.allowUnreachableCode) {
+            if (node.kind >= 236 && node.kind <= 252 && !options.allowUnreachableCode) {
                 node.flowNode = currentFlow;
             }
             switch (node.kind) {
-                case 236:
+                case 240:
                     bindWhileStatement(node);
                     break;
-                case 235:
+                case 239:
                     bindDoStatement(node);
                     break;
-                case 237:
+                case 241:
                     bindForStatement(node);
                     break;
-                case 238:
-                case 239:
+                case 242:
+                case 243:
                     bindForInOrForOfStatement(node);
                     break;
-                case 234:
+                case 238:
                     bindIfStatement(node);
                     break;
-                case 242:
                 case 246:
+                case 250:
                     bindReturnOrThrow(node);
                     break;
-                case 241:
-                case 240:
+                case 245:
+                case 244:
                     bindBreakOrContinueStatement(node);
                     break;
-                case 247:
+                case 251:
                     bindTryStatement(node);
                     break;
-                case 244:
+                case 248:
                     bindSwitchStatement(node);
                     break;
-                case 258:
+                case 262:
                     bindCaseBlock(node);
                     break;
-                case 284:
+                case 288:
                     bindCaseClause(node);
                     break;
-                case 233:
+                case 237:
                     bindExpressionStatement(node);
                     break;
-                case 245:
+                case 249:
                     bindLabeledStatement(node);
                     break;
-                case 214:
+                case 218:
                     bindPrefixUnaryExpressionFlow(node);
                     break;
-                case 215:
+                case 219:
                     bindPostfixUnaryExpressionFlow(node);
                     break;
-                case 216:
+                case 220:
                     if (ts.isDestructuringAssignment(node)) {
                         inAssignmentPattern = saveInAssignmentPattern;
                         bindDestructuringAssignmentFlow(node);
@@ -33268,46 +35773,46 @@ var ts;
                     }
                     bindBinaryExpressionFlow(node);
                     break;
-                case 210:
+                case 214:
                     bindDeleteExpressionFlow(node);
                     break;
-                case 217:
+                case 221:
                     bindConditionalExpressionFlow(node);
                     break;
-                case 249:
+                case 253:
                     bindVariableDeclarationFlow(node);
                     break;
-                case 201:
-                case 202:
+                case 205:
+                case 206:
                     bindAccessExpressionFlow(node);
                     break;
-                case 203:
+                case 207:
                     bindCallExpressionFlow(node);
                     break;
-                case 225:
+                case 229:
                     bindNonNullExpressionFlow(node);
                     break;
-                case 331:
-                case 324:
-                case 325:
+                case 343:
+                case 336:
+                case 337:
                     bindJSDocTypeAlias(node);
                     break;
-                case 297: {
+                case 303: {
                     bindEachFunctionsFirst(node.statements);
                     bind(node.endOfFileToken);
                     break;
                 }
-                case 230:
-                case 257:
+                case 234:
+                case 261:
                     bindEachFunctionsFirst(node.statements);
                     break;
-                case 198:
+                case 202:
                     bindBindingElementFlow(node);
                     break;
-                case 200:
-                case 199:
-                case 288:
-                case 220:
+                case 204:
+                case 203:
+                case 294:
+                case 224:
                     inAssignmentPattern = saveInAssignmentPattern;
                 default:
                     bindEachChild(node);
@@ -33318,32 +35823,32 @@ var ts;
         }
         function isNarrowingExpression(expr) {
             switch (expr.kind) {
-                case 78:
                 case 79:
-                case 107:
-                case 201:
-                case 202:
+                case 80:
+                case 108:
+                case 205:
+                case 206:
                     return containsNarrowableReference(expr);
-                case 203:
-                    return hasNarrowableArgument(expr);
                 case 207:
-                case 225:
+                    return hasNarrowableArgument(expr);
+                case 211:
+                case 229:
                     return isNarrowingExpression(expr.expression);
-                case 216:
+                case 220:
                     return isNarrowingBinaryExpression(expr);
-                case 214:
+                case 218:
                     return expr.operator === 53 && isNarrowingExpression(expr.operand);
-                case 211:
+                case 215:
                     return isNarrowingExpression(expr.expression);
             }
             return false;
         }
         function isNarrowableReference(expr) {
-            return expr.kind === 78 || expr.kind === 79 || expr.kind === 107 || expr.kind === 105 ||
-                (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) ||
-                ts.isBinaryExpression(expr) && expr.operatorToken.kind === 27 && isNarrowableReference(expr.right) ||
-                ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) ||
-                ts.isAssignmentExpression(expr) && isNarrowableReference(expr.left);
+            return ts.isDottedName(expr)
+                || (ts.isPropertyAccessExpression(expr) || ts.isNonNullExpression(expr) || ts.isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression)
+                || ts.isBinaryExpression(expr) && expr.operatorToken.kind === 27 && isNarrowableReference(expr.right)
+                || ts.isElementAccessExpression(expr) && ts.isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression)
+                || ts.isAssignmentExpression(expr) && isNarrowableReference(expr.left);
         }
         function containsNarrowableReference(expr) {
             return isNarrowableReference(expr) || ts.isOptionalChain(expr) && containsNarrowableReference(expr.expression);
@@ -33357,7 +35862,7 @@ var ts;
                     }
                 }
             }
-            if (expr.expression.kind === 201 &&
+            if (expr.expression.kind === 205 &&
                 containsNarrowableReference(expr.expression.expression)) {
                 return true;
             }
@@ -33366,15 +35871,12 @@ var ts;
         function isNarrowingTypeofOperands(expr1, expr2) {
             return ts.isTypeOfExpression(expr1) && isNarrowableOperand(expr1.expression) && ts.isStringLiteralLike(expr2);
         }
-        function isNarrowableInOperands(left, right) {
-            return ts.isStringLiteralLike(left) && isNarrowingExpression(right);
-        }
         function isNarrowingBinaryExpression(expr) {
             switch (expr.operatorToken.kind) {
-                case 62:
-                case 74:
+                case 63:
                 case 75:
                 case 76:
+                case 77:
                     return containsNarrowableReference(expr.left);
                 case 34:
                 case 35:
@@ -33382,10 +35884,10 @@ var ts;
                 case 37:
                     return isNarrowableOperand(expr.left) || isNarrowableOperand(expr.right) ||
                         isNarrowingTypeofOperands(expr.right, expr.left) || isNarrowingTypeofOperands(expr.left, expr.right);
-                case 101:
+                case 102:
                     return isNarrowableOperand(expr.left);
-                case 100:
-                    return isNarrowableInOperands(expr.left, expr.right);
+                case 101:
+                    return isNarrowingExpression(expr.right);
                 case 27:
                     return isNarrowingExpression(expr.right);
             }
@@ -33393,11 +35895,11 @@ var ts;
         }
         function isNarrowableOperand(expr) {
             switch (expr.kind) {
-                case 207:
+                case 211:
                     return isNarrowableOperand(expr.expression);
-                case 216:
+                case 220:
                     switch (expr.operatorToken.kind) {
-                        case 62:
+                        case 63:
                             return isNarrowableOperand(expr.left);
                         case 27:
                             return isNarrowableOperand(expr.right);
@@ -33430,8 +35932,8 @@ var ts;
             if (!expression) {
                 return flags & 32 ? antecedent : unreachableFlow;
             }
-            if ((expression.kind === 109 && flags & 64 ||
-                expression.kind === 94 && flags & 32) &&
+            if ((expression.kind === 110 && flags & 64 ||
+                expression.kind === 95 && flags & 32) &&
                 !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) {
                 return unreachableFlow;
             }
@@ -33470,26 +35972,26 @@ var ts;
         function isStatementCondition(node) {
             var parent = node.parent;
             switch (parent.kind) {
-                case 234:
-                case 236:
-                case 235:
+                case 238:
+                case 240:
+                case 239:
                     return parent.expression === node;
-                case 237:
-                case 217:
+                case 241:
+                case 221:
                     return parent.condition === node;
             }
             return false;
         }
         function isLogicalExpression(node) {
             while (true) {
-                if (node.kind === 207) {
+                if (node.kind === 211) {
                     node = node.expression;
                 }
-                else if (node.kind === 214 && node.operator === 53) {
+                else if (node.kind === 218 && node.operator === 53) {
                     node = node.operand;
                 }
                 else {
-                    return node.kind === 216 && (node.operatorToken.kind === 55 ||
+                    return node.kind === 220 && (node.operatorToken.kind === 55 ||
                         node.operatorToken.kind === 56 ||
                         node.operatorToken.kind === 60);
                 }
@@ -33536,7 +36038,7 @@ var ts;
         }
         function setContinueTarget(node, target) {
             var label = activeLabelList;
-            while (label && node.parent.kind === 245) {
+            while (label && node.parent.kind === 249) {
                 label.continueTarget = target;
                 label = label.next;
                 node = node.parent;
@@ -33587,12 +36089,12 @@ var ts;
             bind(node.expression);
             addAntecedent(preLoopLabel, currentFlow);
             currentFlow = preLoopLabel;
-            if (node.kind === 239) {
+            if (node.kind === 243) {
                 bind(node.awaitModifier);
             }
             addAntecedent(postLoopLabel, currentFlow);
             bind(node.initializer);
-            if (node.initializer.kind !== 250) {
+            if (node.initializer.kind !== 254) {
                 bindAssignmentTargetFlow(node.initializer);
             }
             bindIterativeStatement(node.statement, postLoopLabel, preLoopLabel);
@@ -33614,7 +36116,7 @@ var ts;
         }
         function bindReturnOrThrow(node) {
             bind(node.expression);
-            if (node.kind === 242) {
+            if (node.kind === 246) {
                 hasExplicitReturn = true;
                 if (currentReturnTarget) {
                     addAntecedent(currentReturnTarget, currentFlow);
@@ -33631,7 +36133,7 @@ var ts;
             return undefined;
         }
         function bindBreakOrContinueFlow(node, breakTarget, continueTarget) {
-            var flowLabel = node.kind === 241 ? breakTarget : continueTarget;
+            var flowLabel = node.kind === 245 ? breakTarget : continueTarget;
             if (flowLabel) {
                 addAntecedent(flowLabel, currentFlow);
                 currentFlow = unreachableFlow;
@@ -33704,7 +36206,7 @@ var ts;
             preSwitchCaseFlow = currentFlow;
             bind(node.caseBlock);
             addAntecedent(postSwitchLabel, currentFlow);
-            var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 285; });
+            var hasDefault = ts.forEach(node.caseBlock.clauses, function (c) { return c.kind === 289; });
             node.possiblyExhaustive = !hasDefault && !postSwitchLabel.antecedents;
             if (!hasDefault) {
                 addAntecedent(postSwitchLabel, createFlowSwitchClause(preSwitchCaseFlow, node, 0, 0));
@@ -33747,9 +36249,9 @@ var ts;
             maybeBindExpressionFlowIfCall(node.expression);
         }
         function maybeBindExpressionFlowIfCall(node) {
-            if (node.kind === 203) {
+            if (node.kind === 207) {
                 var call = node;
-                if (ts.isDottedName(call.expression) && call.expression.kind !== 105) {
+                if (call.expression.kind !== 106 && ts.isDottedName(call.expression)) {
                     currentFlow = createFlowCall(currentFlow, call);
                 }
             }
@@ -33773,7 +36275,7 @@ var ts;
             currentFlow = finishFlowLabel(postStatementLabel);
         }
         function bindDestructuringTargetFlow(node) {
-            if (node.kind === 216 && node.operatorToken.kind === 62) {
+            if (node.kind === 220 && node.operatorToken.kind === 63) {
                 bindAssignmentTargetFlow(node.left);
             }
             else {
@@ -33784,10 +36286,10 @@ var ts;
             if (isNarrowableReference(node)) {
                 currentFlow = createFlowMutation(16, currentFlow, node);
             }
-            else if (node.kind === 199) {
+            else if (node.kind === 203) {
                 for (var _i = 0, _a = node.elements; _i < _a.length; _i++) {
                     var e = _a[_i];
-                    if (e.kind === 220) {
+                    if (e.kind === 224) {
                         bindAssignmentTargetFlow(e.expression);
                     }
                     else {
@@ -33795,16 +36297,16 @@ var ts;
                     }
                 }
             }
-            else if (node.kind === 200) {
+            else if (node.kind === 204) {
                 for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
                     var p = _c[_b];
-                    if (p.kind === 288) {
+                    if (p.kind === 294) {
                         bindDestructuringTargetFlow(p.initializer);
                     }
-                    else if (p.kind === 289) {
+                    else if (p.kind === 295) {
                         bindAssignmentTargetFlow(p.name);
                     }
-                    else if (p.kind === 290) {
+                    else if (p.kind === 296) {
                         bindAssignmentTargetFlow(p.expression);
                     }
                 }
@@ -33812,7 +36314,7 @@ var ts;
         }
         function bindLogicalLikeExpression(node, trueTarget, falseTarget) {
             var preRightLabel = createBranchLabel();
-            if (node.operatorToken.kind === 55 || node.operatorToken.kind === 75) {
+            if (node.operatorToken.kind === 55 || node.operatorToken.kind === 76) {
                 bindCondition(node.left, preRightLabel, falseTarget);
             }
             else {
@@ -33869,108 +36371,97 @@ var ts;
             }
             bindAssignmentTargetFlow(node.left);
         }
-        function bindBinaryExpressionFlow(node) {
-            var workStacks = {
-                expr: [node],
-                state: [1],
-                inStrictMode: [undefined],
-                parent: [undefined],
-            };
-            var stackIndex = 0;
-            while (stackIndex >= 0) {
-                node = workStacks.expr[stackIndex];
-                switch (workStacks.state[stackIndex]) {
-                    case 0: {
-                        ts.setParent(node, parent);
-                        var saveInStrictMode = inStrictMode;
-                        bindWorker(node);
-                        var saveParent = parent;
-                        parent = node;
-                        advanceState(1, saveInStrictMode, saveParent);
-                        break;
-                    }
-                    case 1: {
-                        var operator = node.operatorToken.kind;
-                        if (operator === 55 || operator === 56 || operator === 60 ||
-                            ts.isLogicalOrCoalescingAssignmentOperator(operator)) {
-                            if (isTopLevelLogicalExpression(node)) {
-                                var postExpressionLabel = createBranchLabel();
-                                bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
-                                currentFlow = finishFlowLabel(postExpressionLabel);
-                            }
-                            else {
-                                bindLogicalLikeExpression(node, currentTrueTarget, currentFalseTarget);
-                            }
-                            completeNode();
-                        }
-                        else {
-                            advanceState(2);
-                            maybeBind(node.left);
-                        }
-                        break;
+        function createBindBinaryExpressionFlow() {
+            return ts.createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, undefined);
+            function onEnter(node, state) {
+                if (state) {
+                    state.stackIndex++;
+                    ts.setParent(node, parent);
+                    var saveInStrictMode = inStrictMode;
+                    bindWorker(node);
+                    var saveParent = parent;
+                    parent = node;
+                    state.skip = false;
+                    state.inStrictModeStack[state.stackIndex] = saveInStrictMode;
+                    state.parentStack[state.stackIndex] = saveParent;
+                }
+                else {
+                    state = {
+                        stackIndex: 0,
+                        skip: false,
+                        inStrictModeStack: [undefined],
+                        parentStack: [undefined]
+                    };
+                }
+                var operator = node.operatorToken.kind;
+                if (operator === 55 ||
+                    operator === 56 ||
+                    operator === 60 ||
+                    ts.isLogicalOrCoalescingAssignmentOperator(operator)) {
+                    if (isTopLevelLogicalExpression(node)) {
+                        var postExpressionLabel = createBranchLabel();
+                        bindLogicalLikeExpression(node, postExpressionLabel, postExpressionLabel);
+                        currentFlow = finishFlowLabel(postExpressionLabel);
                     }
-                    case 2: {
-                        if (node.operatorToken.kind === 27) {
-                            maybeBindExpressionFlowIfCall(node.left);
-                        }
-                        advanceState(3);
-                        maybeBind(node.operatorToken);
-                        break;
+                    else {
+                        bindLogicalLikeExpression(node, currentTrueTarget, currentFalseTarget);
                     }
-                    case 3: {
-                        advanceState(4);
-                        maybeBind(node.right);
-                        break;
+                    state.skip = true;
+                }
+                return state;
+            }
+            function onLeft(left, state, _node) {
+                if (!state.skip) {
+                    return maybeBind(left);
+                }
+            }
+            function onOperator(operatorToken, state, node) {
+                if (!state.skip) {
+                    if (operatorToken.kind === 27) {
+                        maybeBindExpressionFlowIfCall(node.left);
                     }
-                    case 4: {
-                        var operator = node.operatorToken.kind;
-                        if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
-                            bindAssignmentTargetFlow(node.left);
-                            if (operator === 62 && node.left.kind === 202) {
-                                var elementAccess = node.left;
-                                if (isNarrowableOperand(elementAccess.expression)) {
-                                    currentFlow = createFlowMutation(256, currentFlow, node);
-                                }
+                    bind(operatorToken);
+                }
+            }
+            function onRight(right, state, _node) {
+                if (!state.skip) {
+                    return maybeBind(right);
+                }
+            }
+            function onExit(node, state) {
+                if (!state.skip) {
+                    var operator = node.operatorToken.kind;
+                    if (ts.isAssignmentOperator(operator) && !ts.isAssignmentTarget(node)) {
+                        bindAssignmentTargetFlow(node.left);
+                        if (operator === 63 && node.left.kind === 206) {
+                            var elementAccess = node.left;
+                            if (isNarrowableOperand(elementAccess.expression)) {
+                                currentFlow = createFlowMutation(256, currentFlow, node);
                             }
                         }
-                        completeNode();
-                        break;
                     }
-                    default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for bindBinaryExpressionFlow");
                 }
-            }
-            function advanceState(state, isInStrictMode, parent) {
-                workStacks.state[stackIndex] = state;
-                if (isInStrictMode !== undefined) {
-                    workStacks.inStrictMode[stackIndex] = isInStrictMode;
-                }
-                if (parent !== undefined) {
-                    workStacks.parent[stackIndex] = parent;
+                var savedInStrictMode = state.inStrictModeStack[state.stackIndex];
+                var savedParent = state.parentStack[state.stackIndex];
+                if (savedInStrictMode !== undefined) {
+                    inStrictMode = savedInStrictMode;
                 }
-            }
-            function completeNode() {
-                if (workStacks.inStrictMode[stackIndex] !== undefined) {
-                    inStrictMode = workStacks.inStrictMode[stackIndex];
-                    parent = workStacks.parent[stackIndex];
+                if (savedParent !== undefined) {
+                    parent = savedParent;
                 }
-                stackIndex--;
+                state.skip = false;
+                state.stackIndex--;
             }
             function maybeBind(node) {
                 if (node && ts.isBinaryExpression(node) && !ts.isDestructuringAssignment(node)) {
-                    stackIndex++;
-                    workStacks.expr[stackIndex] = node;
-                    workStacks.state[stackIndex] = 0;
-                    workStacks.inStrictMode[stackIndex] = undefined;
-                    workStacks.parent[stackIndex] = undefined;
-                }
-                else {
-                    bind(node);
+                    return node;
                 }
+                bind(node);
             }
         }
         function bindDeleteExpressionFlow(node) {
             bindEachChild(node);
-            if (node.expression.kind === 201) {
+            if (node.expression.kind === 205) {
                 bindAssignmentTargetFlow(node.expression);
             }
         }
@@ -34021,16 +36512,19 @@ var ts;
             }
         }
         function bindJSDocTypeAlias(node) {
-            ts.setParent(node.tagName, node);
-            if (node.kind !== 325 && node.fullName) {
+            bind(node.tagName);
+            if (node.kind !== 337 && node.fullName) {
                 ts.setParent(node.fullName, node);
                 ts.setParentRecursive(node.fullName, false);
             }
+            if (typeof node.comment !== "string") {
+                bindEach(node.comment);
+            }
         }
         function bindJSDocClassTag(node) {
             bindEachChild(node);
             var host = ts.getHostSignatureFromJSDoc(node);
-            if (host && host.kind !== 165) {
+            if (host && host.kind !== 168) {
                 addDeclarationToSymbol(host.symbol, host, 32);
             }
         }
@@ -34043,15 +36537,15 @@ var ts;
         }
         function bindOptionalChainRest(node) {
             switch (node.kind) {
-                case 201:
+                case 205:
                     bind(node.questionDotToken);
                     bind(node.name);
                     break;
-                case 202:
+                case 206:
                     bind(node.questionDotToken);
                     bind(node.argumentExpression);
                     break;
-                case 203:
+                case 207:
                     bind(node.questionDotToken);
                     bindEach(node.typeArguments);
                     bindEach(node.arguments);
@@ -34102,19 +36596,19 @@ var ts;
             }
             else {
                 var expr = ts.skipParentheses(node.expression);
-                if (expr.kind === 208 || expr.kind === 209) {
+                if (expr.kind === 212 || expr.kind === 213) {
                     bindEach(node.typeArguments);
                     bindEach(node.arguments);
                     bind(node.expression);
                 }
                 else {
                     bindEachChild(node);
-                    if (node.expression.kind === 105) {
+                    if (node.expression.kind === 106) {
                         currentFlow = createFlowCall(currentFlow, node);
                     }
                 }
             }
-            if (node.expression.kind === 201) {
+            if (node.expression.kind === 205) {
                 var propertyAccess = node.expression;
                 if (ts.isIdentifier(propertyAccess.name) && isNarrowableOperand(propertyAccess.expression) && ts.isPushOrUnshiftIdentifier(propertyAccess.name)) {
                     currentFlow = createFlowMutation(256, currentFlow, node);
@@ -34123,54 +36617,55 @@ var ts;
         }
         function getContainerFlags(node) {
             switch (node.kind) {
-                case 221:
-                case 252:
-                case 255:
-                case 200:
-                case 177:
-                case 312:
-                case 281:
+                case 225:
+                case 256:
+                case 259:
+                case 204:
+                case 181:
+                case 320:
+                case 285:
                     return 1;
-                case 253:
+                case 257:
                     return 1 | 64;
-                case 256:
-                case 254:
-                case 190:
+                case 260:
+                case 258:
+                case 194:
                     return 1 | 32;
-                case 297:
+                case 303:
                     return 1 | 4 | 32;
-                case 165:
-                    if (ts.isObjectLiteralOrClassExpressionMethod(node)) {
+                case 171:
+                case 172:
+                case 168:
+                    if (ts.isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {
                         return 1 | 4 | 32 | 8 | 128;
                     }
-                case 166:
-                case 251:
-                case 164:
+                case 170:
+                case 255:
                 case 167:
-                case 168:
-                case 169:
-                case 313:
-                case 308:
+                case 173:
+                case 321:
+                case 315:
+                case 178:
                 case 174:
-                case 170:
-                case 171:
                 case 175:
+                case 179:
+                case 169:
                     return 1 | 4 | 32 | 8;
-                case 208:
-                case 209:
+                case 212:
+                case 213:
                     return 1 | 4 | 32 | 8 | 16;
-                case 257:
+                case 261:
                     return 4;
-                case 163:
+                case 166:
                     return node.initializer ? 4 : 0;
-                case 287:
-                case 237:
-                case 238:
-                case 239:
-                case 258:
+                case 291:
+                case 241:
+                case 242:
+                case 243:
+                case 262:
                     return 2;
-                case 230:
-                    return ts.isFunctionLike(node.parent) ? 0 : 2;
+                case 234:
+                    return ts.isFunctionLike(node.parent) || ts.isClassStaticBlockDeclaration(node.parent) ? 0 : 2;
             }
             return 0;
         }
@@ -34182,45 +36677,46 @@ var ts;
         }
         function declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes) {
             switch (container.kind) {
-                case 256:
+                case 260:
                     return declareModuleMember(node, symbolFlags, symbolExcludes);
-                case 297:
+                case 303:
                     return declareSourceFileMember(node, symbolFlags, symbolExcludes);
-                case 221:
-                case 252:
+                case 225:
+                case 256:
                     return declareClassMember(node, symbolFlags, symbolExcludes);
-                case 255:
+                case 259:
                     return declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes);
-                case 177:
-                case 312:
-                case 200:
-                case 253:
-                case 281:
+                case 181:
+                case 320:
+                case 204:
+                case 257:
+                case 285:
                     return declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
+                case 178:
+                case 179:
+                case 173:
                 case 174:
+                case 321:
                 case 175:
-                case 169:
+                case 168:
+                case 167:
                 case 170:
-                case 313:
                 case 171:
-                case 165:
-                case 164:
-                case 166:
-                case 167:
-                case 168:
-                case 251:
-                case 208:
-                case 209:
-                case 308:
-                case 331:
-                case 324:
-                case 254:
-                case 190:
+                case 172:
+                case 255:
+                case 212:
+                case 213:
+                case 315:
+                case 343:
+                case 336:
+                case 169:
+                case 258:
+                case 194:
                     return declareSymbol(container.locals, undefined, node, symbolFlags, symbolExcludes);
             }
         }
         function declareClassMember(node, symbolFlags, symbolExcludes) {
-            return ts.hasSyntacticModifier(node, 32)
+            return ts.isStatic(node)
                 ? declareSymbol(container.symbol.exports, container.symbol, node, symbolFlags, symbolExcludes)
                 : declareSymbol(container.symbol.members, container.symbol, node, symbolFlags, symbolExcludes);
         }
@@ -34254,15 +36750,13 @@ var ts;
                     var pattern = void 0;
                     if (node.name.kind === 10) {
                         var text = node.name.text;
-                        if (ts.hasZeroOrOneAsteriskCharacter(text)) {
-                            pattern = ts.tryParsePattern(text);
-                        }
-                        else {
+                        pattern = ts.tryParsePattern(text);
+                        if (pattern === undefined) {
                             errorOnFirstToken(node.name, ts.Diagnostics.Pattern_0_can_have_at_most_one_Asterisk_character, text);
                         }
                     }
                     var symbol = declareSymbolAndAddToSymbolTable(node, 512, 110735);
-                    file.patternAmbientModules = ts.append(file.patternAmbientModules, pattern && { pattern: pattern, symbol: symbol });
+                    file.patternAmbientModules = ts.append(file.patternAmbientModules, pattern && !ts.isString(pattern) ? { pattern: pattern, symbol: symbol } : undefined);
                 }
             }
             else {
@@ -34294,11 +36788,11 @@ var ts;
                 var seen = new ts.Map();
                 for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
                     var prop = _a[_i];
-                    if (prop.kind === 290 || prop.name.kind !== 78) {
+                    if (prop.kind === 296 || prop.name.kind !== 79) {
                         continue;
                     }
                     var identifier = prop.name;
-                    var currentKind = prop.kind === 288 || prop.kind === 289 || prop.kind === 165
+                    var currentKind = prop.kind === 294 || prop.kind === 295 || prop.kind === 168
                         ? 1
                         : 2;
                     var existingKind = seen.get(identifier.escapedText);
@@ -34330,10 +36824,10 @@ var ts;
         }
         function bindBlockScopedDeclaration(node, symbolFlags, symbolExcludes) {
             switch (blockScopeContainer.kind) {
-                case 256:
+                case 260:
                     declareModuleMember(node, symbolFlags, symbolExcludes);
                     break;
-                case 297:
+                case 303:
                     if (ts.isExternalOrCommonJsModule(container)) {
                         declareModuleMember(node, symbolFlags, symbolExcludes);
                         break;
@@ -34357,9 +36851,9 @@ var ts;
             var saveCurrentFlow = currentFlow;
             for (var _i = 0, delayedTypeAliases_1 = delayedTypeAliases; _i < delayedTypeAliases_1.length; _i++) {
                 var typeAlias = delayedTypeAliases_1[_i];
-                var host = ts.getJSDocHost(typeAlias);
-                container = (host && ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1); })) || file;
-                blockScopeContainer = (host && ts.getEnclosingBlockScopeContainer(host)) || file;
+                var host = typeAlias.parent.parent;
+                container = ts.findAncestor(host.parent, function (n) { return !!(getContainerFlags(n) & 1); }) || file;
+                blockScopeContainer = ts.getEnclosingBlockScopeContainer(host) || file;
                 currentFlow = initFlowNode({ flags: 2 });
                 parent = typeAlias;
                 bind(typeAlias.typeExpression);
@@ -34399,7 +36893,7 @@ var ts;
                         container = oldContainer;
                     }
                 }
-                else if (ts.isJSDocEnumTag(typeAlias) || !typeAlias.fullName || typeAlias.fullName.kind === 78) {
+                else if (ts.isJSDocEnumTag(typeAlias) || !typeAlias.fullName || typeAlias.fullName.kind === 79) {
                     parent = typeAlias.parent;
                     bindBlockScopedDeclaration(typeAlias, 524288, 788968);
                 }
@@ -34419,11 +36913,11 @@ var ts;
                 !(node.flags & 4194304) &&
                 !ts.isIdentifierName(node)) {
                 if (inStrictMode &&
-                    node.originalKeywordKind >= 116 &&
-                    node.originalKeywordKind <= 124) {
+                    node.originalKeywordKind >= 117 &&
+                    node.originalKeywordKind <= 125) {
                     file.bindDiagnostics.push(createDiagnosticForNode(node, getStrictModeIdentifierMessage(node), ts.declarationNameToString(node)));
                 }
-                else if (node.originalKeywordKind === 130) {
+                else if (node.originalKeywordKind === 132) {
                     if (ts.isExternalModule(file) && ts.isInTopLevelContext(node)) {
                         file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_at_the_top_level_of_a_module, ts.declarationNameToString(node)));
                     }
@@ -34431,7 +36925,7 @@ var ts;
                         file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, ts.declarationNameToString(node)));
                     }
                 }
-                else if (node.originalKeywordKind === 124 && node.flags & 8192) {
+                else if (node.originalKeywordKind === 125 && node.flags & 8192) {
                     file.bindDiagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_that_cannot_be_used_here, ts.declarationNameToString(node)));
                 }
             }
@@ -34463,7 +36957,7 @@ var ts;
             }
         }
         function checkStrictModeDeleteExpression(node) {
-            if (inStrictMode && node.expression.kind === 78) {
+            if (inStrictMode && node.expression.kind === 79) {
                 var span = ts.getErrorSpanForNode(file, node.expression);
                 file.bindDiagnostics.push(ts.createFileDiagnostic(file, span.start, span.length, ts.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode));
             }
@@ -34472,7 +36966,7 @@ var ts;
             return ts.isIdentifier(node) && (node.escapedText === "eval" || node.escapedText === "arguments");
         }
         function checkStrictModeEvalOrArguments(contextNode, name) {
-            if (name && name.kind === 78) {
+            if (name && name.kind === 79) {
                 var identifier = name;
                 if (isEvalOrArgumentsIdentifier(identifier)) {
                     var span = ts.getErrorSpanForNode(file, name);
@@ -34482,7 +36976,7 @@ var ts;
         }
         function getStrictModeEvalOrArgumentsMessage(node) {
             if (ts.getContainingClass(node)) {
-                return ts.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode;
+                return ts.Diagnostics.Code_contained_in_a_class_is_evaluated_in_JavaScript_s_strict_mode_which_does_not_allow_this_use_of_0_For_more_information_see_https_Colon_Slash_Slashdeveloper_mozilla_org_Slashen_US_Slashdocs_SlashWeb_SlashJavaScript_SlashReference_SlashStrict_mode;
             }
             if (file.externalModuleIndicator) {
                 return ts.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode;
@@ -34505,9 +36999,9 @@ var ts;
         }
         function checkStrictModeFunctionDeclaration(node) {
             if (languageVersion < 2) {
-                if (blockScopeContainer.kind !== 297 &&
-                    blockScopeContainer.kind !== 256 &&
-                    !ts.isFunctionLike(blockScopeContainer)) {
+                if (blockScopeContainer.kind !== 303 &&
+                    blockScopeContainer.kind !== 260 &&
+                    !ts.isFunctionLikeOrClassStaticBlockDeclaration(blockScopeContainer)) {
                     var errorSpan = ts.getErrorSpanForNode(file, node);
                     file.bindDiagnostics.push(ts.createFileDiagnostic(file, errorSpan.start, errorSpan.length, getStrictModeBlockScopeFunctionDeclarationMessage(node)));
                 }
@@ -34536,7 +37030,7 @@ var ts;
             }
         }
         function checkStrictModeLabeledStatement(node) {
-            if (inStrictMode && options.target >= 2) {
+            if (inStrictMode && ts.getEmitScriptTarget(options) >= 2) {
                 if (ts.isDeclarationStatement(node.statement) || ts.isVariableStatement(node.statement)) {
                     errorOnFirstToken(node.label, ts.Diagnostics.A_label_is_not_allowed_here);
                 }
@@ -34568,7 +37062,7 @@ var ts;
             ts.setParent(node, parent);
             var saveInStrictMode = inStrictMode;
             bindWorker(node);
-            if (node.kind > 156) {
+            if (node.kind > 159) {
                 var saveParent = parent;
                 parent = node;
                 var containerFlags = getContainerFlags(node);
@@ -34626,7 +37120,7 @@ var ts;
         }
         function bindWorker(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     if (node.isInJSDocNamespace) {
                         var parentNode = node.parent;
                         while (parentNode && !ts.isJSDocTypeAlias(parentNode)) {
@@ -34635,23 +37129,24 @@ var ts;
                         bindBlockScopedDeclaration(parentNode, 524288, 788968);
                         break;
                     }
-                case 107:
-                    if (currentFlow && (ts.isExpression(node) || parent.kind === 289)) {
+                case 108:
+                    if (currentFlow && (ts.isExpression(node) || parent.kind === 295)) {
                         node.flowNode = currentFlow;
                     }
                     return checkContextualIdentifier(node);
-                case 157:
-                    if (currentFlow && parent.kind === 176) {
+                case 160:
+                    if (currentFlow && ts.isPartOfTypeQuery(node)) {
                         node.flowNode = currentFlow;
                     }
                     break;
-                case 105:
+                case 230:
+                case 106:
                     node.flowNode = currentFlow;
                     break;
-                case 79:
+                case 80:
                     return checkPrivateIdentifier(node);
-                case 201:
-                case 202:
+                case 205:
+                case 206:
                     var expr = node;
                     if (currentFlow && isNarrowableReference(expr)) {
                         expr.flowNode = currentFlow;
@@ -34666,7 +37161,7 @@ var ts;
                         declareSymbol(file.locals, undefined, expr.expression, 1 | 134217728, 111550);
                     }
                     break;
-                case 216:
+                case 220:
                     var specialKind = ts.getAssignmentDeclarationKind(node);
                     switch (specialKind) {
                         case 1:
@@ -34701,74 +37196,74 @@ var ts;
                             ts.Debug.fail("Unknown binary expression special property assignment kind");
                     }
                     return checkStrictModeBinaryExpression(node);
-                case 287:
+                case 291:
                     return checkStrictModeCatchClause(node);
-                case 210:
+                case 214:
                     return checkStrictModeDeleteExpression(node);
                 case 8:
                     return checkStrictModeNumericLiteral(node);
-                case 215:
+                case 219:
                     return checkStrictModePostfixUnaryExpression(node);
-                case 214:
+                case 218:
                     return checkStrictModePrefixUnaryExpression(node);
-                case 243:
+                case 247:
                     return checkStrictModeWithStatement(node);
-                case 245:
+                case 249:
                     return checkStrictModeLabeledStatement(node);
-                case 187:
+                case 191:
                     seenThisKeyword = true;
                     return;
-                case 172:
+                case 176:
                     break;
-                case 159:
+                case 162:
                     return bindTypeParameter(node);
-                case 160:
+                case 163:
                     return bindParameter(node);
-                case 249:
+                case 253:
                     return bindVariableDeclarationOrBindingElement(node);
-                case 198:
+                case 202:
                     node.flowNode = currentFlow;
                     return bindVariableDeclarationOrBindingElement(node);
-                case 163:
-                case 162:
+                case 166:
+                case 165:
                     return bindPropertyWorker(node);
-                case 288:
-                case 289:
+                case 294:
+                case 295:
                     return bindPropertyOrMethodOrAccessor(node, 4, 0);
-                case 291:
+                case 297:
                     return bindPropertyOrMethodOrAccessor(node, 8, 900095);
-                case 169:
-                case 170:
-                case 171:
+                case 173:
+                case 174:
+                case 175:
                     return declareSymbolAndAddToSymbolTable(node, 131072, 0);
-                case 165:
-                case 164:
+                case 168:
+                case 167:
                     return bindPropertyOrMethodOrAccessor(node, 8192 | (node.questionToken ? 16777216 : 0), ts.isObjectLiteralMethod(node) ? 0 : 103359);
-                case 251:
+                case 255:
                     return bindFunctionDeclaration(node);
-                case 166:
+                case 170:
                     return declareSymbolAndAddToSymbolTable(node, 16384, 0);
-                case 167:
+                case 171:
                     return bindPropertyOrMethodOrAccessor(node, 32768, 46015);
-                case 168:
+                case 172:
                     return bindPropertyOrMethodOrAccessor(node, 65536, 78783);
-                case 174:
-                case 308:
-                case 313:
-                case 175:
+                case 178:
+                case 315:
+                case 321:
+                case 179:
                     return bindFunctionOrConstructorType(node);
-                case 177:
-                case 312:
-                case 190:
+                case 181:
+                case 320:
+                case 194:
                     return bindAnonymousTypeWorker(node);
-                case 319:
+                case 330:
                     return bindJSDocClassTag(node);
-                case 200:
+                case 204:
                     return bindObjectLiteralExpression(node);
-                case 208:
-                case 209:
+                case 212:
+                case 213:
                     return bindFunctionExpression(node);
-                case 203:
+                case 207:
                     var assignmentKind = ts.getAssignmentDeclarationKind(node);
                     switch (assignmentKind) {
                         case 7:
@@ -34786,60 +37281,60 @@ var ts;
                         bindCallExpression(node);
                     }
                     break;
-                case 221:
-                case 252:
+                case 225:
+                case 256:
                     inStrictMode = true;
                     return bindClassLikeDeclaration(node);
-                case 253:
+                case 257:
                     return bindBlockScopedDeclaration(node, 64, 788872);
-                case 254:
+                case 258:
                     return bindBlockScopedDeclaration(node, 524288, 788968);
-                case 255:
+                case 259:
                     return bindEnumDeclaration(node);
-                case 256:
+                case 260:
                     return bindModuleDeclaration(node);
-                case 281:
+                case 285:
                     return bindJsxAttributes(node);
-                case 280:
+                case 284:
                     return bindJsxAttribute(node, 4, 0);
-                case 260:
-                case 263:
-                case 265:
-                case 270:
+                case 264:
+                case 267:
+                case 269:
+                case 274:
                     return declareSymbolAndAddToSymbolTable(node, 2097152, 2097152);
-                case 259:
+                case 263:
                     return bindNamespaceExportDeclaration(node);
-                case 262:
+                case 266:
                     return bindImportClause(node);
-                case 267:
+                case 271:
                     return bindExportDeclaration(node);
-                case 266:
+                case 270:
                     return bindExportAssignment(node);
-                case 297:
+                case 303:
                     updateStrictModeStatementList(node.statements);
                     return bindSourceFileIfExternalModule();
-                case 230:
-                    if (!ts.isFunctionLike(node.parent)) {
+                case 234:
+                    if (!ts.isFunctionLikeOrClassStaticBlockDeclaration(node.parent)) {
                         return;
                     }
-                case 257:
+                case 261:
                     return updateStrictModeStatementList(node.statements);
-                case 326:
-                    if (node.parent.kind === 313) {
+                case 338:
+                    if (node.parent.kind === 321) {
                         return bindParameter(node);
                     }
-                    if (node.parent.kind !== 312) {
+                    if (node.parent.kind !== 320) {
                         break;
                     }
-                case 333:
+                case 345:
                     var propTag = node;
-                    var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 307 ?
+                    var flags = propTag.isBracketed || propTag.typeExpression && propTag.typeExpression.type.kind === 314 ?
                         4 | 16777216 :
                         4;
                     return declareSymbolAndAddToSymbolTable(propTag, flags, 0);
-                case 331:
-                case 324:
-                case 325:
+                case 343:
+                case 336:
+                case 337:
                     return (delayedTypeAliases || (delayedTypeAliases = [])).push(node);
             }
         }
@@ -34862,11 +37357,11 @@ var ts;
             }
         }
         function bindSourceFileAsExternalModule() {
-            bindAnonymousDeclaration(file, 512, "\"" + ts.removeFileExtension(file.fileName) + "\"");
+            bindAnonymousDeclaration(file, 512, "\"".concat(ts.removeFileExtension(file.fileName), "\""));
         }
         function bindExportAssignment(node) {
             if (!container.symbol || !container.symbol.exports) {
-                bindAnonymousDeclaration(node, 2097152, getDeclarationName(node));
+                bindAnonymousDeclaration(node, 111551, getDeclarationName(node));
             }
             else {
                 var flags = ts.exportAssignmentIsAlias(node)
@@ -34983,10 +37478,10 @@ var ts;
             }
             var thisContainer = ts.getThisContainer(node, false);
             switch (thisContainer.kind) {
-                case 251:
-                case 208:
+                case 255:
+                case 212:
                     var constructorSymbol = thisContainer.symbol;
-                    if (ts.isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 62) {
+                    if (ts.isBinaryExpression(thisContainer.parent) && thisContainer.parent.operatorToken.kind === 63) {
                         var l = thisContainer.parent.left;
                         if (ts.isBindableStaticAccessExpression(l) && ts.isPrototypeAccess(l.expression)) {
                             constructorSymbol = lookupSymbolForPropertyAccess(l.expression.expression, thisParentContainer);
@@ -34995,7 +37490,7 @@ var ts;
                     if (constructorSymbol && constructorSymbol.valueDeclaration) {
                         constructorSymbol.members = constructorSymbol.members || ts.createSymbolTable();
                         if (ts.hasDynamicName(node)) {
-                            bindDynamicallyNamedThisPropertyAssignment(node, constructorSymbol);
+                            bindDynamicallyNamedThisPropertyAssignment(node, constructorSymbol, constructorSymbol.members);
                         }
                         else {
                             declareSymbol(constructorSymbol.members, constructorSymbol, node, 4 | 67108864, 0 & ~4);
@@ -35003,21 +37498,22 @@ var ts;
                         addDeclarationToSymbol(constructorSymbol, constructorSymbol.valueDeclaration, 32);
                     }
                     break;
+                case 170:
                 case 166:
-                case 163:
-                case 165:
-                case 167:
                 case 168:
+                case 171:
+                case 172:
+                case 169:
                     var containingClass = thisContainer.parent;
-                    var symbolTable = ts.hasSyntacticModifier(thisContainer, 32) ? containingClass.symbol.exports : containingClass.symbol.members;
+                    var symbolTable = ts.isStatic(thisContainer) ? containingClass.symbol.exports : containingClass.symbol.members;
                     if (ts.hasDynamicName(node)) {
-                        bindDynamicallyNamedThisPropertyAssignment(node, containingClass.symbol);
+                        bindDynamicallyNamedThisPropertyAssignment(node, containingClass.symbol, symbolTable);
                     }
                     else {
                         declareSymbol(symbolTable, containingClass.symbol, node, 4 | 67108864, 0, true);
                     }
                     break;
-                case 297:
+                case 303:
                     if (ts.hasDynamicName(node)) {
                         break;
                     }
@@ -35032,8 +37528,8 @@ var ts;
                     ts.Debug.failBadSyntaxKind(thisContainer);
             }
         }
-        function bindDynamicallyNamedThisPropertyAssignment(node, symbol) {
-            bindAnonymousDeclaration(node, 4, "__computed");
+        function bindDynamicallyNamedThisPropertyAssignment(node, symbol, symbolTable) {
+            declareSymbol(symbolTable, symbol, node, 4, 0, true, true);
             addLateBoundAssignmentDeclarationToSymbol(node, symbol);
         }
         function addLateBoundAssignmentDeclarationToSymbol(node, symbol) {
@@ -35042,10 +37538,10 @@ var ts;
             }
         }
         function bindSpecialPropertyDeclaration(node) {
-            if (node.expression.kind === 107) {
+            if (node.expression.kind === 108) {
                 bindThisPropertyAssignment(node);
             }
-            else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 297) {
+            else if (ts.isBindableStaticAccessExpression(node) && node.parent.parent.kind === 303) {
                 if (ts.isPrototypeAccess(node.expression)) {
                     bindPrototypePropertyAssignment(node, node.parent);
                 }
@@ -35076,7 +37572,7 @@ var ts;
         }
         function bindObjectDefinePropertyAssignment(node) {
             var namespaceSymbol = lookupSymbolForPropertyAccess(node.arguments[0]);
-            var isToplevel = node.parent.parent.kind === 297;
+            var isToplevel = node.parent.parent.kind === 303;
             namespaceSymbol = bindPotentiallyMissingNamespaces(namespaceSymbol, node.arguments[0], isToplevel, false, false);
             bindPotentiallyNewExpandoMemberToNamespace(node, namespaceSymbol, false);
         }
@@ -35170,8 +37666,8 @@ var ts;
         }
         function isTopLevelNamespaceAssignment(propertyAccess) {
             return ts.isBinaryExpression(propertyAccess.parent)
-                ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 297
-                : propertyAccess.parent.parent.kind === 297;
+                ? getParentOfBinaryExpression(propertyAccess.parent).parent.kind === 303
+                : propertyAccess.parent.parent.kind === 303;
         }
         function bindPropertyAssignment(name, propertyAccess, isPrototypeProperty, containerIsClass) {
             var namespaceSymbol = lookupSymbolForPropertyAccess(name, container) || lookupSymbolForPropertyAccess(name, blockScopeContainer);
@@ -35237,7 +37733,7 @@ var ts;
             }
         }
         function bindClassLikeDeclaration(node) {
-            if (node.kind === 252) {
+            if (node.kind === 256) {
                 bindBlockScopedDeclaration(node, 32, 899503);
             }
             else {
@@ -35269,7 +37765,7 @@ var ts;
                 checkStrictModeEvalOrArguments(node, node.name);
             }
             if (!ts.isBindingPattern(node.name)) {
-                if (ts.isInJSFile(node) && ts.isRequireVariableDeclaration(node, true) && !ts.getJSDocTypeTag(node)) {
+                if (ts.isInJSFile(node) && ts.isRequireVariableDeclaration(node) && !ts.getJSDocTypeTag(node)) {
                     declareSymbolAndAddToSymbolTable(node, 2097152, 2097152);
                 }
                 else if (ts.isBlockOrCatchScoped(node)) {
@@ -35284,7 +37780,7 @@ var ts;
             }
         }
         function bindParameter(node) {
-            if (node.kind === 326 && container.kind !== 313) {
+            if (node.kind === 338 && container.kind !== 321) {
                 return;
             }
             if (inStrictMode && !(node.flags & 8388608)) {
@@ -35333,7 +37829,7 @@ var ts;
             if (!file.isDeclarationFile && !(node.flags & 8388608) && ts.isAsyncFunction(node)) {
                 emitFlags |= 2048;
             }
-            if (currentFlow && ts.isObjectLiteralOrClassExpressionMethod(node)) {
+            if (currentFlow && ts.isObjectLiteralOrClassExpressionMethodOrAccessor(node)) {
                 node.flowNode = currentFlow;
             }
             return ts.hasDynamicName(node)
@@ -35346,7 +37842,7 @@ var ts;
         }
         function bindTypeParameter(node) {
             if (ts.isJSDocTemplateTag(node.parent)) {
-                var container_1 = ts.find(node.parent.parent.tags, ts.isJSDocTypeAlias) || ts.getHostSignatureFromJSDoc(node.parent);
+                var container_1 = ts.getEffectiveContainerForJSDocTemplateTag(node.parent);
                 if (container_1) {
                     if (!container_1.locals) {
                         container_1.locals = ts.createSymbolTable();
@@ -35357,7 +37853,7 @@ var ts;
                     declareSymbolAndAddToSymbolTable(node, 262144, 526824);
                 }
             }
-            else if (node.parent.kind === 185) {
+            else if (node.parent.kind === 189) {
                 var container_2 = getInferTypeContainer(node.parent);
                 if (container_2) {
                     if (!container_2.locals) {
@@ -35382,9 +37878,9 @@ var ts;
                 return false;
             }
             if (currentFlow === unreachableFlow) {
-                var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 231) ||
-                    node.kind === 252 ||
-                    (node.kind === 256 && shouldReportErrorOnModuleDeclaration(node));
+                var reportError = (ts.isStatementButNotDeclaration(node) && node.kind !== 235) ||
+                    node.kind === 256 ||
+                    (node.kind === 260 && shouldReportErrorOnModuleDeclaration(node));
                 if (reportError) {
                     currentFlow = reportedUnreachableFlow;
                     if (!options.allowUnreachableCode) {
@@ -35416,12 +37912,12 @@ var ts;
     }
     function isPurelyTypeDeclaration(s) {
         switch (s.kind) {
-            case 253:
-            case 254:
+            case 257:
+            case 258:
                 return true;
-            case 256:
+            case 260:
                 return getModuleInstanceState(s) !== 1;
-            case 255:
+            case 259:
                 return ts.hasSyntacticModifier(s, 2048);
             default:
                 return false;
@@ -35464,7 +37960,7 @@ var ts;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
-    function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments) {
+    function createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getConstraintOfTypeParameter, getFirstIdentifier, getTypeArguments) {
         return getSymbolWalker;
         function getSymbolWalker(accept) {
             if (accept === void 0) { accept = function () { return true; }; }
@@ -35576,21 +38072,22 @@ var ts;
                 visitType(interfaceT.thisType);
             }
             function visitObjectType(type) {
-                var stringIndexType = getIndexTypeOfStructuredType(type, 0);
-                visitType(stringIndexType);
-                var numberIndexType = getIndexTypeOfStructuredType(type, 1);
-                visitType(numberIndexType);
                 var resolved = resolveStructuredTypeMembers(type);
-                for (var _i = 0, _a = resolved.callSignatures; _i < _a.length; _i++) {
-                    var signature = _a[_i];
-                    visitSignature(signature);
+                for (var _i = 0, _a = resolved.indexInfos; _i < _a.length; _i++) {
+                    var info = _a[_i];
+                    visitType(info.keyType);
+                    visitType(info.type);
                 }
-                for (var _b = 0, _c = resolved.constructSignatures; _b < _c.length; _b++) {
+                for (var _b = 0, _c = resolved.callSignatures; _b < _c.length; _b++) {
                     var signature = _c[_b];
                     visitSignature(signature);
                 }
-                for (var _d = 0, _e = resolved.properties; _d < _e.length; _d++) {
-                    var p = _e[_d];
+                for (var _d = 0, _e = resolved.constructSignatures; _d < _e.length; _d++) {
+                    var signature = _e[_d];
+                    visitSignature(signature);
+                }
+                for (var _f = 0, _g = resolved.properties; _f < _g.length; _f++) {
+                    var p = _g[_f];
                     visitSymbol(p);
                 }
             }
@@ -35612,7 +38109,7 @@ var ts;
                     symbol.exports.forEach(visitSymbol);
                 }
                 ts.forEach(symbol.declarations, function (d) {
-                    if (d.type && d.type.kind === 176) {
+                    if (d.type && d.type.kind === 180) {
                         var query = d.type;
                         var entity = getResolvedSymbol(getFirstIdentifier(query.exprName));
                         visitSymbol(entity);
@@ -35687,17 +38184,17 @@ var ts;
     }
     ts.isInstantiatedModule = isInstantiatedModule;
     function createTypeChecker(host, produceDiagnostics) {
-        var getPackagesSet = ts.memoize(function () {
-            var set = new ts.Set();
+        var getPackagesMap = ts.memoize(function () {
+            var map = new ts.Map();
             host.getSourceFiles().forEach(function (sf) {
                 if (!sf.resolvedModules)
                     return;
-                ts.forEachEntry(sf.resolvedModules, function (r) {
+                sf.resolvedModules.forEach(function (r) {
                     if (r && r.packageId)
-                        set.add(r.packageId.name);
+                        map.set(r.packageId.name, r.extension === ".d.ts" || !!map.get(r.packageId.name));
                 });
             });
-            return set;
+            return map;
         });
         var cancellationToken;
         var requestedExternalEmitHelpers;
@@ -35711,13 +38208,14 @@ var ts;
         var totalInstantiationCount = 0;
         var instantiationCount = 0;
         var instantiationDepth = 0;
+        var inlineLevel = 0;
         var currentNode;
-        var typeCatalog = [];
         var emptySymbols = ts.createSymbolTable();
         var arrayVariances = [1];
         var compilerOptions = host.getCompilerOptions();
         var languageVersion = ts.getEmitScriptTarget(compilerOptions);
         var moduleKind = ts.getEmitModuleKind(compilerOptions);
+        var useDefineForClassFields = ts.getUseDefineForClassFields(compilerOptions);
         var allowSyntheticDefaultImports = ts.getAllowSyntheticDefaultImports(compilerOptions);
         var strictNullChecks = ts.getStrictOptionValue(compilerOptions, "strictNullChecks");
         var strictFunctionTypes = ts.getStrictOptionValue(compilerOptions, "strictFunctionTypes");
@@ -35725,8 +38223,11 @@ var ts;
         var strictPropertyInitialization = ts.getStrictOptionValue(compilerOptions, "strictPropertyInitialization");
         var noImplicitAny = ts.getStrictOptionValue(compilerOptions, "noImplicitAny");
         var noImplicitThis = ts.getStrictOptionValue(compilerOptions, "noImplicitThis");
+        var useUnknownInCatchVariables = ts.getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
         var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
-        var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 32768;
+        var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 16384;
+        var exactOptionalPropertyTypes = compilerOptions.exactOptionalPropertyTypes;
+        var checkBinaryExpression = createCheckBinaryExpression();
         var emitResolver = createResolver();
         var nodeBuilder = createNodeBuilder();
         var globals = ts.createSymbolTable();
@@ -35743,7 +38244,6 @@ var ts;
             getNodeCount: function () { return ts.sum(host.getSourceFiles(), "nodeCount"); },
             getIdentifierCount: function () { return ts.sum(host.getSourceFiles(), "identifierCount"); },
             getSymbolCount: function () { return ts.sum(host.getSourceFiles(), "symbolCount") + symbolCount; },
-            getTypeCatalog: function () { return typeCatalog; },
             getTypeCount: function () { return typeCount; },
             getInstantiationCount: function () { return totalInstantiationCount; },
             getRelationCacheSizes: function () { return ({
@@ -35759,6 +38259,7 @@ var ts;
             getDiagnostics: getDiagnostics,
             getGlobalDiagnostics: getGlobalDiagnostics,
             getRecursionIdentity: getRecursionIdentity,
+            getUnmatchedProperties: getUnmatchedProperties,
             getTypeOfSymbolAtLocation: function (symbol, locationIn) {
                 var location = ts.getParseTreeNode(locationIn);
                 return location ? getTypeOfSymbolAtLocation(symbol, location) : errorType;
@@ -35782,9 +38283,10 @@ var ts;
                 return lexicallyScopedIdentifier ? getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) : undefined;
             },
             getTypeOfPropertyOfType: function (type, name) { return getTypeOfPropertyOfType(type, ts.escapeLeadingUnderscores(name)); },
-            getIndexInfoOfType: getIndexInfoOfType,
+            getIndexInfoOfType: function (type, kind) { return getIndexInfoOfType(type, kind === 0 ? stringType : numberType); },
+            getIndexInfosOfType: getIndexInfosOfType,
             getSignaturesOfType: getSignaturesOfType,
-            getIndexTypeOfType: getIndexTypeOfType,
+            getIndexTypeOfType: function (type, kind) { return getIndexTypeOfType(type, kind === 0 ? stringType : numberType); },
             getBaseTypes: getBaseTypes,
             getBaseTypeOfLiteralType: getBaseTypeOfLiteralType,
             getWidenedType: getWidenedType,
@@ -35793,6 +38295,7 @@ var ts;
                 return node ? getTypeFromTypeNode(node) : errorType;
             },
             getParameterType: getTypeAtPosition,
+            getParameterIdentifierNameAtPosition: getParameterIdentifierNameAtPosition,
             getPromisedTypeOfPromise: getPromisedTypeOfPromise,
             getAwaitedType: function (type) { return getAwaitedType(type); },
             getReturnTypeOfSignature: getReturnTypeOfSignature,
@@ -35817,6 +38320,10 @@ var ts;
                 var node = ts.getParseTreeNode(nodeIn);
                 return node ? getSymbolAtLocation(node, true) : undefined;
             },
+            getIndexInfosAtLocation: function (nodeIn) {
+                var node = ts.getParseTreeNode(nodeIn);
+                return node ? getIndexInfosAtLocation(node) : undefined;
+            },
             getShorthandAssignmentValueSymbol: function (nodeIn) {
                 var node = ts.getParseTreeNode(nodeIn);
                 return node ? getShorthandAssignmentValueSymbol(node) : undefined;
@@ -35906,6 +38413,7 @@ var ts;
                 return node && getContextualTypeForJsxAttribute(node);
             },
             isContextSensitive: isContextSensitive,
+            getTypeOfPropertyOfContextualType: getTypeOfPropertyOfContextualType,
             getFullyQualifiedName: getFullyQualifiedName,
             getResolvedSignature: function (node, candidatesOutArray, argumentCount) {
                 return getResolvedSignatureWorker(node, candidatesOutArray, argumentCount, 0);
@@ -35915,6 +38423,7 @@ var ts;
             },
             getExpandedParameters: getExpandedParameters,
             hasEffectiveRestParameter: hasEffectiveRestParameter,
+            containsArgumentsReference: containsArgumentsReference,
             getConstantValue: function (nodeIn) {
                 var node = ts.getParseTreeNode(nodeIn, canHaveConstantValue);
                 return node ? getConstantValue(node) : undefined;
@@ -35940,7 +38449,8 @@ var ts;
             getEmitResolver: getEmitResolver,
             getExportsOfModule: getExportsOfModuleAsArray,
             getExportsAndPropertiesOfModule: getExportsAndPropertiesOfModule,
-            getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getIndexTypeOfStructuredType, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments),
+            forEachExportAndPropertyOfModule: forEachExportAndPropertyOfModule,
+            getSymbolWalker: ts.createGetSymbolWalker(getRestTypeOfSignature, getTypePredicateOfSignature, getReturnTypeOfSignature, getBaseTypes, resolveStructuredTypeMembers, getTypeOfSymbol, getResolvedSymbol, getConstraintOfTypeParameter, ts.getFirstIdentifier, getTypeArguments),
             getAmbientModules: getAmbientModules,
             getJsxIntrinsicTagNamesAt: getJsxIntrinsicTagNamesAt,
             isOptionalParameter: function (nodeIn) {
@@ -35949,6 +38459,7 @@ var ts;
             },
             tryGetMemberInModuleExports: function (name, symbol) { return tryGetMemberInModuleExports(ts.escapeLeadingUnderscores(name), symbol); },
             tryGetMemberInModuleExportsAndProperties: function (name, symbol) { return tryGetMemberInModuleExportsAndProperties(ts.escapeLeadingUnderscores(name), symbol); },
+            tryFindAmbientModule: function (moduleName) { return tryFindAmbientModule(moduleName, true); },
             tryFindAmbientModuleWithoutAugmentations: function (moduleName) {
                 return tryFindAmbientModule(moduleName, false);
             },
@@ -35974,11 +38485,14 @@ var ts;
             getESSymbolType: function () { return esSymbolType; },
             getNeverType: function () { return neverType; },
             getOptionalType: function () { return optionalType; },
+            getPromiseType: function () { return getGlobalPromiseType(false); },
+            getPromiseLikeType: function () { return getGlobalPromiseLikeType(false); },
             isSymbolAccessible: isSymbolAccessible,
             isArrayType: isArrayType,
             isTupleType: isTupleType,
             isArrayLikeType: isArrayLikeType,
             isTypeInvalidDueToUnionDiscriminant: isTypeInvalidDueToUnionDiscriminant,
+            getExactOptionalProperties: getExactOptionalProperties,
             getAllPossiblePropertiesOfTypes: getAllPossiblePropertiesOfTypes,
             getSuggestedSymbolForNonexistentProperty: getSuggestedSymbolForNonexistentProperty,
             getSuggestionForNonexistentProperty: getSuggestionForNonexistentProperty,
@@ -35987,6 +38501,7 @@ var ts;
             getSuggestionForNonexistentSymbol: function (location, name, meaning) { return getSuggestionForNonexistentSymbol(location, ts.escapeLeadingUnderscores(name), meaning); },
             getSuggestedSymbolForNonexistentModule: getSuggestedSymbolForNonexistentModule,
             getSuggestionForNonexistentExport: getSuggestionForNonexistentExport,
+            getSuggestedSymbolForNonexistentClassMember: getSuggestedSymbolForNonexistentClassMember,
             getBaseConstraintOfType: getBaseConstraintOfType,
             getDefaultFromTypeParameter: function (type) { return type && type.flags & 262144 ? getDefaultFromTypeParameter(type) : undefined; },
             resolveName: function (name, location, meaning, excludeGlobals) {
@@ -36045,6 +38560,9 @@ var ts;
             },
             getLocalTypeParametersOfClassOrInterfaceOrTypeAlias: getLocalTypeParametersOfClassOrInterfaceOrTypeAlias,
             isDeclarationVisible: isDeclarationVisible,
+            isPropertyAccessible: isPropertyAccessible,
+            getTypeOnlyAliasDeclaration: getTypeOnlyAliasDeclaration,
+            getMemberOverrideModifierStatus: getMemberOverrideModifierStatus,
         };
         function getResolvedSignatureWorker(nodeIn, candidatesOutArray, argumentCount, checkMode) {
             var node = ts.getParseTreeNode(nodeIn, ts.isCallLikeExpression);
@@ -36056,27 +38574,36 @@ var ts;
         var tupleTypes = new ts.Map();
         var unionTypes = new ts.Map();
         var intersectionTypes = new ts.Map();
-        var literalTypes = new ts.Map();
+        var stringLiteralTypes = new ts.Map();
+        var numberLiteralTypes = new ts.Map();
+        var bigIntLiteralTypes = new ts.Map();
+        var enumLiteralTypes = new ts.Map();
         var indexedAccessTypes = new ts.Map();
         var templateLiteralTypes = new ts.Map();
         var stringMappingTypes = new ts.Map();
         var substitutionTypes = new ts.Map();
+        var subtypeReductionCache = new ts.Map();
         var evolvingArrayTypes = [];
         var undefinedProperties = new ts.Map();
         var unknownSymbol = createSymbol(4, "unknown");
         var resolvingSymbol = createSymbol(0, "__resolving__");
+        var unresolvedSymbols = new ts.Map();
+        var errorTypes = new ts.Map();
         var anyType = createIntrinsicType(1, "any");
         var autoType = createIntrinsicType(1, "any");
         var wildcardType = createIntrinsicType(1, "any");
         var errorType = createIntrinsicType(1, "error");
-        var nonInferrableAnyType = createIntrinsicType(1, "any", 524288);
+        var unresolvedType = createIntrinsicType(1, "unresolved");
+        var nonInferrableAnyType = createIntrinsicType(1, "any", 131072);
         var intrinsicMarkerType = createIntrinsicType(1, "intrinsic");
         var unknownType = createIntrinsicType(2, "unknown");
+        var nonNullUnknownType = createIntrinsicType(2, "unknown");
         var undefinedType = createIntrinsicType(32768, "undefined");
-        var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768, "undefined", 524288);
+        var undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(32768, "undefined", 131072);
         var optionalType = createIntrinsicType(32768, "undefined");
+        var missingType = exactOptionalPropertyTypes ? createIntrinsicType(32768, "undefined") : undefinedType;
         var nullType = createIntrinsicType(65536, "null");
-        var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536, "null", 524288);
+        var nullWideningType = strictNullChecks ? nullType : createIntrinsicType(65536, "null", 131072);
         var stringType = createIntrinsicType(4, "string");
         var numberType = createIntrinsicType(8, "number");
         var bigintType = createIntrinsicType(64, "bigint");
@@ -36092,37 +38619,35 @@ var ts;
         falseType.freshType = falseType;
         regularFalseType.regularType = regularFalseType;
         regularFalseType.freshType = falseType;
-        var booleanType = createBooleanType([regularFalseType, regularTrueType]);
-        createBooleanType([regularFalseType, trueType]);
-        createBooleanType([falseType, regularTrueType]);
-        createBooleanType([falseType, trueType]);
+        var booleanType = getUnionType([regularFalseType, regularTrueType]);
         var esSymbolType = createIntrinsicType(4096, "symbol");
         var voidType = createIntrinsicType(16384, "void");
         var neverType = createIntrinsicType(131072, "never");
         var silentNeverType = createIntrinsicType(131072, "never");
-        var nonInferrableType = createIntrinsicType(131072, "never", 2097152);
+        var nonInferrableType = createIntrinsicType(131072, "never", 524288);
         var implicitNeverType = createIntrinsicType(131072, "never");
         var unreachableNeverType = createIntrinsicType(131072, "never");
         var nonPrimitiveType = createIntrinsicType(67108864, "object");
+        var stringOrNumberType = getUnionType([stringType, numberType]);
         var stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]);
         var keyofConstraintType = keyofStringsOnly ? stringType : stringNumberSymbolType;
         var numberOrBigIntType = getUnionType([numberType, bigintType]);
         var templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]);
         var restrictiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 ? getRestrictiveTypeParameter(t) : t; });
         var permissiveMapper = makeFunctionTypeMapper(function (t) { return t.flags & 262144 ? wildcardType : t; });
-        var emptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
-        var emptyJsxObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
-        emptyJsxObjectType.objectFlags |= 4096;
+        var emptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        var emptyJsxObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        emptyJsxObjectType.objectFlags |= 2048;
         var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
         emptyTypeLiteralSymbol.members = ts.createSymbolTable();
-        var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
-        var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
+        var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
         emptyGenericType.instantiations = new ts.Map();
-        var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
-        anyFunctionType.objectFlags |= 2097152;
-        var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
-        var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
-        var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
+        var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        anyFunctionType.objectFlags |= 524288;
+        var noConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        var circularConstraintType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        var resolvingDefaultType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
         var markerSuperType = createTypeParameter();
         var markerSubType = createTypeParameter();
         markerSubType.constraint = markerSuperType;
@@ -36132,7 +38657,7 @@ var ts;
         var unknownSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, errorType, undefined, 0, 0);
         var resolvingSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, anyType, undefined, 0, 0);
         var silentNeverSignature = createSignature(undefined, undefined, undefined, ts.emptyArray, silentNeverType, undefined, 0, 0);
-        var enumNumberIndexInfo = createIndexInfo(stringType, true);
+        var enumNumberIndexInfo = createIndexInfo(numberType, stringType, true);
         var iterationTypesCache = new ts.Map();
         var noIterationTypes = {
             get yieldType() { return ts.Debug.fail("Not supported"); },
@@ -36190,6 +38715,7 @@ var ts;
         var anyReadonlyArrayType;
         var deferredGlobalNonNullableTypeAlias;
         var deferredGlobalESSymbolConstructorSymbol;
+        var deferredGlobalESSymbolConstructorTypeSymbol;
         var deferredGlobalESSymbolType;
         var deferredGlobalTypedPropertyDescriptorType;
         var deferredGlobalPromiseType;
@@ -36208,8 +38734,11 @@ var ts;
         var deferredGlobalAsyncGeneratorType;
         var deferredGlobalTemplateStringsArrayType;
         var deferredGlobalImportMetaType;
+        var deferredGlobalImportMetaExpressionType;
+        var deferredGlobalImportCallOptionsType;
         var deferredGlobalExtractSymbol;
         var deferredGlobalOmitSymbol;
+        var deferredGlobalAwaitedSymbol;
         var deferredGlobalBigIntType;
         var allPotentiallyUnusedIdentifiers = new ts.Map();
         var flowLoopStart = 0;
@@ -36220,9 +38749,9 @@ var ts;
         var lastFlowNode;
         var lastFlowNodeReachable;
         var flowTypeCache;
-        var emptyStringType = getLiteralType("");
-        var zeroType = getLiteralType(0);
-        var zeroBigIntType = getLiteralType({ negative: false, base10Value: "0" });
+        var emptyStringType = getStringLiteralType("");
+        var zeroType = getNumberLiteralType(0);
+        var zeroBigIntType = getBigIntLiteralType({ negative: false, base10Value: "0" });
         var resolutionTargets = [];
         var resolutionResults = [];
         var resolutionPropertyNames = [];
@@ -36241,7 +38770,8 @@ var ts;
         var flowNodePostSuper = [];
         var potentialThisCollisions = [];
         var potentialNewTargetCollisions = [];
-        var potentialWeakMapCollisions = [];
+        var potentialWeakMapSetCollisions = [];
+        var potentialReflectCollisions = [];
         var awaitedTypeStack = [];
         var diagnostics = ts.createDiagnosticCollection();
         var suggestionDiagnostics = ts.createDiagnosticCollection();
@@ -36265,6 +38795,17 @@ var ts;
         var enumRelation = new ts.Map();
         var builtinGlobals = ts.createSymbolTable();
         builtinGlobals.set(undefinedSymbol.escapedName, undefinedSymbol);
+        var suggestedExtensions = [
+            [".mts", ".mjs"],
+            [".ts", ".js"],
+            [".cts", ".cjs"],
+            [".mjs", ".mjs"],
+            [".js", ".js"],
+            [".cjs", ".cjs"],
+            [".tsx", compilerOptions.jsx === 1 ? ".jsx" : ".js"],
+            [".jsx", ".jsx"],
+            [".json", ".json"],
+        ];
         initializeTypeChecker();
         return checker;
         function getJsxNamespace(location) {
@@ -36291,17 +38832,9 @@ var ts;
                         }
                     }
                     else {
-                        if (file.localJsxNamespace) {
-                            return file.localJsxNamespace;
-                        }
-                        var jsxPragma = file.pragmas.get("jsx");
-                        if (jsxPragma) {
-                            var chosenPragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
-                            file.localJsxFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
-                            ts.visitNode(file.localJsxFactory, markAsSynthetic);
-                            if (file.localJsxFactory) {
-                                return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText;
-                            }
+                        var localJsxNamespace = getLocalJsxNamespace(file);
+                        if (localJsxNamespace) {
+                            return file.localJsxNamespace = localJsxNamespace;
                         }
                     }
                 }
@@ -36323,11 +38856,25 @@ var ts;
                 _jsxFactoryEntity = ts.factory.createQualifiedName(ts.factory.createIdentifier(ts.unescapeLeadingUnderscores(_jsxNamespace)), "createElement");
             }
             return _jsxNamespace;
-            function markAsSynthetic(node) {
-                ts.setTextRangePosEnd(node, -1, -1);
-                return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext);
+        }
+        function getLocalJsxNamespace(file) {
+            if (file.localJsxNamespace) {
+                return file.localJsxNamespace;
+            }
+            var jsxPragma = file.pragmas.get("jsx");
+            if (jsxPragma) {
+                var chosenPragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
+                file.localJsxFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
+                ts.visitNode(file.localJsxFactory, markAsSynthetic);
+                if (file.localJsxFactory) {
+                    return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText;
+                }
             }
         }
+        function markAsSynthetic(node) {
+            ts.setTextRangePosEnd(node, -1, -1);
+            return ts.visitEachChild(node, markAsSynthetic, ts.nullTransformationContext);
+        }
         function getEmitResolver(sourceFile, cancellationToken) {
             getDiagnostics(sourceFile, cancellationToken);
             return emitResolver;
@@ -36350,10 +38897,13 @@ var ts;
             diagnostic.skippedOn = key;
             return diagnostic;
         }
-        function error(location, message, arg0, arg1, arg2, arg3) {
-            var diagnostic = location
+        function createError(location, message, arg0, arg1, arg2, arg3) {
+            return location
                 ? ts.createDiagnosticForNode(location, message, arg0, arg1, arg2, arg3)
                 : ts.createCompilerDiagnostic(message, arg0, arg1, arg2, arg3);
+        }
+        function error(location, message, arg0, arg1, arg2, arg3) {
+            var diagnostic = createError(location, message, arg0, arg1, arg2, arg3);
             diagnostics.add(diagnostic);
             return diagnostic;
         }
@@ -36404,7 +38954,7 @@ var ts;
         }
         function createSymbol(flags, name, checkFlags) {
             symbolCount++;
-            var symbol = (new Symbol(flags | 33554432, name));
+            var symbol = new Symbol(flags | 33554432, name);
             symbol.checkFlags = checkFlags || 0;
             return symbol;
         }
@@ -36504,7 +39054,7 @@ var ts;
             }
             else if (target.flags & 1024) {
                 if (target !== globalThisSymbol) {
-                    error(ts.getNameOfDeclaration(source.declarations[0]), ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
+                    error(source.declarations && ts.getNameOfDeclaration(source.declarations[0]), ts.Diagnostics.Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity, symbolToString(target));
                 }
             }
             else {
@@ -36521,7 +39071,7 @@ var ts;
                 if (sourceSymbolFile && targetSymbolFile && amalgamatedDuplicates && !isEitherEnum && sourceSymbolFile !== targetSymbolFile) {
                     var firstFile_1 = ts.comparePaths(sourceSymbolFile.path, targetSymbolFile.path) === -1 ? sourceSymbolFile : targetSymbolFile;
                     var secondFile_1 = firstFile_1 === sourceSymbolFile ? targetSymbolFile : sourceSymbolFile;
-                    var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, firstFile_1.path + "|" + secondFile_1.path, function () {
+                    var filesDuplicates = ts.getOrUpdate(amalgamatedDuplicates, "".concat(firstFile_1.path, "|").concat(secondFile_1.path), function () {
                         return ({ firstFile: firstFile_1, secondFile: secondFile_1, conflictingSymbols: new ts.Map() });
                     });
                     var conflictingSymbolInfo = ts.getOrUpdate(filesDuplicates.conflictingSymbols, symbolName_1, function () {
@@ -36537,9 +39087,11 @@ var ts;
             }
             return target;
             function addDuplicateLocations(locs, symbol) {
-                for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
-                    var decl = _a[_i];
-                    ts.pushIfUnique(locs, decl);
+                if (symbol.declarations) {
+                    for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+                        var decl = _a[_i];
+                        ts.pushIfUnique(locs, decl);
+                    }
                 }
             }
         }
@@ -36585,9 +39137,9 @@ var ts;
             });
         }
         function mergeModuleAugmentation(moduleName) {
-            var _a, _b;
+            var _a, _b, _c;
             var moduleAugmentation = moduleName.parent;
-            if (moduleAugmentation.symbol.declarations[0] !== moduleAugmentation) {
+            if (((_a = moduleAugmentation.symbol.declarations) === null || _a === void 0 ? void 0 : _a[0]) !== moduleAugmentation) {
                 ts.Debug.assert(moduleAugmentation.symbol.declarations.length > 1);
                 return;
             }
@@ -36612,10 +39164,10 @@ var ts;
                         patternAmbientModuleAugmentations.set(moduleName.text, merged);
                     }
                     else {
-                        if (((_a = mainModule_1.exports) === null || _a === void 0 ? void 0 : _a.get("__export")) && ((_b = moduleAugmentation.symbol.exports) === null || _b === void 0 ? void 0 : _b.size)) {
+                        if (((_b = mainModule_1.exports) === null || _b === void 0 ? void 0 : _b.get("__export")) && ((_c = moduleAugmentation.symbol.exports) === null || _c === void 0 ? void 0 : _c.size)) {
                             var resolvedExports = getResolvedMembersOrExportsOfSymbol(mainModule_1, "resolvedExports");
-                            for (var _i = 0, _c = ts.arrayFrom(moduleAugmentation.symbol.exports.entries()); _i < _c.length; _i++) {
-                                var _d = _c[_i], key = _d[0], value = _d[1];
+                            for (var _i = 0, _d = ts.arrayFrom(moduleAugmentation.symbol.exports.entries()); _i < _d.length; _i++) {
+                                var _e = _d[_i], key = _e[0], value = _e[1];
                                 if (resolvedExports.has(key) && !mainModule_1.exports.has(key)) {
                                     mergeSymbol(resolvedExports.get(key), value);
                                 }
@@ -36654,7 +39206,7 @@ var ts;
             return nodeLinks[nodeId] || (nodeLinks[nodeId] = new NodeLinks());
         }
         function isGlobalSourceFile(node) {
-            return node.kind === 297 && !ts.isExternalOrCommonJsModule(node);
+            return node.kind === 303 && !ts.isExternalOrCommonJsModule(node);
         }
         function getSymbol(symbols, name, meaning) {
             if (meaning) {
@@ -36701,15 +39253,15 @@ var ts;
                 return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile);
             }
             if (declaration.pos <= usage.pos && !(ts.isPropertyDeclaration(declaration) && ts.isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) {
-                if (declaration.kind === 198) {
-                    var errorBindingElement = ts.getAncestor(usage, 198);
+                if (declaration.kind === 202) {
+                    var errorBindingElement = ts.getAncestor(usage, 202);
                     if (errorBindingElement) {
                         return ts.findAncestor(errorBindingElement, ts.isBindingElement) !== ts.findAncestor(declaration, ts.isBindingElement) ||
                             declaration.pos < errorBindingElement.pos;
                     }
-                    return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 249), usage);
+                    return isBlockScopedNameDeclaredBeforeUse(ts.getAncestor(declaration, 253), usage);
                 }
-                else if (declaration.kind === 249) {
+                else if (declaration.kind === 253) {
                     return !isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage);
                 }
                 else if (ts.isClassDeclaration(declaration)) {
@@ -36719,23 +39271,23 @@ var ts;
                     return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, false);
                 }
                 else if (ts.isParameterPropertyDeclaration(declaration, declaration.parent)) {
-                    return !(compilerOptions.target === 99 && !!compilerOptions.useDefineForClassFields
+                    return !(ts.getEmitScriptTarget(compilerOptions) === 99 && useDefineForClassFields
                         && ts.getContainingClass(declaration) === ts.getContainingClass(usage)
                         && isUsedInFunctionOrInstanceProperty(usage, declaration));
                 }
                 return true;
             }
-            if (usage.parent.kind === 270 || (usage.parent.kind === 266 && usage.parent.isExportEquals)) {
+            if (usage.parent.kind === 274 || (usage.parent.kind === 270 && usage.parent.isExportEquals)) {
                 return true;
             }
-            if (usage.kind === 266 && usage.isExportEquals) {
+            if (usage.kind === 270 && usage.isExportEquals) {
                 return true;
             }
             if (!!(usage.flags & 4194304) || isInTypeQuery(usage) || usageInTypeDeclaration()) {
                 return true;
             }
             if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
-                if (compilerOptions.target === 99 && !!compilerOptions.useDefineForClassFields
+                if (ts.getEmitScriptTarget(compilerOptions) === 99 && useDefineForClassFields
                     && ts.getContainingClass(declaration)
                     && (ts.isPropertyDeclaration(declaration) || ts.isParameterPropertyDeclaration(declaration, declaration.parent))) {
                     return !isPropertyImmediatelyReferencedWithinDeclaration(declaration, usage, true);
@@ -36750,9 +39302,9 @@ var ts;
             }
             function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration, usage) {
                 switch (declaration.parent.parent.kind) {
-                    case 232:
-                    case 237:
-                    case 239:
+                    case 236:
+                    case 241:
+                    case 243:
                         if (isSameScopeDescendentOf(usage, declaration, declContainer)) {
                             return true;
                         }
@@ -36769,19 +39321,33 @@ var ts;
                     if (ts.isFunctionLike(current)) {
                         return true;
                     }
-                    var initializerOfProperty = current.parent &&
-                        current.parent.kind === 163 &&
-                        current.parent.initializer === current;
-                    if (initializerOfProperty) {
-                        if (ts.hasSyntacticModifier(current.parent, 32)) {
-                            if (declaration.kind === 165) {
-                                return true;
+                    if (ts.isClassStaticBlockDeclaration(current)) {
+                        return declaration.pos < usage.pos;
+                    }
+                    var propertyDeclaration = ts.tryCast(current.parent, ts.isPropertyDeclaration);
+                    if (propertyDeclaration) {
+                        var initializerOfProperty = propertyDeclaration.initializer === current;
+                        if (initializerOfProperty) {
+                            if (ts.isStatic(current.parent)) {
+                                if (declaration.kind === 168) {
+                                    return true;
+                                }
+                                if (ts.isPropertyDeclaration(declaration) && ts.getContainingClass(usage) === ts.getContainingClass(declaration)) {
+                                    var propName = declaration.name;
+                                    if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName)) {
+                                        var type = getTypeOfSymbol(getSymbolOfNode(declaration));
+                                        var staticBlocks = ts.filter(declaration.parent.members, ts.isClassStaticBlockDeclaration);
+                                        if (isPropertyInitializedInStaticBlocks(propName, type, staticBlocks, declaration.parent.pos, current.pos)) {
+                                            return true;
+                                        }
+                                    }
+                                }
                             }
-                        }
-                        else {
-                            var isDeclarationInstanceProperty = declaration.kind === 163 && !ts.hasSyntacticModifier(declaration, 32);
-                            if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
-                                return true;
+                            else {
+                                var isDeclarationInstanceProperty = declaration.kind === 166 && !ts.isStatic(declaration);
+                                if (!isDeclarationInstanceProperty || ts.getContainingClass(usage) !== ts.getContainingClass(declaration)) {
+                                    return true;
+                                }
                             }
                         }
                     }
@@ -36797,18 +39363,18 @@ var ts;
                         return "quit";
                     }
                     switch (node.kind) {
-                        case 209:
+                        case 213:
                             return true;
-                        case 163:
+                        case 166:
                             return stopAtAnyPropertyDeclaration &&
                                 (ts.isPropertyDeclaration(declaration) && node.parent === declaration.parent
                                     || ts.isParameterPropertyDeclaration(declaration, declaration.parent) && node.parent === declaration.parent.parent)
                                 ? "quit" : true;
-                        case 230:
+                        case 234:
                             switch (node.parent.kind) {
-                                case 167:
-                                case 165:
+                                case 171:
                                 case 168:
+                                case 172:
                                     return true;
                                 default:
                                     return false;
@@ -36823,7 +39389,11 @@ var ts;
         function useOuterVariableScopeInParameter(result, location, lastLocation) {
             var target = ts.getEmitScriptTarget(compilerOptions);
             var functionLocation = location;
-            if (ts.isParameter(lastLocation) && functionLocation.body && result.valueDeclaration.pos >= functionLocation.body.pos && result.valueDeclaration.end <= functionLocation.body.end) {
+            if (ts.isParameter(lastLocation)
+                && functionLocation.body
+                && result.valueDeclaration
+                && result.valueDeclaration.pos >= functionLocation.body.pos
+                && result.valueDeclaration.end <= functionLocation.body.end) {
                 if (target >= 2) {
                     var links = getNodeLinks(functionLocation);
                     if (links.declarationRequiresScopeChange === undefined) {
@@ -36839,19 +39409,19 @@ var ts;
             }
             function requiresScopeChangeWorker(node) {
                 switch (node.kind) {
-                    case 209:
-                    case 208:
-                    case 251:
-                    case 166:
+                    case 213:
+                    case 212:
+                    case 255:
+                    case 170:
                         return false;
-                    case 165:
-                    case 167:
                     case 168:
-                    case 288:
+                    case 171:
+                    case 172:
+                    case 294:
                         return requiresScopeChangeWorker(node.name);
-                    case 163:
+                    case 166:
                         if (ts.hasStaticModifier(node)) {
-                            return target < 99 || !compilerOptions.useDefineForClassFields;
+                            return target < 99 || !useDefineForClassFields;
                         }
                         return requiresScopeChangeWorker(node.name);
                     default:
@@ -36867,11 +39437,12 @@ var ts;
                 }
             }
         }
-        function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, suggestedNameNotFoundMessage) {
+        function resolveName(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals) {
             if (excludeGlobals === void 0) { excludeGlobals = false; }
-            return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol, suggestedNameNotFoundMessage);
+            return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, getSymbol);
         }
-        function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup, suggestedNameNotFoundMessage) {
+        function resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, isUse, excludeGlobals, lookup) {
+            var _a, _b, _c;
             var originalLocation = location;
             var result;
             var lastLocation;
@@ -36887,11 +39458,11 @@ var ts;
                     if (result = lookup(location.locals, name, meaning)) {
                         var useResult = true;
                         if (ts.isFunctionLike(location) && lastLocation && lastLocation !== location.body) {
-                            if (meaning & result.flags & 788968 && lastLocation.kind !== 311) {
+                            if (meaning & result.flags & 788968 && lastLocation.kind !== 318) {
                                 useResult = result.flags & 262144
                                     ? lastLocation === location.type ||
-                                        lastLocation.kind === 160 ||
-                                        lastLocation.kind === 159
+                                        lastLocation.kind === 163 ||
+                                        lastLocation.kind === 162
                                     : false;
                             }
                             if (meaning & result.flags & 3) {
@@ -36900,13 +39471,13 @@ var ts;
                                 }
                                 else if (result.flags & 1) {
                                     useResult =
-                                        lastLocation.kind === 160 ||
+                                        lastLocation.kind === 163 ||
                                             (lastLocation === location.type &&
                                                 !!ts.findAncestor(result.valueDeclaration, ts.isParameter));
                                 }
                             }
                         }
-                        else if (location.kind === 184) {
+                        else if (location.kind === 188) {
                             useResult = lastLocation === location.trueType;
                         }
                         if (useResult) {
@@ -36919,13 +39490,13 @@ var ts;
                 }
                 withinDeferredContext = withinDeferredContext || getIsDeferredContext(location, lastLocation);
                 switch (location.kind) {
-                    case 297:
+                    case 303:
                         if (!ts.isExternalOrCommonJsModule(location))
                             break;
                         isInExternalModule = true;
-                    case 256:
-                        var moduleExports = getSymbolOfNode(location).exports || emptySymbols;
-                        if (location.kind === 297 || (ts.isModuleDeclaration(location) && location.flags & 8388608 && !ts.isGlobalScopeAugmentation(location))) {
+                    case 260:
+                        var moduleExports = ((_a = getSymbolOfNode(location)) === null || _a === void 0 ? void 0 : _a.exports) || emptySymbols;
+                        if (location.kind === 303 || (ts.isModuleDeclaration(location) && location.flags & 8388608 && !ts.isGlobalScopeAugmentation(location))) {
                             if (result = moduleExports.get("default")) {
                                 var localSymbol = ts.getLocalSymbolForExportDefault(result);
                                 if (localSymbol && (result.flags & meaning) && localSymbol.escapedName === name) {
@@ -36936,12 +39507,12 @@ var ts;
                             var moduleExport = moduleExports.get(name);
                             if (moduleExport &&
                                 moduleExport.flags === 2097152 &&
-                                (ts.getDeclarationOfKind(moduleExport, 270) || ts.getDeclarationOfKind(moduleExport, 269))) {
+                                (ts.getDeclarationOfKind(moduleExport, 274) || ts.getDeclarationOfKind(moduleExport, 273))) {
                                 break;
                             }
                         }
                         if (name !== "default" && (result = lookup(moduleExports, name, meaning & 2623475))) {
-                            if (ts.isSourceFile(location) && location.commonJsModuleIndicator && !result.declarations.some(ts.isJSDocTypeAlias)) {
+                            if (ts.isSourceFile(location) && location.commonJsModuleIndicator && !((_b = result.declarations) === null || _b === void 0 ? void 0 : _b.some(ts.isJSDocTypeAlias))) {
                                 result = undefined;
                             }
                             else {
@@ -36949,13 +39520,13 @@ var ts;
                             }
                         }
                         break;
-                    case 255:
-                        if (result = lookup(getSymbolOfNode(location).exports, name, meaning & 8)) {
+                    case 259:
+                        if (result = lookup(((_c = getSymbolOfNode(location)) === null || _c === void 0 ? void 0 : _c.exports) || emptySymbols, name, meaning & 8)) {
                             break loop;
                         }
                         break;
-                    case 163:
-                        if (!ts.hasSyntacticModifier(location, 32)) {
+                    case 166:
+                        if (!ts.isStatic(location)) {
                             var ctor = findConstructorDeclaration(location.parent);
                             if (ctor && ctor.locals) {
                                 if (lookup(ctor.locals, name, meaning & 111551)) {
@@ -36964,21 +39535,21 @@ var ts;
                             }
                         }
                         break;
-                    case 252:
-                    case 221:
-                    case 253:
+                    case 256:
+                    case 225:
+                    case 257:
                         if (result = lookup(getSymbolOfNode(location).members || emptySymbols, name, meaning & 788968)) {
                             if (!isTypeParameterSymbolDeclaredInContainer(result, location)) {
                                 result = undefined;
                                 break;
                             }
-                            if (lastLocation && ts.hasSyntacticModifier(lastLocation, 32)) {
+                            if (lastLocation && ts.isStatic(lastLocation)) {
                                 error(errorLocation, ts.Diagnostics.Static_members_cannot_reference_class_type_parameters);
                                 return undefined;
                             }
                             break loop;
                         }
-                        if (location.kind === 221 && meaning & 32) {
+                        if (location.kind === 225 && meaning & 32) {
                             var className = location.name;
                             if (className && name === className.escapedText) {
                                 result = location.symbol;
@@ -36986,8 +39557,8 @@ var ts;
                             }
                         }
                         break;
-                    case 223:
-                        if (lastLocation === location.expression && location.parent.token === 93) {
+                    case 227:
+                        if (lastLocation === location.expression && location.parent.token === 94) {
                             var container = location.parent.parent;
                             if (ts.isClassLike(container) && (result = lookup(getSymbolOfNode(container).members, name, meaning & 788968))) {
                                 if (nameNotFoundMessage) {
@@ -36997,30 +39568,30 @@ var ts;
                             }
                         }
                         break;
-                    case 158:
+                    case 161:
                         grandparent = location.parent.parent;
-                        if (ts.isClassLike(grandparent) || grandparent.kind === 253) {
+                        if (ts.isClassLike(grandparent) || grandparent.kind === 257) {
                             if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & 788968)) {
                                 error(errorLocation, ts.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);
                                 return undefined;
                             }
                         }
                         break;
-                    case 209:
-                        if (compilerOptions.target >= 2) {
+                    case 213:
+                        if (ts.getEmitScriptTarget(compilerOptions) >= 2) {
                             break;
                         }
-                    case 165:
-                    case 166:
-                    case 167:
                     case 168:
-                    case 251:
+                    case 170:
+                    case 171:
+                    case 172:
+                    case 255:
                         if (meaning & 3 && name === "arguments") {
                             result = argumentsSymbol;
                             break loop;
                         }
                         break;
-                    case 208:
+                    case 212:
                         if (meaning & 3 && name === "arguments") {
                             result = argumentsSymbol;
                             break loop;
@@ -37033,23 +39604,23 @@ var ts;
                             }
                         }
                         break;
-                    case 161:
-                        if (location.parent && location.parent.kind === 160) {
+                    case 164:
+                        if (location.parent && location.parent.kind === 163) {
                             location = location.parent;
                         }
-                        if (location.parent && (ts.isClassElement(location.parent) || location.parent.kind === 252)) {
+                        if (location.parent && (ts.isClassElement(location.parent) || location.parent.kind === 256)) {
                             location = location.parent;
                         }
                         break;
-                    case 331:
-                    case 324:
-                    case 325:
+                    case 343:
+                    case 336:
+                    case 337:
                         var root = ts.getJSDocRoot(location);
                         if (root) {
                             location = root.parent;
                         }
                         break;
-                    case 160:
+                    case 163:
                         if (lastLocation && (lastLocation === location.initializer ||
                             lastLocation === location.name && ts.isBindingPattern(lastLocation))) {
                             if (!associatedDeclarationForContainingInitializerOrBindingName) {
@@ -37057,7 +39628,7 @@ var ts;
                             }
                         }
                         break;
-                    case 198:
+                    case 202:
                         if (lastLocation && (lastLocation === location.initializer ||
                             lastLocation === location.name && ts.isBindingPattern(lastLocation))) {
                             if (ts.isParameterDeclaration(location) && !associatedDeclarationForContainingInitializerOrBindingName) {
@@ -37065,7 +39636,7 @@ var ts;
                             }
                         }
                         break;
-                    case 185:
+                    case 189:
                         if (meaning & 262144) {
                             var parameterName = location.typeParameter.name;
                             if (parameterName && name === parameterName.escapedText) {
@@ -37079,14 +39650,16 @@ var ts;
                     lastSelfReferenceLocation = location;
                 }
                 lastLocation = location;
-                location = location.parent;
+                location = ts.isJSDocTemplateTag(location) ?
+                    ts.getEffectiveContainerForJSDocTemplateTag(location) || location.parent :
+                    location.parent;
             }
             if (isUse && result && (!lastSelfReferenceLocation || result !== lastSelfReferenceLocation.symbol)) {
                 result.isReferenced |= meaning;
             }
             if (!result) {
                 if (lastLocation) {
-                    ts.Debug.assert(lastLocation.kind === 297);
+                    ts.Debug.assert(lastLocation.kind === 303);
                     if (lastLocation.commonJsModuleIndicator && name === "exports" && meaning & lastLocation.symbol.flags) {
                         return lastLocation.symbol;
                     }
@@ -37113,15 +39686,20 @@ var ts;
                             !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning) &&
                             !checkAndReportErrorForUsingValueAsType(errorLocation, name, meaning)) {
                         var suggestion = void 0;
-                        if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) {
+                        if (suggestionCount < maximumSuggestionCount) {
                             suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning);
-                            var isGlobalScopeAugmentationDeclaration = suggestion && suggestion.valueDeclaration && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
+                            var isGlobalScopeAugmentationDeclaration = (suggestion === null || suggestion === void 0 ? void 0 : suggestion.valueDeclaration) && ts.isAmbientModule(suggestion.valueDeclaration) && ts.isGlobalScopeAugmentation(suggestion.valueDeclaration);
                             if (isGlobalScopeAugmentationDeclaration) {
                                 suggestion = undefined;
                             }
                             if (suggestion) {
                                 var suggestionName = symbolToString(suggestion);
-                                var diagnostic = error(errorLocation, suggestedNameNotFoundMessage, diagnosticName(nameArg), suggestionName);
+                                var isUncheckedJS = isUncheckedJSSuggestion(originalLocation, suggestion, false);
+                                var message = meaning === 1920 || nameArg && typeof nameArg !== "string" && ts.nodeIsSynthesized(nameArg) ? ts.Diagnostics.Cannot_find_namespace_0_Did_you_mean_1
+                                    : isUncheckedJS ? ts.Diagnostics.Could_not_find_name_0_Did_you_mean_1
+                                        : ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1;
+                                var diagnostic = createError(errorLocation, message, diagnosticName(nameArg), suggestionName);
+                                addErrorOrSuggestion(!isUncheckedJS, diagnostic);
                                 if (suggestion.valueDeclaration) {
                                     ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestionName));
                                 }
@@ -37144,7 +39722,7 @@ var ts;
                 return undefined;
             }
             if (nameNotFoundMessage) {
-                if (propertyWithInvalidInitializer && !(compilerOptions.target === 99 && compilerOptions.useDefineForClassFields)) {
+                if (propertyWithInvalidInitializer && !(ts.getEmitScriptTarget(compilerOptions) === 99 && useDefineForClassFields)) {
                     var propertyName = propertyWithInvalidInitializer.name;
                     error(errorLocation, ts.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor, ts.declarationNameToString(propertyName), diagnosticName(nameArg));
                     return undefined;
@@ -37183,22 +39761,23 @@ var ts;
             if (!ts.isValidTypeOnlyAliasUseSite(useSite)) {
                 var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(symbol);
                 if (typeOnlyDeclaration) {
-                    var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
-                    var message = isExport
+                    var message = typeOnlyDeclaration.kind === 274
                         ? ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_exported_using_export_type
                         : ts.Diagnostics._0_cannot_be_used_as_a_value_because_it_was_imported_using_import_type;
-                    var relatedMessage = isExport
-                        ? ts.Diagnostics._0_was_exported_here
-                        : ts.Diagnostics._0_was_imported_here;
                     var unescapedName = ts.unescapeLeadingUnderscores(name);
-                    ts.addRelatedInfo(error(useSite, message, unescapedName), ts.createDiagnosticForNode(typeOnlyDeclaration, relatedMessage, unescapedName));
+                    addTypeOnlyDeclarationRelatedInfo(error(useSite, message, unescapedName), typeOnlyDeclaration, unescapedName);
                 }
             }
         }
+        function addTypeOnlyDeclarationRelatedInfo(diagnostic, typeOnlyDeclaration, unescapedName) {
+            if (!typeOnlyDeclaration)
+                return diagnostic;
+            return ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(typeOnlyDeclaration, typeOnlyDeclaration.kind === 274 ? ts.Diagnostics._0_was_exported_here : ts.Diagnostics._0_was_imported_here, unescapedName));
+        }
         function getIsDeferredContext(location, lastLocation) {
-            if (location.kind !== 209 && location.kind !== 208) {
+            if (location.kind !== 213 && location.kind !== 212) {
                 return ts.isTypeQueryNode(location) || ((ts.isFunctionLikeDeclaration(location) ||
-                    (location.kind === 163 && !ts.hasSyntacticModifier(location, 32))) && (!lastLocation || lastLocation !== location.name));
+                    (location.kind === 166 && !ts.isStatic(location))) && (!lastLocation || lastLocation !== location.name));
             }
             if (lastLocation && lastLocation === location.name) {
                 return false;
@@ -37210,12 +39789,12 @@ var ts;
         }
         function isSelfReferenceLocation(node) {
             switch (node.kind) {
-                case 251:
-                case 252:
-                case 253:
                 case 255:
-                case 254:
                 case 256:
+                case 257:
+                case 259:
+                case 258:
+                case 260:
                     return true;
                 default:
                     return false;
@@ -37225,12 +39804,14 @@ var ts;
             return ts.isString(nameArg) ? ts.unescapeLeadingUnderscores(nameArg) : ts.declarationNameToString(nameArg);
         }
         function isTypeParameterSymbolDeclaredInContainer(symbol, container) {
-            for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
-                var decl = _a[_i];
-                if (decl.kind === 159) {
-                    var parent = ts.isJSDocTemplateTag(decl.parent) ? ts.getJSDocHost(decl.parent) : decl.parent;
-                    if (parent === container) {
-                        return !(ts.isJSDocTemplateTag(decl.parent) && ts.find(decl.parent.parent.tags, ts.isJSDocTypeAlias));
+            if (symbol.declarations) {
+                for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+                    var decl = _a[_i];
+                    if (decl.kind === 162) {
+                        var parent = ts.isJSDocTemplateTag(decl.parent) ? ts.getJSDocHost(decl.parent) : decl.parent;
+                        if (parent === container) {
+                            return !(ts.isJSDocTemplateTag(decl.parent) && ts.find(decl.parent.parent.tags, ts.isJSDocTypeAlias));
+                        }
                     }
                 }
             }
@@ -37253,7 +39834,7 @@ var ts;
                         error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0, diagnosticName(nameArg), symbolToString(classSymbol));
                         return true;
                     }
-                    if (location === container && !ts.hasSyntacticModifier(location, 32)) {
+                    if (location === container && !ts.isStatic(location)) {
                         var instanceType = getDeclaredTypeOfSymbol(classSymbol).thisType;
                         if (getPropertyOfType(instanceType, name)) {
                             error(errorLocation, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0, diagnosticName(nameArg));
@@ -37275,10 +39856,10 @@ var ts;
         }
         function getEntityNameForExtendingInterface(node) {
             switch (node.kind) {
-                case 78:
-                case 201:
+                case 79:
+                case 205:
                     return node.parent ? getEntityNameForExtendingInterface(node.parent) : undefined;
-                case 223:
+                case 227:
                     if (ts.isEntityNameExpression(node.expression)) {
                         return node.expression;
                     }
@@ -37321,7 +39902,7 @@ var ts;
             return name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never" || name === "unknown";
         }
         function checkAndReportErrorForExportingPrimitiveType(errorLocation, name) {
-            if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 270) {
+            if (isPrimitiveTypeName(name) && errorLocation.parent.kind === 274) {
                 error(errorLocation, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, name);
                 return true;
             }
@@ -37390,11 +39971,12 @@ var ts;
             return false;
         }
         function checkResolvedBlockScopedVariable(result, errorLocation) {
+            var _a;
             ts.Debug.assert(!!(result.flags & 2 || result.flags & 32 || result.flags & 384));
             if (result.flags & (16 | 1 | 67108864) && result.flags & 32) {
                 return;
             }
-            var declaration = ts.find(result.declarations, function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 255); });
+            var declaration = (_a = result.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return ts.isBlockOrCatchScoped(d) || ts.isClassLike(d) || (d.kind === 259); });
             if (declaration === undefined)
                 return ts.Debug.fail("checkResolvedBlockScopedVariable could not find block-scoped declaration");
             if (!(declaration.flags & 8388608) && !isBlockScopedNameDeclaredBeforeUse(declaration, errorLocation)) {
@@ -37425,39 +40007,39 @@ var ts;
         }
         function getAnyImportSyntax(node) {
             switch (node.kind) {
-                case 260:
+                case 264:
                     return node;
-                case 262:
+                case 266:
                     return node.parent;
-                case 263:
+                case 267:
                     return node.parent.parent;
-                case 265:
+                case 269:
                     return node.parent.parent.parent;
                 default:
                     return undefined;
             }
         }
         function getDeclarationOfAliasSymbol(symbol) {
-            return ts.find(symbol.declarations, isAliasSymbolDeclaration);
+            return symbol.declarations && ts.findLast(symbol.declarations, isAliasSymbolDeclaration);
         }
         function isAliasSymbolDeclaration(node) {
-            return node.kind === 260
-                || node.kind === 259
-                || node.kind === 262 && !!node.name
+            return node.kind === 264
                 || node.kind === 263
+                || node.kind === 266 && !!node.name
+                || node.kind === 267
+                || node.kind === 273
                 || node.kind === 269
-                || node.kind === 265
-                || node.kind === 270
-                || node.kind === 266 && ts.exportAssignmentIsAlias(node)
+                || node.kind === 274
+                || node.kind === 270 && ts.exportAssignmentIsAlias(node)
                 || ts.isBinaryExpression(node) && ts.getAssignmentDeclarationKind(node) === 2 && ts.exportAssignmentIsAlias(node)
                 || ts.isAccessExpression(node)
                     && ts.isBinaryExpression(node.parent)
                     && node.parent.left === node
-                    && node.parent.operatorToken.kind === 62
+                    && node.parent.operatorToken.kind === 63
                     && isAliasableOrJsExpression(node.parent.right)
-                || node.kind === 289
-                || node.kind === 288 && isAliasableOrJsExpression(node.initializer)
-                || ts.isRequireVariableDeclaration(node, true);
+                || node.kind === 295
+                || node.kind === 294 && isAliasableOrJsExpression(node.initializer)
+                || ts.isRequireVariableDeclaration(node);
         }
         function isAliasableOrJsExpression(e) {
             return ts.isAliasableExpression(e) || ts.isFunctionExpression(e) && isJSConstructor(e);
@@ -37470,7 +40052,7 @@ var ts;
                     ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText))
                     : undefined;
             }
-            if (ts.isVariableDeclaration(node) || node.moduleReference.kind === 272) {
+            if (ts.isVariableDeclaration(node) || node.moduleReference.kind === 276) {
                 var immediate = resolveExternalModuleName(node, ts.getExternalModuleRequireArgument(node) || ts.getExternalModuleImportEqualsDeclarationExpression(node));
                 var resolved_4 = resolveExternalModuleSymbol(immediate);
                 markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved_4, false);
@@ -37483,7 +40065,7 @@ var ts;
         function checkAndReportErrorForResolvingImportAliasToTypeOnlySymbol(node, resolved) {
             if (markSymbolOfAliasDeclarationIfTypeOnly(node, undefined, resolved, false) && !node.isTypeOnly) {
                 var typeOnlyDeclaration = getTypeOnlyAliasDeclaration(getSymbolOfNode(node));
-                var isExport = ts.typeOnlyDeclarationIsExport(typeOnlyDeclaration);
+                var isExport = typeOnlyDeclaration.kind === 274;
                 var message = isExport
                     ? ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_exported_using_export_type
                     : ts.Diagnostics.An_import_alias_cannot_reference_a_declaration_that_was_imported_using_import_type;
@@ -37504,7 +40086,24 @@ var ts;
         function isSyntacticDefault(node) {
             return ((ts.isExportAssignment(node) && !node.isExportEquals) || ts.hasSyntacticModifier(node, 512) || ts.isExportSpecifier(node));
         }
-        function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias) {
+        function getUsageModeForExpression(usage) {
+            return ts.isStringLiteralLike(usage) ? ts.getModeForUsageLocation(ts.getSourceFileOfNode(usage), usage) : undefined;
+        }
+        function isESMFormatImportImportingCommonjsFormatFile(usageMode, targetMode) {
+            return usageMode === ts.ModuleKind.ESNext && targetMode === ts.ModuleKind.CommonJS;
+        }
+        function isOnlyImportedAsDefault(usage) {
+            var usageMode = getUsageModeForExpression(usage);
+            return usageMode === ts.ModuleKind.ESNext && ts.endsWith(usage.text, ".json");
+        }
+        function canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, usage) {
+            var usageMode = file && getUsageModeForExpression(usage);
+            if (file && usageMode !== undefined) {
+                var result = isESMFormatImportImportingCommonjsFormatFile(usageMode, file.impliedNodeFormat);
+                if (usageMode === ts.ModuleKind.ESNext || result) {
+                    return result;
+                }
+            }
             if (!allowSyntheticDefaultImports) {
                 return false;
             }
@@ -37524,6 +40123,7 @@ var ts;
             return !file.externalModuleIndicator && !resolveExportByName(moduleSymbol, ts.escapeLeadingUnderscores("__esModule"), undefined, dontResolveAlias);
         }
         function getTargetOfImportClause(node, dontResolveAlias) {
+            var _a;
             var moduleSymbol = resolveExternalModuleName(node, node.parent.moduleSpecifier);
             if (moduleSymbol) {
                 var exportDefaultSymbol = void 0;
@@ -37533,21 +40133,24 @@ var ts;
                 else {
                     exportDefaultSymbol = resolveExportByName(moduleSymbol, "default", node, dontResolveAlias);
                 }
-                var file = ts.find(moduleSymbol.declarations, ts.isSourceFile);
-                var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias);
-                if (!exportDefaultSymbol && !hasSyntheticDefault) {
+                var file = (_a = moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
+                var hasDefaultOnly = isOnlyImportedAsDefault(node.parent.moduleSpecifier);
+                var hasSyntheticDefault = canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, node.parent.moduleSpecifier);
+                if (!exportDefaultSymbol && !hasSyntheticDefault && !hasDefaultOnly) {
                     if (hasExportAssignmentSymbol(moduleSymbol)) {
                         var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015 ? "allowSyntheticDefaultImports" : "esModuleInterop";
                         var exportEqualsSymbol = moduleSymbol.exports.get("export=");
                         var exportAssignment = exportEqualsSymbol.valueDeclaration;
                         var err = error(node.name, ts.Diagnostics.Module_0_can_only_be_default_imported_using_the_1_flag, symbolToString(moduleSymbol), compilerOptionName);
-                        ts.addRelatedInfo(err, ts.createDiagnosticForNode(exportAssignment, ts.Diagnostics.This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, compilerOptionName));
+                        if (exportAssignment) {
+                            ts.addRelatedInfo(err, ts.createDiagnosticForNode(exportAssignment, ts.Diagnostics.This_module_is_declared_with_using_export_and_can_only_be_used_with_a_default_import_when_using_the_0_flag, compilerOptionName));
+                        }
                     }
                     else {
                         reportNonDefaultExport(moduleSymbol, node);
                     }
                 }
-                else if (hasSyntheticDefault) {
+                else if (hasSyntheticDefault || hasDefaultOnly) {
                     var resolved = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
                     markSymbolOfAliasDeclarationIfTypeOnly(node, moduleSymbol, resolved, false);
                     return resolved;
@@ -37557,7 +40160,7 @@ var ts;
             }
         }
         function reportNonDefaultExport(moduleSymbol, node) {
-            var _a, _b;
+            var _a, _b, _c;
             if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has(node.symbol.escapedName)) {
                 error(node.name, ts.Diagnostics.Module_0_has_no_default_export_Did_you_mean_to_use_import_1_from_0_instead, symbolToString(moduleSymbol), symbolToString(node.symbol));
             }
@@ -37565,7 +40168,7 @@ var ts;
                 var diagnostic = error(node.name, ts.Diagnostics.Module_0_has_no_default_export, symbolToString(moduleSymbol));
                 var exportStar = (_b = moduleSymbol.exports) === null || _b === void 0 ? void 0 : _b.get("__export");
                 if (exportStar) {
-                    var defaultExport = ts.find(exportStar.declarations, function (decl) {
+                    var defaultExport = (_c = exportStar.declarations) === null || _c === void 0 ? void 0 : _c.find(function (decl) {
                         var _a, _b;
                         return !!(ts.isExportDeclaration(decl) && decl.moduleSpecifier &&
                             ((_b = (_a = resolveExternalModuleName(decl, decl.moduleSpecifier)) === null || _a === void 0 ? void 0 : _a.exports) === null || _b === void 0 ? void 0 : _b.has("default")));
@@ -37625,7 +40228,7 @@ var ts;
             }
         }
         function getExternalModuleMember(node, specifier, dontResolveAlias) {
-            var _a;
+            var _a, _b;
             if (dontResolveAlias === void 0) { dontResolveAlias = false; }
             var moduleSpecifier = ts.getExternalModuleRequireArgument(node) || node.moduleSpecifier;
             var moduleSymbol = resolveExternalModuleName(node, moduleSpecifier);
@@ -37633,8 +40236,8 @@ var ts;
             if (!ts.isIdentifier(name)) {
                 return undefined;
             }
-            var suppressInteropError = name.escapedText === "default" && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop);
-            var targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, dontResolveAlias, suppressInteropError);
+            var suppressInteropError = name.escapedText === "default" && !!(compilerOptions.allowSyntheticDefaultImports || ts.getESModuleInterop(compilerOptions));
+            var targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, false, suppressInteropError);
             if (targetSymbol) {
                 if (name.escapedText) {
                     if (ts.isShorthandAmbientModuleSymbol(moduleSymbol)) {
@@ -37650,8 +40253,8 @@ var ts;
                     symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias);
                     var symbolFromModule = getExportOfModule(targetSymbol, name, specifier, dontResolveAlias);
                     if (symbolFromModule === undefined && name.escapedText === "default") {
-                        var file = ts.find(moduleSymbol.declarations, ts.isSourceFile);
-                        if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) {
+                        var file = (_a = moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
+                        if (isOnlyImportedAsDefault(moduleSpecifier) || canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias, moduleSpecifier)) {
                             symbolFromModule = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) || resolveSymbol(moduleSymbol, dontResolveAlias);
                         }
                     }
@@ -37670,7 +40273,7 @@ var ts;
                             }
                         }
                         else {
-                            if ((_a = moduleSymbol.exports) === null || _a === void 0 ? void 0 : _a.has("default")) {
+                            if ((_b = moduleSymbol.exports) === null || _b === void 0 ? void 0 : _b.has("default")) {
                                 error(name, ts.Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_to_use_import_1_from_0_instead, moduleName, declarationName);
                             }
                             else {
@@ -37683,8 +40286,8 @@ var ts;
             }
         }
         function reportNonExportedMember(node, name, declarationName, moduleSymbol, moduleName) {
-            var _a;
-            var localSymbol = (_a = moduleSymbol.valueDeclaration.locals) === null || _a === void 0 ? void 0 : _a.get(name.escapedText);
+            var _a, _b;
+            var localSymbol = (_b = (_a = moduleSymbol.valueDeclaration) === null || _a === void 0 ? void 0 : _a.locals) === null || _b === void 0 ? void 0 : _b.get(name.escapedText);
             var exports = moduleSymbol.exports;
             if (localSymbol) {
                 var exportedEqualsSymbol = exports === null || exports === void 0 ? void 0 : exports.get("export=");
@@ -37696,9 +40299,11 @@ var ts;
                     var exportedSymbol = exports ? ts.find(symbolsToArray(exports), function (symbol) { return !!getSymbolIfSameReference(symbol, localSymbol); }) : undefined;
                     var diagnostic = exportedSymbol ? error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_exported_as_2, moduleName, declarationName, symbolToString(exportedSymbol)) :
                         error(name, ts.Diagnostics.Module_0_declares_1_locally_but_it_is_not_exported, moduleName, declarationName);
-                    ts.addRelatedInfo.apply(void 0, __spreadArray([diagnostic], ts.map(localSymbol.declarations, function (decl, index) {
-                        return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName);
-                    })));
+                    if (localSymbol.declarations) {
+                        ts.addRelatedInfo.apply(void 0, __spreadArray([diagnostic], ts.map(localSymbol.declarations, function (decl, index) {
+                            return ts.createDiagnosticForNode(decl, index === 0 ? ts.Diagnostics._0_is_declared_here : ts.Diagnostics.and_here, declarationName);
+                        }), false));
+                    }
                 }
             }
             else {
@@ -37707,18 +40312,18 @@ var ts;
         }
         function reportInvalidImportEqualsExportMember(node, name, declarationName, moduleName) {
             if (moduleKind >= ts.ModuleKind.ES2015) {
-                var message = compilerOptions.esModuleInterop ? ts.Diagnostics._0_can_only_be_imported_by_using_a_default_import :
+                var message = ts.getESModuleInterop(compilerOptions) ? ts.Diagnostics._0_can_only_be_imported_by_using_a_default_import :
                     ts.Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;
                 error(name, message, declarationName);
             }
             else {
                 if (ts.isInJSFile(node)) {
-                    var message = compilerOptions.esModuleInterop ? ts.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import :
+                    var message = ts.getESModuleInterop(compilerOptions) ? ts.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_using_a_default_import :
                         ts.Diagnostics._0_can_only_be_imported_by_using_a_require_call_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;
                     error(name, message, declarationName);
                 }
                 else {
-                    var message = compilerOptions.esModuleInterop ? ts.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import :
+                    var message = ts.getESModuleInterop(compilerOptions) ? ts.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import :
                         ts.Diagnostics._0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import;
                     error(name, message, declarationName, declarationName, moduleName);
                 }
@@ -37777,7 +40382,7 @@ var ts;
             return getTargetOfAliasLikeExpression(expression, dontRecursivelyResolve);
         }
         function getTargetOfAccessExpression(node, dontRecursivelyResolve) {
-            if (!(ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 62)) {
+            if (!(ts.isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === 63)) {
                 return undefined;
             }
             return getTargetOfAliasLikeExpression(node.parent.right, dontRecursivelyResolve);
@@ -37785,31 +40390,31 @@ var ts;
         function getTargetOfAliasDeclaration(node, dontRecursivelyResolve) {
             if (dontRecursivelyResolve === void 0) { dontRecursivelyResolve = false; }
             switch (node.kind) {
-                case 260:
-                case 249:
+                case 264:
+                case 253:
                     return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve);
-                case 262:
+                case 266:
                     return getTargetOfImportClause(node, dontRecursivelyResolve);
-                case 263:
+                case 267:
                     return getTargetOfNamespaceImport(node, dontRecursivelyResolve);
-                case 269:
+                case 273:
                     return getTargetOfNamespaceExport(node, dontRecursivelyResolve);
-                case 265:
-                case 198:
+                case 269:
+                case 202:
                     return getTargetOfImportSpecifier(node, dontRecursivelyResolve);
-                case 270:
+                case 274:
                     return getTargetOfExportSpecifier(node, 111551 | 788968 | 1920, dontRecursivelyResolve);
-                case 266:
-                case 216:
+                case 270:
+                case 220:
                     return getTargetOfExportAssignment(node, dontRecursivelyResolve);
-                case 259:
+                case 263:
                     return getTargetOfNamespaceExportDeclaration(node, dontRecursivelyResolve);
-                case 289:
+                case 295:
                     return resolveEntityName(node.name, 111551 | 788968 | 1920, true, dontRecursivelyResolve);
-                case 288:
+                case 294:
                     return getTargetOfPropertyAssignment(node, dontRecursivelyResolve);
-                case 202:
-                case 201:
+                case 206:
+                case 205:
                     return getTargetOfAccessExpression(node, dontRecursivelyResolve);
                 default:
                     return ts.Debug.fail();
@@ -37914,37 +40519,59 @@ var ts;
             }
         }
         function getSymbolOfPartOfRightHandSideOfImportEquals(entityName, dontResolveAlias) {
-            if (entityName.kind === 78 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
+            if (entityName.kind === 79 && ts.isRightSideOfQualifiedNameOrPropertyAccess(entityName)) {
                 entityName = entityName.parent;
             }
-            if (entityName.kind === 78 || entityName.parent.kind === 157) {
+            if (entityName.kind === 79 || entityName.parent.kind === 160) {
                 return resolveEntityName(entityName, 1920, false, dontResolveAlias);
             }
             else {
-                ts.Debug.assert(entityName.parent.kind === 260);
+                ts.Debug.assert(entityName.parent.kind === 264);
                 return resolveEntityName(entityName, 111551 | 788968 | 1920, false, dontResolveAlias);
             }
         }
         function getFullyQualifiedName(symbol, containingLocation) {
             return symbol.parent ? getFullyQualifiedName(symbol.parent, containingLocation) + "." + symbolToString(symbol) : symbolToString(symbol, containingLocation, undefined, 16 | 4);
         }
+        function getContainingQualifiedNameNode(node) {
+            while (ts.isQualifiedName(node.parent)) {
+                node = node.parent;
+            }
+            return node;
+        }
+        function tryGetQualifiedNameAsValue(node) {
+            var left = ts.getFirstIdentifier(node);
+            var symbol = resolveName(left, left.escapedText, 111551, undefined, left, true);
+            if (!symbol) {
+                return undefined;
+            }
+            while (ts.isQualifiedName(left.parent)) {
+                var type = getTypeOfSymbol(symbol);
+                symbol = getPropertyOfType(type, left.parent.right.escapedText);
+                if (!symbol) {
+                    return undefined;
+                }
+                left = left.parent;
+            }
+            return symbol;
+        }
         function resolveEntityName(name, meaning, ignoreErrors, dontResolveAlias, location) {
             if (ts.nodeIsMissing(name)) {
                 return undefined;
             }
             var namespaceMeaning = 1920 | (ts.isInJSFile(name) ? meaning & 111551 : 0);
             var symbol;
-            if (name.kind === 78) {
+            if (name.kind === 79) {
                 var message = meaning === namespaceMeaning || ts.nodeIsSynthesized(name) ? ts.Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(ts.getFirstIdentifier(name));
                 var symbolFromJSPrototype = ts.isInJSFile(name) && !ts.nodeIsSynthesized(name) ? resolveEntityNameFromAssignmentDeclaration(name, meaning) : undefined;
-                symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, true));
+                symbol = getMergedSymbol(resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, true, false));
                 if (!symbol) {
                     return getMergedSymbol(symbolFromJSPrototype);
                 }
             }
-            else if (name.kind === 157 || name.kind === 201) {
-                var left = name.kind === 157 ? name.left : name.expression;
-                var right = name.kind === 157 ? name.right : name.name;
+            else if (name.kind === 160 || name.kind === 205) {
+                var left = name.kind === 160 ? name.left : name.expression;
+                var right = name.kind === 160 ? name.right : name.name;
                 var namespace = resolveEntityName(left, namespaceMeaning, ignoreErrors, false, location);
                 if (!namespace || ts.nodeIsMissing(right)) {
                     return undefined;
@@ -37952,18 +40579,17 @@ var ts;
                 else if (namespace === unknownSymbol) {
                     return namespace;
                 }
-                if (ts.isInJSFile(name)) {
-                    if (namespace.valueDeclaration &&
-                        ts.isVariableDeclaration(namespace.valueDeclaration) &&
-                        namespace.valueDeclaration.initializer &&
-                        isCommonJsRequire(namespace.valueDeclaration.initializer)) {
-                        var moduleName = namespace.valueDeclaration.initializer.arguments[0];
-                        var moduleSym = resolveExternalModuleName(moduleName, moduleName);
-                        if (moduleSym) {
-                            var resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym);
-                            if (resolvedModuleSymbol) {
-                                namespace = resolvedModuleSymbol;
-                            }
+                if (namespace.valueDeclaration &&
+                    ts.isInJSFile(namespace.valueDeclaration) &&
+                    ts.isVariableDeclaration(namespace.valueDeclaration) &&
+                    namespace.valueDeclaration.initializer &&
+                    isCommonJsRequire(namespace.valueDeclaration.initializer)) {
+                    var moduleName = namespace.valueDeclaration.initializer.arguments[0];
+                    var moduleSym = resolveExternalModuleName(moduleName, moduleName);
+                    if (moduleSym) {
+                        var resolvedModuleSymbol = resolveExternalModuleSymbol(moduleSym);
+                        if (resolvedModuleSymbol) {
+                            namespace = resolvedModuleSymbol;
                         }
                     }
                 }
@@ -37972,10 +40598,29 @@ var ts;
                     if (!ignoreErrors) {
                         var namespaceName = getFullyQualifiedName(namespace);
                         var declarationName = ts.declarationNameToString(right);
-                        var suggestion = getSuggestedSymbolForNonexistentModule(right, namespace);
-                        suggestion ?
-                            error(right, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestion)) :
-                            error(right, ts.Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName);
+                        var suggestionForNonexistentModule = getSuggestedSymbolForNonexistentModule(right, namespace);
+                        if (suggestionForNonexistentModule) {
+                            error(right, ts.Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestionForNonexistentModule));
+                            return undefined;
+                        }
+                        var containingQualifiedName = ts.isQualifiedName(name) && getContainingQualifiedNameNode(name);
+                        var canSuggestTypeof = globalObjectType
+                            && (meaning & 788968)
+                            && containingQualifiedName
+                            && !ts.isTypeOfExpression(containingQualifiedName.parent)
+                            && tryGetQualifiedNameAsValue(containingQualifiedName);
+                        if (canSuggestTypeof) {
+                            error(containingQualifiedName, ts.Diagnostics._0_refers_to_a_value_but_is_being_used_as_a_type_here_Did_you_mean_typeof_0, ts.entityNameToString(containingQualifiedName));
+                            return undefined;
+                        }
+                        if (meaning & 1920 && ts.isQualifiedName(name.parent)) {
+                            var exportedTypeSymbol = getMergedSymbol(getSymbol(getExportsOfSymbol(namespace), right.escapedText, 788968));
+                            if (exportedTypeSymbol) {
+                                error(name.parent.right, ts.Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1, symbolToString(exportedTypeSymbol), ts.unescapeLeadingUnderscores(name.parent.right.escapedText));
+                                return undefined;
+                            }
+                        }
+                        error(right, ts.Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName);
                     }
                     return undefined;
                 }
@@ -37984,7 +40629,7 @@ var ts;
                 throw ts.Debug.assertNever(name, "Unknown entity name kind.");
             }
             ts.Debug.assert((ts.getCheckFlags(symbol) & 1) === 0, "Should never get an instantiated symbol here.");
-            if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 || name.parent.kind === 266)) {
+            if (!ts.nodeIsSynthesized(name) && ts.isEntityName(name) && (symbol.flags & 2097152 || name.parent.kind === 270)) {
                 markSymbolOfAliasDeclarationIfTypeOnly(ts.getAliasDeclarationFromName(name), symbol, undefined, true);
             }
             return (symbol.flags & meaning) || dontResolveAlias ? symbol : resolveAlias(symbol);
@@ -38063,6 +40708,7 @@ var ts;
                 : undefined;
         }
         function resolveExternalModule(location, moduleReference, moduleNotFoundError, errorNode, isForAugmentation) {
+            var _a, _b, _c, _d, _e, _f, _g;
             if (isForAugmentation === void 0) { isForAugmentation = false; }
             if (ts.startsWith(moduleReference, "@types/")) {
                 var diag = ts.Diagnostics.Cannot_import_type_declaration_files_Consider_importing_0_instead_of_1;
@@ -38074,7 +40720,16 @@ var ts;
                 return ambientModule;
             }
             var currentSourceFile = ts.getSourceFileOfNode(location);
-            var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference);
+            var contextSpecifier = ts.isStringLiteralLike(location)
+                ? location
+                : ((_a = ts.findAncestor(location, ts.isImportCall)) === null || _a === void 0 ? void 0 : _a.arguments[0]) ||
+                    ((_b = ts.findAncestor(location, ts.isImportDeclaration)) === null || _b === void 0 ? void 0 : _b.moduleSpecifier) ||
+                    ((_c = ts.findAncestor(location, ts.isExternalModuleImportEqualsDeclaration)) === null || _c === void 0 ? void 0 : _c.moduleReference.expression) ||
+                    ((_d = ts.findAncestor(location, ts.isExportDeclaration)) === null || _d === void 0 ? void 0 : _d.moduleSpecifier) ||
+                    ((_e = (ts.isModuleDeclaration(location) ? location : location.parent && ts.isModuleDeclaration(location.parent) && location.parent.name === location ? location.parent : undefined)) === null || _e === void 0 ? void 0 : _e.name) ||
+                    ((_f = (ts.isLiteralImportTypeNode(location) ? location : undefined)) === null || _f === void 0 ? void 0 : _f.argument.literal);
+            var mode = contextSpecifier && ts.isStringLiteralLike(contextSpecifier) ? ts.getModeForUsageLocation(currentSourceFile, contextSpecifier) : currentSourceFile.impliedNodeFormat;
+            var resolvedModule = ts.getResolvedModule(currentSourceFile, moduleReference, mode);
             var resolutionDiagnostic = resolvedModule && ts.getResolutionDiagnostic(compilerOptions, resolvedModule);
             var sourceFile = resolvedModule && !resolutionDiagnostic && host.getSourceFile(resolvedModule.resolvedFileName);
             if (sourceFile) {
@@ -38082,6 +40737,15 @@ var ts;
                     if (resolvedModule.isExternalLibraryImport && !ts.resolutionExtensionIsTSOrJson(resolvedModule.extension)) {
                         errorOnImplicitAnyModule(false, errorNode, resolvedModule, moduleReference);
                     }
+                    if (ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeNext) {
+                        var isSyncImport = (currentSourceFile.impliedNodeFormat === ts.ModuleKind.CommonJS && !ts.findAncestor(location, ts.isImportCall)) || !!ts.findAncestor(location, ts.isImportEqualsDeclaration);
+                        if (isSyncImport && sourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
+                            error(errorNode, ts.Diagnostics.Module_0_cannot_be_imported_using_this_construct_The_specifier_only_resolves_to_an_ES_module_which_cannot_be_imported_synchronously_Use_dynamic_import_instead, moduleReference);
+                        }
+                        if (mode === ts.ModuleKind.ESNext && compilerOptions.resolveJsonModule && resolvedModule.extension === ".json") {
+                            error(errorNode, ts.Diagnostics.JSON_imports_are_experimental_in_ES_module_mode_imports);
+                        }
+                    }
                     return getMergedSymbol(sourceFile.symbol);
                 }
                 if (moduleNotFoundError) {
@@ -38122,22 +40786,38 @@ var ts;
                 }
                 else {
                     var tsExtension = ts.tryExtractTSExtension(moduleReference);
+                    var isExtensionlessRelativePathImport = ts.pathIsRelative(moduleReference) && !ts.hasExtension(moduleReference);
+                    var moduleResolutionKind = ts.getEmitModuleResolutionKind(compilerOptions);
+                    var resolutionIsNode12OrNext = moduleResolutionKind === ts.ModuleResolutionKind.Node12 ||
+                        moduleResolutionKind === ts.ModuleResolutionKind.NodeNext;
                     if (tsExtension) {
                         var diag = ts.Diagnostics.An_import_path_cannot_end_with_a_0_extension_Consider_importing_1_instead;
                         var importSourceWithoutExtension = ts.removeExtension(moduleReference, tsExtension);
                         var replacedImportSource = importSourceWithoutExtension;
-                        var moduleKind_1 = ts.getEmitModuleKind(compilerOptions);
-                        if (moduleKind_1 >= ts.ModuleKind.ES2015) {
-                            replacedImportSource += ".js";
+                        if (moduleKind >= ts.ModuleKind.ES2015) {
+                            replacedImportSource += tsExtension === ".mts" ? ".mjs" : tsExtension === ".cts" ? ".cjs" : ".js";
                         }
                         error(errorNode, diag, tsExtension, replacedImportSource);
                     }
                     else if (!compilerOptions.resolveJsonModule &&
                         ts.fileExtensionIs(moduleReference, ".json") &&
-                        ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs &&
+                        ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic &&
                         ts.hasJsonModuleEmitEnabled(compilerOptions)) {
                         error(errorNode, ts.Diagnostics.Cannot_find_module_0_Consider_using_resolveJsonModule_to_import_module_with_json_extension, moduleReference);
                     }
+                    else if (mode === ts.ModuleKind.ESNext && resolutionIsNode12OrNext && isExtensionlessRelativePathImport) {
+                        var absoluteRef_1 = ts.getNormalizedAbsolutePath(moduleReference, ts.getDirectoryPath(currentSourceFile.path));
+                        var suggestedExt = (_g = suggestedExtensions.find(function (_a) {
+                            var actualExt = _a[0], _importExt = _a[1];
+                            return host.fileExists(absoluteRef_1 + actualExt);
+                        })) === null || _g === void 0 ? void 0 : _g[1];
+                        if (suggestedExt) {
+                            error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Did_you_mean_0, moduleReference + suggestedExt);
+                        }
+                        else {
+                            error(errorNode, ts.Diagnostics.Relative_import_paths_need_explicit_file_extensions_in_EcmaScript_imports_when_moduleResolution_is_node12_or_nodenext_Consider_adding_an_extension_to_the_import_path);
+                        }
+                    }
                     else {
                         error(errorNode, moduleNotFoundError, moduleReference);
                     }
@@ -38150,12 +40830,17 @@ var ts;
             var errorInfo = !ts.isExternalModuleNameRelative(moduleReference) && packageId
                 ? typesPackageExists(packageId.name)
                     ? ts.chainDiagnosticMessages(undefined, ts.Diagnostics.If_the_0_package_actually_exposes_this_module_consider_sending_a_pull_request_to_amend_https_Colon_Slash_Slashgithub_com_SlashDefinitelyTyped_SlashDefinitelyTyped_Slashtree_Slashmaster_Slashtypes_Slash_1, packageId.name, ts.mangleScopedPackageName(packageId.name))
-                    : ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference, ts.mangleScopedPackageName(packageId.name))
+                    : packageBundlesTypes(packageId.name)
+                        ? ts.chainDiagnosticMessages(undefined, ts.Diagnostics.If_the_0_package_actually_exposes_this_module_try_adding_a_new_declaration_d_ts_file_containing_declare_module_1, packageId.name, moduleReference)
+                        : ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference, ts.mangleScopedPackageName(packageId.name))
                 : undefined;
             errorOrSuggestion(isError, errorNode, ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedFileName));
         }
         function typesPackageExists(packageName) {
-            return getPackagesSet().has(ts.getTypesPackageName(packageName));
+            return getPackagesMap().has(ts.getTypesPackageName(packageName));
+        }
+        function packageBundlesTypes(packageName) {
+            return !!getPackagesMap().get(packageName);
         }
         function resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias) {
             if (moduleSymbol === null || moduleSymbol === void 0 ? void 0 : moduleSymbol.exports) {
@@ -38189,46 +40874,54 @@ var ts;
         function resolveESModuleSymbol(moduleSymbol, referencingLocation, dontResolveAlias, suppressInteropError) {
             var symbol = resolveExternalModuleSymbol(moduleSymbol, dontResolveAlias);
             if (!dontResolveAlias && symbol) {
-                if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol, 297)) {
+                if (!suppressInteropError && !(symbol.flags & (1536 | 3)) && !ts.getDeclarationOfKind(symbol, 303)) {
                     var compilerOptionName = moduleKind >= ts.ModuleKind.ES2015
                         ? "allowSyntheticDefaultImports"
                         : "esModuleInterop";
                     error(referencingLocation, ts.Diagnostics.This_module_can_only_be_referenced_with_ECMAScript_imports_Slashexports_by_turning_on_the_0_flag_and_referencing_its_default_export, compilerOptionName);
                     return symbol;
                 }
-                if (compilerOptions.esModuleInterop) {
-                    var referenceParent = referencingLocation.parent;
-                    if ((ts.isImportDeclaration(referenceParent) && ts.getNamespaceDeclarationNode(referenceParent)) ||
-                        ts.isImportCall(referenceParent)) {
-                        var type = getTypeOfSymbol(symbol);
+                var referenceParent = referencingLocation.parent;
+                if ((ts.isImportDeclaration(referenceParent) && ts.getNamespaceDeclarationNode(referenceParent)) ||
+                    ts.isImportCall(referenceParent)) {
+                    var reference = ts.isImportCall(referenceParent) ? referenceParent.arguments[0] : referenceParent.moduleSpecifier;
+                    var type = getTypeOfSymbol(symbol);
+                    var defaultOnlyType = getTypeWithSyntheticDefaultOnly(type, symbol, moduleSymbol, reference);
+                    if (defaultOnlyType) {
+                        return cloneTypeAsModuleType(symbol, defaultOnlyType, referenceParent);
+                    }
+                    if (ts.getESModuleInterop(compilerOptions)) {
                         var sigs = getSignaturesOfStructuredType(type, 0);
                         if (!sigs || !sigs.length) {
                             sigs = getSignaturesOfStructuredType(type, 1);
                         }
-                        if (sigs && sigs.length) {
-                            var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol);
-                            var result = createSymbol(symbol.flags, symbol.escapedName);
-                            result.declarations = symbol.declarations ? symbol.declarations.slice() : [];
-                            result.parent = symbol.parent;
-                            result.target = symbol;
-                            result.originatingImport = referenceParent;
-                            if (symbol.valueDeclaration)
-                                result.valueDeclaration = symbol.valueDeclaration;
-                            if (symbol.constEnumOnlyModule)
-                                result.constEnumOnlyModule = true;
-                            if (symbol.members)
-                                result.members = new ts.Map(symbol.members);
-                            if (symbol.exports)
-                                result.exports = new ts.Map(symbol.exports);
-                            var resolvedModuleType = resolveStructuredTypeMembers(moduleType);
-                            result.type = createAnonymousType(result, resolvedModuleType.members, ts.emptyArray, ts.emptyArray, resolvedModuleType.stringIndexInfo, resolvedModuleType.numberIndexInfo);
-                            return result;
+                        if ((sigs && sigs.length) || getPropertyOfType(type, "default")) {
+                            var moduleType = getTypeWithSyntheticDefaultImportType(type, symbol, moduleSymbol, reference);
+                            return cloneTypeAsModuleType(symbol, moduleType, referenceParent);
                         }
                     }
                 }
             }
             return symbol;
         }
+        function cloneTypeAsModuleType(symbol, moduleType, referenceParent) {
+            var result = createSymbol(symbol.flags, symbol.escapedName);
+            result.declarations = symbol.declarations ? symbol.declarations.slice() : [];
+            result.parent = symbol.parent;
+            result.target = symbol;
+            result.originatingImport = referenceParent;
+            if (symbol.valueDeclaration)
+                result.valueDeclaration = symbol.valueDeclaration;
+            if (symbol.constEnumOnlyModule)
+                result.constEnumOnlyModule = true;
+            if (symbol.members)
+                result.members = new ts.Map(symbol.members);
+            if (symbol.exports)
+                result.exports = new ts.Map(symbol.exports);
+            var resolvedModuleType = resolveStructuredTypeMembers(moduleType);
+            result.type = createAnonymousType(result, resolvedModuleType.members, ts.emptyArray, ts.emptyArray, resolvedModuleType.indexInfos);
+            return result;
+        }
         function hasExportAssignmentSymbol(moduleSymbol) {
             return moduleSymbol.exports.get("export=") !== undefined;
         }
@@ -38239,10 +40932,30 @@ var ts;
             var exports = getExportsOfModuleAsArray(moduleSymbol);
             var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
             if (exportEquals !== moduleSymbol) {
-                ts.addRange(exports, getPropertiesOfType(getTypeOfSymbol(exportEquals)));
+                var type = getTypeOfSymbol(exportEquals);
+                if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
+                    ts.addRange(exports, getPropertiesOfType(type));
+                }
             }
             return exports;
         }
+        function forEachExportAndPropertyOfModule(moduleSymbol, cb) {
+            var exports = getExportsOfModule(moduleSymbol);
+            exports.forEach(function (symbol, key) {
+                if (!isReservedMemberName(key)) {
+                    cb(symbol, key);
+                }
+            });
+            var exportEquals = resolveExternalModuleSymbol(moduleSymbol);
+            if (exportEquals !== moduleSymbol) {
+                var type = getTypeOfSymbol(exportEquals);
+                if (shouldTreatPropertiesOfExternalModuleAsExports(type)) {
+                    forEachPropertyOfType(type, function (symbol, escapedName) {
+                        cb(symbol, escapedName);
+                    });
+                }
+            }
+        }
         function tryGetMemberInModuleExports(memberName, moduleSymbol) {
             var symbolTable = getExportsOfModule(moduleSymbol);
             if (symbolTable) {
@@ -38259,11 +40972,13 @@ var ts;
                 return undefined;
             }
             var type = getTypeOfSymbol(exportEquals);
-            return type.flags & 131068 ||
-                ts.getObjectFlags(type) & 1 ||
-                isArrayOrTupleLikeType(type)
-                ? undefined
-                : getPropertyOfType(type, memberName);
+            return shouldTreatPropertiesOfExternalModuleAsExports(type) ? getPropertyOfType(type, memberName) : undefined;
+        }
+        function shouldTreatPropertiesOfExternalModuleAsExports(resolvedExternalModuleType) {
+            return !(resolvedExternalModuleType.flags & 131068 ||
+                ts.getObjectFlags(resolvedExternalModuleType) & 1 ||
+                isArrayType(resolvedExternalModuleType) ||
+                isTupleType(resolvedExternalModuleType));
         }
         function getExportsOfSymbol(symbol) {
             return symbol.flags & 6256 ? getResolvedMembersOrExportsOfSymbol(symbol, "resolvedExports") :
@@ -38313,11 +41028,13 @@ var ts;
                 if (exportStars) {
                     var nestedSymbols = ts.createSymbolTable();
                     var lookupTable_1 = new ts.Map();
-                    for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
-                        var node = _a[_i];
-                        var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
-                        var exportedSymbols = visit(resolvedModule);
-                        extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
+                    if (exportStars.declarations) {
+                        for (var _i = 0, _a = exportStars.declarations; _i < _a.length; _i++) {
+                            var node = _a[_i];
+                            var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
+                            var exportedSymbols = visit(resolvedModule);
+                            extendExportSymbols(nestedSymbols, exportedSymbols, lookupTable_1, node);
+                        }
                     }
                     lookupTable_1.forEach(function (_a, id) {
                         var exportsWithDuplicate = _a.exportsWithDuplicate;
@@ -38392,17 +41109,32 @@ var ts;
                 var additionalContainers = ts.mapDefined(container.declarations, fileSymbolIfFileSymbolExportEqualsContainer);
                 var reexportContainers = enclosingDeclaration && getAlternativeContainingModules(symbol, enclosingDeclaration);
                 var objectLiteralContainer = getVariableDeclarationOfObjectLiteral(container, meaning);
-                if (enclosingDeclaration && getAccessibleSymbolChain(container, enclosingDeclaration, 1920, false)) {
+                if (enclosingDeclaration &&
+                    container.flags & getQualifiedLeftMeaning(meaning) &&
+                    getAccessibleSymbolChain(container, enclosingDeclaration, 1920, false)) {
                     return ts.append(ts.concatenate(ts.concatenate([container], additionalContainers), reexportContainers), objectLiteralContainer);
                 }
-                var res = ts.append(ts.append(additionalContainers, container), objectLiteralContainer);
-                return ts.concatenate(res, reexportContainers);
+                var firstVariableMatch = !(container.flags & getQualifiedLeftMeaning(meaning))
+                    && container.flags & 788968
+                    && getDeclaredTypeOfSymbol(container).flags & 524288
+                    && meaning === 111551
+                    ? forEachSymbolTableInScope(enclosingDeclaration, function (t) {
+                        return ts.forEachEntry(t, function (s) {
+                            if (s.flags & getQualifiedLeftMeaning(meaning) && getTypeOfSymbol(s) === getDeclaredTypeOfSymbol(container)) {
+                                return s;
+                            }
+                        });
+                    }) : undefined;
+                var res = firstVariableMatch ? __spreadArray(__spreadArray([firstVariableMatch], additionalContainers, true), [container], false) : __spreadArray(__spreadArray([], additionalContainers, true), [container], false);
+                res = ts.append(res, objectLiteralContainer);
+                res = ts.addRange(res, reexportContainers);
+                return res;
             }
             var candidates = ts.mapDefined(symbol.declarations, function (d) {
                 if (!ts.isAmbientModule(d) && d.parent && hasNonGlobalAugmentationExternalModuleSymbol(d.parent)) {
                     return getSymbolOfNode(d.parent);
                 }
-                if (ts.isClassExpression(d) && ts.isBinaryExpression(d.parent) && d.parent.operatorToken.kind === 62 && ts.isAccessExpression(d.parent.left) && ts.isEntityNameExpression(d.parent.left.expression)) {
+                if (ts.isClassExpression(d) && ts.isBinaryExpression(d.parent) && d.parent.operatorToken.kind === 63 && ts.isAccessExpression(d.parent.left) && ts.isEntityNameExpression(d.parent.left.expression)) {
                     if (ts.isModuleExportsAccessExpression(d.parent.left) || ts.isExportsIdentifier(d.parent.left.expression)) {
                         return getSymbolOfNode(ts.getSourceFileOfNode(d));
                     }
@@ -38465,7 +41197,7 @@ var ts;
             var members = node.members;
             for (var _i = 0, members_3 = members; _i < members_3.length; _i++) {
                 var member = members_3[_i];
-                if (member.kind === 166 && ts.nodeIsPresent(member.body)) {
+                if (member.kind === 170 && ts.nodeIsPresent(member.body)) {
                     return member;
                 }
             }
@@ -38474,7 +41206,9 @@ var ts;
             var result = new Type(checker, flags);
             typeCount++;
             result.id = typeCount;
-            typeCatalog.push(result);
+            if (produceDiagnostics) {
+                ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.recordType(result);
+            }
             return result;
         }
         function createOriginType(flags) {
@@ -38487,12 +41221,6 @@ var ts;
             type.objectFlags = objectFlags;
             return type;
         }
-        function createBooleanType(trueFalseTypes) {
-            var type = getUnionType(trueFalseTypes);
-            type.flags |= 16;
-            type.intrinsicName = "boolean";
-            return type;
-        }
         function createObjectType(objectFlags, symbol) {
             var type = createType(524288);
             type.objectFlags = objectFlags;
@@ -38501,12 +41229,11 @@ var ts;
             type.properties = undefined;
             type.callSignatures = undefined;
             type.constructSignatures = undefined;
-            type.stringIndexInfo = undefined;
-            type.numberIndexInfo = undefined;
+            type.indexInfos = undefined;
             return type;
         }
         function createTypeofType() {
-            return getUnionType(ts.arrayFrom(typeofEQFacts.keys(), getLiteralType));
+            return getUnionType(ts.arrayFrom(typeofEQFacts.keys(), getStringLiteralType));
         }
         function createTypeParameter(symbol) {
             var type = createType(262144);
@@ -38524,26 +41251,33 @@ var ts;
         function getNamedMembers(members) {
             var result;
             members.forEach(function (symbol, id) {
-                if (!isReservedMemberName(id) && symbolIsValue(symbol)) {
+                if (isNamedMember(symbol, id)) {
                     (result || (result = [])).push(symbol);
                 }
             });
             return result || ts.emptyArray;
         }
-        function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
+        function isNamedMember(member, escapedName) {
+            return !isReservedMemberName(escapedName) && symbolIsValue(member);
+        }
+        function getNamedOrIndexSignatureMembers(members) {
+            var result = getNamedMembers(members);
+            var index = getIndexSymbolFromSymbolTable(members);
+            return index ? ts.concatenate(result, [index]) : result;
+        }
+        function setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos) {
             var resolved = type;
             resolved.members = members;
             resolved.properties = ts.emptyArray;
             resolved.callSignatures = callSignatures;
             resolved.constructSignatures = constructSignatures;
-            resolved.stringIndexInfo = stringIndexInfo;
-            resolved.numberIndexInfo = numberIndexInfo;
+            resolved.indexInfos = indexInfos;
             if (members !== emptySymbols)
                 resolved.properties = getNamedMembers(members);
             return resolved;
         }
-        function createAnonymousType(symbol, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo) {
-            return setStructuredTypeMembers(createObjectType(16, symbol), members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
+        function createAnonymousType(symbol, members, callSignatures, constructSignatures, indexInfos) {
+            return setStructuredTypeMembers(createObjectType(16, symbol), members, callSignatures, constructSignatures, indexInfos);
         }
         function getResolvedTypeWithoutAbstractConstructSignatures(type) {
             if (type.constructSignatures.length === 0)
@@ -38553,7 +41287,7 @@ var ts;
             var constructSignatures = ts.filter(type.constructSignatures, function (signature) { return !(signature.flags & 4); });
             if (type.constructSignatures === constructSignatures)
                 return type;
-            var typeCopy = createAnonymousType(type.symbol, type.members, type.callSignatures, ts.some(constructSignatures) ? constructSignatures : ts.emptyArray, type.stringIndexInfo, type.numberIndexInfo);
+            var typeCopy = createAnonymousType(type.symbol, type.members, type.callSignatures, ts.some(constructSignatures) ? constructSignatures : ts.emptyArray, type.indexInfos);
             type.objectTypeWithoutAbstractConstructSignatures = typeCopy;
             typeCopy.objectTypeWithoutAbstractConstructSignatures = typeCopy;
             return typeCopy;
@@ -38562,31 +41296,31 @@ var ts;
             var result;
             var _loop_8 = function (location) {
                 if (location.locals && !isGlobalSourceFile(location)) {
-                    if (result = callback(location.locals)) {
+                    if (result = callback(location.locals, undefined, true, location)) {
                         return { value: result };
                     }
                 }
                 switch (location.kind) {
-                    case 297:
+                    case 303:
                         if (!ts.isExternalOrCommonJsModule(location)) {
                             break;
                         }
-                    case 256:
+                    case 260:
                         var sym = getSymbolOfNode(location);
-                        if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols)) {
+                        if (result = callback((sym === null || sym === void 0 ? void 0 : sym.exports) || emptySymbols, undefined, true, location)) {
                             return { value: result };
                         }
                         break;
-                    case 252:
-                    case 221:
-                    case 253:
+                    case 256:
+                    case 225:
+                    case 257:
                         var table_1;
                         (getSymbolOfNode(location).members || emptySymbols).forEach(function (memberSymbol, key) {
                             if (memberSymbol.flags & (788968 & ~67108864)) {
                                 (table_1 || (table_1 = ts.createSymbolTable())).set(key, memberSymbol);
                             }
                         });
-                        if (table_1 && (result = callback(table_1))) {
+                        if (table_1 && (result = callback(table_1, undefined, false, location))) {
                             return { value: result };
                         }
                         break;
@@ -38597,7 +41331,7 @@ var ts;
                 if (typeof state_2 === "object")
                     return state_2.value;
             }
-            return callback(globals);
+            return callback(globals, undefined, true);
         }
         function getQualifiedLeftMeaning(rightMeaning) {
             return rightMeaning === 111551 ? 111551 : 1920;
@@ -38607,17 +41341,26 @@ var ts;
             if (!(symbol && !isPropertyOrMethodDeclarationSymbol(symbol))) {
                 return undefined;
             }
+            var links = getSymbolLinks(symbol);
+            var cache = (links.accessibleChainCache || (links.accessibleChainCache = new ts.Map()));
+            var firstRelevantLocation = forEachSymbolTableInScope(enclosingDeclaration, function (_, __, ___, node) { return node; });
+            var key = "".concat(useOnlyExternalAliasing ? 0 : 1, "|").concat(firstRelevantLocation && getNodeId(firstRelevantLocation), "|").concat(meaning);
+            if (cache.has(key)) {
+                return cache.get(key);
+            }
             var id = getSymbolId(symbol);
             var visitedSymbolTables = visitedSymbolTablesMap.get(id);
             if (!visitedSymbolTables) {
                 visitedSymbolTablesMap.set(id, visitedSymbolTables = []);
             }
-            return forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);
-            function getAccessibleSymbolChainFromSymbolTable(symbols, ignoreQualification) {
+            var result = forEachSymbolTableInScope(enclosingDeclaration, getAccessibleSymbolChainFromSymbolTable);
+            cache.set(key, result);
+            return result;
+            function getAccessibleSymbolChainFromSymbolTable(symbols, ignoreQualification, isLocalNameLookup) {
                 if (!ts.pushIfUnique(visitedSymbolTables, symbols)) {
                     return undefined;
                 }
-                var result = trySymbolTable(symbols, ignoreQualification);
+                var result = trySymbolTable(symbols, ignoreQualification, isLocalNameLookup);
                 visitedSymbolTables.pop();
                 return result;
             }
@@ -38630,7 +41373,7 @@ var ts;
                     !ts.some(symbolFromSymbolTable.declarations, hasNonGlobalAugmentationExternalModuleSymbol) &&
                     (ignoreQualification || canQualifySymbol(getMergedSymbol(symbolFromSymbolTable), meaning));
             }
-            function trySymbolTable(symbols, ignoreQualification) {
+            function trySymbolTable(symbols, ignoreQualification, isLocalNameLookup) {
                 if (isAccessible(symbols.get(symbol.escapedName), undefined, ignoreQualification)) {
                     return [symbol];
                 }
@@ -38640,7 +41383,8 @@ var ts;
                         && symbolFromSymbolTable.escapedName !== "default"
                         && !(ts.isUMDExportSymbol(symbolFromSymbolTable) && enclosingDeclaration && ts.isExternalModule(ts.getSourceFileOfNode(enclosingDeclaration)))
                         && (!useOnlyExternalAliasing || ts.some(symbolFromSymbolTable.declarations, ts.isExternalModuleImportEqualsDeclaration))
-                        && (ignoreQualification || !ts.getDeclarationOfKind(symbolFromSymbolTable, 270))) {
+                        && (isLocalNameLookup ? !ts.some(symbolFromSymbolTable.declarations, ts.isNamespaceReexportDeclaration) : true)
+                        && (ignoreQualification || !ts.getDeclarationOfKind(symbolFromSymbolTable, 274))) {
                         var resolvedImportedSymbol = resolveAlias(symbolFromSymbolTable);
                         var candidate = getCandidateListForSymbol(symbolFromSymbolTable, resolvedImportedSymbol, ignoreQualification);
                         if (candidate) {
@@ -38676,7 +41420,7 @@ var ts;
                 if (symbolFromSymbolTable === symbol) {
                     return true;
                 }
-                symbolFromSymbolTable = (symbolFromSymbolTable.flags & 2097152 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 270)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
+                symbolFromSymbolTable = (symbolFromSymbolTable.flags & 2097152 && !ts.getDeclarationOfKind(symbolFromSymbolTable, 274)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
                 if (symbolFromSymbolTable.flags & meaning) {
                     qualify = true;
                     return true;
@@ -38690,10 +41434,10 @@ var ts;
                 for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
                     var declaration = _a[_i];
                     switch (declaration.kind) {
-                        case 163:
-                        case 165:
-                        case 167:
+                        case 166:
                         case 168:
+                        case 171:
+                        case 172:
                             continue;
                         default:
                             return false;
@@ -38730,7 +41474,7 @@ var ts;
                         return hasAccessibleDeclarations;
                     }
                 }
-                else if (allowModules) {
+                if (allowModules) {
                     if (ts.some(symbol.declarations, hasNonGlobalAugmentationExternalModuleSymbol)) {
                         if (shouldComputeAliasesToMakeVisible) {
                             earlyModuleBail = true;
@@ -38793,14 +41537,14 @@ var ts;
             return node && getSymbolOfNode(node);
         }
         function hasExternalModuleSymbol(declaration) {
-            return ts.isAmbientModule(declaration) || (declaration.kind === 297 && ts.isExternalOrCommonJsModule(declaration));
+            return ts.isAmbientModule(declaration) || (declaration.kind === 303 && ts.isExternalOrCommonJsModule(declaration));
         }
         function hasNonGlobalAugmentationExternalModuleSymbol(declaration) {
-            return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 297 && ts.isExternalOrCommonJsModule(declaration));
+            return ts.isModuleWithStringLiteralName(declaration) || (declaration.kind === 303 && ts.isExternalOrCommonJsModule(declaration));
         }
         function hasVisibleDeclarations(symbol, shouldComputeAliasToMakeVisible) {
             var aliasesToMakeVisible;
-            if (!ts.every(ts.filter(symbol.declarations, function (d) { return d.kind !== 78; }), getIsDeclarationVisible)) {
+            if (!ts.every(ts.filter(symbol.declarations, function (d) { return d.kind !== 79; }), getIsDeclarationVisible)) {
                 return undefined;
             }
             return { accessibility: 0, aliasesToMakeVisible: aliasesToMakeVisible };
@@ -38845,13 +41589,13 @@ var ts;
         }
         function isEntityNameVisible(entityName, enclosingDeclaration) {
             var meaning;
-            if (entityName.parent.kind === 176 ||
+            if (entityName.parent.kind === 180 ||
                 ts.isExpressionWithTypeArgumentsInClassExtendsClause(entityName.parent) ||
-                entityName.parent.kind === 158) {
+                entityName.parent.kind === 161) {
                 meaning = 111551 | 1048576;
             }
-            else if (entityName.kind === 157 || entityName.kind === 201 ||
-                entityName.parent.kind === 260) {
+            else if (entityName.kind === 160 || entityName.kind === 205 ||
+                entityName.parent.kind === 264) {
                 meaning = 1920;
             }
             else {
@@ -38887,7 +41631,7 @@ var ts;
             return writer ? symbolToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(symbolToStringWorker);
             function symbolToStringWorker(writer) {
                 var entity = builder(symbol, meaning, enclosingDeclaration, nodeFlags);
-                var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 297 ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
+                var printer = (enclosingDeclaration === null || enclosingDeclaration === void 0 ? void 0 : enclosingDeclaration.kind) === 303 ? ts.createPrinter({ removeComments: true, neverAsciiEscape: true }) : ts.createPrinter({ removeComments: true });
                 var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
                 printer.writeNode(4, entity, sourceFile, writer);
                 return writer;
@@ -38899,10 +41643,10 @@ var ts;
             function signatureToStringWorker(writer) {
                 var sigOutput;
                 if (flags & 262144) {
-                    sigOutput = kind === 1 ? 175 : 174;
+                    sigOutput = kind === 1 ? 179 : 178;
                 }
                 else {
-                    sigOutput = kind === 1 ? 170 : 169;
+                    sigOutput = kind === 1 ? 174 : 173;
                 }
                 var sig = nodeBuilder.signatureToSignatureDeclaration(signature, sigOutput, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 | 512);
                 var printer = ts.createPrinter({ removeComments: true, omitTrailingSemicolon: true });
@@ -38918,7 +41662,7 @@ var ts;
             var typeNode = nodeBuilder.typeToTypeNode(type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 | (noTruncation ? 1 : 0), writer);
             if (typeNode === undefined)
                 return ts.Debug.fail("should always get typenode");
-            var options = { removeComments: true };
+            var options = { removeComments: type !== unresolvedType };
             var printer = ts.createPrinter(options);
             var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
             printer.writeNode(4, typeNode, sourceFile, writer);
@@ -38942,22 +41686,22 @@ var ts;
             return typeToString(type, undefined, 64);
         }
         function symbolValueDeclarationIsContextSensitive(symbol) {
-            return symbol && symbol.valueDeclaration && ts.isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
+            return symbol && !!symbol.valueDeclaration && ts.isExpression(symbol.valueDeclaration) && !isContextSensitive(symbol.valueDeclaration);
         }
         function toNodeBuilderFlags(flags) {
             if (flags === void 0) { flags = 0; }
             return flags & 814775659;
         }
         function isClassInstanceSide(type) {
-            return !!type.symbol && !!(type.symbol.flags & 32) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(ts.getObjectFlags(type) & 1073741824));
+            return !!type.symbol && !!(type.symbol.flags & 32) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || (!!(type.flags & 524288) && !!(ts.getObjectFlags(type) & 16777216)));
         }
         function createNodeBuilder() {
             return {
                 typeToTypeNode: function (type, enclosingDeclaration, flags, tracker) {
                     return withContext(enclosingDeclaration, flags, tracker, function (context) { return typeToTypeNodeHelper(type, context); });
                 },
-                indexInfoToIndexSignatureDeclaration: function (indexInfo, kind, enclosingDeclaration, flags, tracker) {
-                    return withContext(enclosingDeclaration, flags, tracker, function (context) { return indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context, undefined); });
+                indexInfoToIndexSignatureDeclaration: function (indexInfo, enclosingDeclaration, flags, tracker) {
+                    return withContext(enclosingDeclaration, flags, tracker, function (context) { return indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, undefined); });
                 },
                 signatureToSignatureDeclaration: function (signature, kind, enclosingDeclaration, flags, tracker) {
                     return withContext(enclosingDeclaration, flags, tracker, function (context) { return signatureToSignatureDeclarationHelper(signature, kind, context); });
@@ -38987,9 +41731,8 @@ var ts;
                 var context = {
                     enclosingDeclaration: enclosingDeclaration,
                     flags: flags || 0,
-                    tracker: tracker && tracker.trackSymbol ? tracker : { trackSymbol: ts.noop, moduleResolverHost: flags & 134217728 ? {
+                    tracker: tracker && tracker.trackSymbol ? tracker : { trackSymbol: function () { return false; }, moduleResolverHost: flags & 134217728 ? {
                             getCommonSourceDirectory: !!host.getCommonSourceDirectory ? function () { return host.getCommonSourceDirectory(); } : function () { return ""; },
-                            getSourceFiles: function () { return host.getSourceFiles(); },
                             getCurrentDirectory: function () { return host.getCurrentDirectory(); },
                             getSymlinkCache: ts.maybeBind(host, host.getSymlinkCache),
                             useCaseSensitiveFileNames: ts.maybeBind(host, host.useCaseSensitiveFileNames),
@@ -38998,19 +41741,49 @@ var ts;
                             isSourceOfProjectReferenceRedirect: function (fileName) { return host.isSourceOfProjectReferenceRedirect(fileName); },
                             fileExists: function (fileName) { return host.fileExists(fileName); },
                             getFileIncludeReasons: function () { return host.getFileIncludeReasons(); },
+                            readFile: host.readFile ? (function (fileName) { return host.readFile(fileName); }) : undefined,
                         } : undefined },
                     encounteredError: false,
+                    reportedDiagnostic: false,
                     visitedTypes: undefined,
                     symbolDepth: undefined,
                     inferTypeParameters: undefined,
                     approximateLength: 0
                 };
+                context.tracker = wrapSymbolTrackerToReportForContext(context, context.tracker);
                 var resultingNode = cb(context);
                 if (context.truncating && context.flags & 1) {
                     (_b = (_a = context.tracker) === null || _a === void 0 ? void 0 : _a.reportTruncationError) === null || _b === void 0 ? void 0 : _b.call(_a);
                 }
                 return context.encounteredError ? undefined : resultingNode;
             }
+            function wrapSymbolTrackerToReportForContext(context, tracker) {
+                var oldTrackSymbol = tracker.trackSymbol;
+                return __assign(__assign({}, tracker), { reportCyclicStructureError: wrapReportedDiagnostic(tracker.reportCyclicStructureError), reportInaccessibleThisError: wrapReportedDiagnostic(tracker.reportInaccessibleThisError), reportInaccessibleUniqueSymbolError: wrapReportedDiagnostic(tracker.reportInaccessibleUniqueSymbolError), reportLikelyUnsafeImportRequiredError: wrapReportedDiagnostic(tracker.reportLikelyUnsafeImportRequiredError), reportNonlocalAugmentation: wrapReportedDiagnostic(tracker.reportNonlocalAugmentation), reportPrivateInBaseOfClassExpression: wrapReportedDiagnostic(tracker.reportPrivateInBaseOfClassExpression), reportNonSerializableProperty: wrapReportedDiagnostic(tracker.reportNonSerializableProperty), trackSymbol: oldTrackSymbol && (function () {
+                        var args = [];
+                        for (var _i = 0; _i < arguments.length; _i++) {
+                            args[_i] = arguments[_i];
+                        }
+                        var result = oldTrackSymbol.apply(void 0, args);
+                        if (result) {
+                            context.reportedDiagnostic = true;
+                        }
+                        return result;
+                    }) });
+                function wrapReportedDiagnostic(method) {
+                    if (!method) {
+                        return method;
+                    }
+                    return (function () {
+                        var args = [];
+                        for (var _i = 0; _i < arguments.length; _i++) {
+                            args[_i] = arguments[_i];
+                        }
+                        context.reportedDiagnostic = true;
+                        return method.apply(void 0, args);
+                    });
+                }
+            }
             function checkTruncationLength(context) {
                 if (context.truncating)
                     return context.truncating;
@@ -39028,33 +41801,39 @@ var ts;
                         return undefined;
                     }
                     context.approximateLength += 3;
-                    return ts.factory.createKeywordTypeNode(128);
+                    return ts.factory.createKeywordTypeNode(130);
                 }
                 if (!(context.flags & 536870912)) {
                     type = getReducedType(type);
                 }
                 if (type.flags & 1) {
+                    if (type.aliasSymbol) {
+                        return ts.factory.createTypeReferenceNode(symbolToEntityNameNode(type.aliasSymbol), mapToTypeNodes(type.aliasTypeArguments, context));
+                    }
+                    if (type === unresolvedType) {
+                        return ts.addSyntheticLeadingComment(ts.factory.createKeywordTypeNode(130), 3, "unresolved");
+                    }
                     context.approximateLength += 3;
-                    return ts.factory.createKeywordTypeNode(type === intrinsicMarkerType ? 136 : 128);
+                    return ts.factory.createKeywordTypeNode(type === intrinsicMarkerType ? 138 : 130);
                 }
                 if (type.flags & 2) {
-                    return ts.factory.createKeywordTypeNode(152);
+                    return ts.factory.createKeywordTypeNode(154);
                 }
                 if (type.flags & 4) {
                     context.approximateLength += 6;
-                    return ts.factory.createKeywordTypeNode(147);
+                    return ts.factory.createKeywordTypeNode(149);
                 }
                 if (type.flags & 8) {
                     context.approximateLength += 6;
-                    return ts.factory.createKeywordTypeNode(144);
+                    return ts.factory.createKeywordTypeNode(146);
                 }
                 if (type.flags & 64) {
                     context.approximateLength += 6;
-                    return ts.factory.createKeywordTypeNode(155);
+                    return ts.factory.createKeywordTypeNode(157);
                 }
-                if (type.flags & 16) {
+                if (type.flags & 16 && !type.aliasSymbol) {
                     context.approximateLength += 7;
-                    return ts.factory.createKeywordTypeNode(131);
+                    return ts.factory.createKeywordTypeNode(133);
                 }
                 if (type.flags & 1024 && !(type.flags & 1048576)) {
                     var parentSymbol = getParentOfSymbol(type.symbol);
@@ -39108,15 +41887,15 @@ var ts;
                         }
                     }
                     context.approximateLength += 13;
-                    return ts.factory.createTypeOperatorNode(151, ts.factory.createKeywordTypeNode(148));
+                    return ts.factory.createTypeOperatorNode(153, ts.factory.createKeywordTypeNode(150));
                 }
                 if (type.flags & 16384) {
                     context.approximateLength += 4;
-                    return ts.factory.createKeywordTypeNode(113);
+                    return ts.factory.createKeywordTypeNode(114);
                 }
                 if (type.flags & 32768) {
                     context.approximateLength += 9;
-                    return ts.factory.createKeywordTypeNode(150);
+                    return ts.factory.createKeywordTypeNode(152);
                 }
                 if (type.flags & 65536) {
                     context.approximateLength += 4;
@@ -39124,15 +41903,15 @@ var ts;
                 }
                 if (type.flags & 131072) {
                     context.approximateLength += 5;
-                    return ts.factory.createKeywordTypeNode(141);
+                    return ts.factory.createKeywordTypeNode(143);
                 }
                 if (type.flags & 4096) {
                     context.approximateLength += 6;
-                    return ts.factory.createKeywordTypeNode(148);
+                    return ts.factory.createKeywordTypeNode(150);
                 }
                 if (type.flags & 67108864) {
                     context.approximateLength += 6;
-                    return ts.factory.createKeywordTypeNode(145);
+                    return ts.factory.createKeywordTypeNode(147);
                 }
                 if (isThisTypeParameter(type)) {
                     if (context.flags & 4194304) {
@@ -39200,7 +41979,7 @@ var ts;
                     var indexedType = type.type;
                     context.approximateLength += 6;
                     var indexTypeNode = typeToTypeNodeHelper(indexedType, context);
-                    return ts.factory.createTypeOperatorNode(138, indexTypeNode);
+                    return ts.factory.createTypeOperatorNode(140, indexTypeNode);
                 }
                 if (type.flags & 134217728) {
                     var texts_1 = type.texts;
@@ -39221,6 +42000,13 @@ var ts;
                     return ts.factory.createIndexedAccessTypeNode(objectTypeNode, indexTypeNode);
                 }
                 if (type.flags & 16777216) {
+                    return visitAndTransformType(type, function (type) { return conditionalTypeToTypeNode(type); });
+                }
+                if (type.flags & 33554432) {
+                    return typeToTypeNodeHelper(type.baseType, context);
+                }
+                return ts.Debug.fail("Should be unreachable.");
+                function conditionalTypeToTypeNode(type) {
                     var checkTypeNode = typeToTypeNodeHelper(type.checkType, context);
                     var saveInferTypeParameters = context.inferTypeParameters;
                     context.inferTypeParameters = type.root.inferTypeParameters;
@@ -39231,10 +42017,6 @@ var ts;
                     context.approximateLength += 15;
                     return ts.factory.createConditionalTypeNode(checkTypeNode, extendsTypeNode, trueTypeNode, falseTypeNode);
                 }
-                if (type.flags & 33554432) {
-                    return typeToTypeNodeHelper(type.baseType, context);
-                }
-                return ts.Debug.fail("Should be unreachable.");
                 function typeToTypeNodeOrCircularityElision(type) {
                     var _a, _b, _c;
                     if (type.flags & 1048576) {
@@ -39255,15 +42037,15 @@ var ts;
                     var questionToken = type.declaration.questionToken ? ts.factory.createToken(type.declaration.questionToken.kind) : undefined;
                     var appropriateConstraintTypeNode;
                     if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
-                        appropriateConstraintTypeNode = ts.factory.createTypeOperatorNode(138, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context));
+                        appropriateConstraintTypeNode = ts.factory.createTypeOperatorNode(140, typeToTypeNodeHelper(getModifiersTypeFromMappedType(type), context));
                     }
                     else {
                         appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context);
                     }
                     var typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type), context, appropriateConstraintTypeNode);
                     var nameTypeNode = type.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type), context) : undefined;
-                    var templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context);
-                    var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode);
+                    var templateTypeNode = typeToTypeNodeHelper(removeMissingType(getTemplateTypeFromMappedType(type), !!(getMappedTypeModifiers(type) & 4)), context);
+                    var mappedTypeNode = ts.factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode, undefined);
                     context.approximateLength += 10;
                     return ts.setEmitFlags(mappedTypeNode, 1);
                 }
@@ -39276,7 +42058,9 @@ var ts;
                         if (isJSConstructor(symbol.valueDeclaration)) {
                             return symbolToTypeNode(symbol, context, isInstanceType);
                         }
-                        else if (symbol.flags & 32 && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration.kind === 221 && context.flags & 2048) ||
+                        else if (symbol.flags & 32
+                            && !getBaseTypeVariableOfClass(symbol)
+                            && !(symbol.valueDeclaration && symbol.valueDeclaration.kind === 225 && context.flags & 2048) ||
                             symbol.flags & (384 | 512) ||
                             shouldWriteTypeOfFunctionSymbol()) {
                             return symbolToTypeNode(symbol, context, isInstanceType);
@@ -39300,11 +42084,11 @@ var ts;
                     function shouldWriteTypeOfFunctionSymbol() {
                         var _a;
                         var isStaticMethodSymbol = !!(symbol.flags & 8192) &&
-                            ts.some(symbol.declarations, function (declaration) { return ts.hasSyntacticModifier(declaration, 32); });
+                            ts.some(symbol.declarations, function (declaration) { return ts.isStatic(declaration); });
                         var isNonLocalFunctionSymbol = !!(symbol.flags & 16) &&
                             (symbol.parent ||
                                 ts.forEach(symbol.declarations, function (declaration) {
-                                    return declaration.parent.kind === 297 || declaration.parent.kind === 257;
+                                    return declaration.parent.kind === 303 || declaration.parent.kind === 261;
                                 }));
                         if (isStaticMethodSymbol || isNonLocalFunctionSymbol) {
                             return (!!(context.flags & 4096) || ((_a = context.visitedTypes) === null || _a === void 0 ? void 0 : _a.has(typeId))) &&
@@ -39313,17 +42097,32 @@ var ts;
                     }
                 }
                 function visitAndTransformType(type, transform) {
+                    var _a, _b;
                     var typeId = type.id;
                     var isConstructorObject = ts.getObjectFlags(type) & 16 && type.symbol && type.symbol.flags & 32;
                     var id = ts.getObjectFlags(type) & 4 && type.node ? "N" + getNodeId(type.node) :
-                        type.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type.symbol) :
-                            undefined;
+                        type.flags & 16777216 ? "N" + getNodeId(type.root.node) :
+                            type.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type.symbol) :
+                                undefined;
                     if (!context.visitedTypes) {
                         context.visitedTypes = new ts.Set();
                     }
                     if (id && !context.symbolDepth) {
                         context.symbolDepth = new ts.Map();
                     }
+                    var links = context.enclosingDeclaration && getNodeLinks(context.enclosingDeclaration);
+                    var key = "".concat(getTypeId(type), "|").concat(context.flags);
+                    if (links) {
+                        links.serializedTypes || (links.serializedTypes = new ts.Map());
+                    }
+                    var cachedResult = (_a = links === null || links === void 0 ? void 0 : links.serializedTypes) === null || _a === void 0 ? void 0 : _a.get(key);
+                    if (cachedResult) {
+                        if (cachedResult.truncating) {
+                            context.truncating = true;
+                        }
+                        context.approximateLength += cachedResult.addedLength;
+                        return deepCloneOrReuseNode(cachedResult);
+                    }
                     var depth;
                     if (id) {
                         depth = context.symbolDepth.get(id) || 0;
@@ -39333,31 +42132,46 @@ var ts;
                         context.symbolDepth.set(id, depth + 1);
                     }
                     context.visitedTypes.add(typeId);
+                    var startLength = context.approximateLength;
                     var result = transform(type);
+                    var addedLength = context.approximateLength - startLength;
+                    if (!context.reportedDiagnostic && !context.encounteredError) {
+                        if (context.truncating) {
+                            result.truncating = true;
+                        }
+                        result.addedLength = addedLength;
+                        (_b = links === null || links === void 0 ? void 0 : links.serializedTypes) === null || _b === void 0 ? void 0 : _b.set(key, result);
+                    }
                     context.visitedTypes.delete(typeId);
                     if (id) {
                         context.symbolDepth.set(id, depth);
                     }
                     return result;
+                    function deepCloneOrReuseNode(node) {
+                        if (!ts.nodeIsSynthesized(node) && ts.getParseTreeNode(node) === node) {
+                            return node;
+                        }
+                        return ts.setTextRange(ts.factory.cloneNode(ts.visitEachChild(node, deepCloneOrReuseNode, ts.nullTransformationContext)), node);
+                    }
                 }
                 function createTypeNodeFromObjectType(type) {
                     if (isGenericMappedType(type) || type.containsError) {
                         return createMappedTypeNodeFromType(type);
                     }
                     var resolved = resolveStructuredTypeMembers(type);
-                    if (!resolved.properties.length && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+                    if (!resolved.properties.length && !resolved.indexInfos.length) {
                         if (!resolved.callSignatures.length && !resolved.constructSignatures.length) {
                             context.approximateLength += 2;
                             return ts.setEmitFlags(ts.factory.createTypeLiteralNode(undefined), 1);
                         }
                         if (resolved.callSignatures.length === 1 && !resolved.constructSignatures.length) {
                             var signature = resolved.callSignatures[0];
-                            var signatureNode = signatureToSignatureDeclarationHelper(signature, 174, context);
+                            var signatureNode = signatureToSignatureDeclarationHelper(signature, 178, context);
                             return signatureNode;
                         }
                         if (resolved.constructSignatures.length === 1 && !resolved.callSignatures.length) {
                             var signature = resolved.constructSignatures[0];
-                            var signatureNode = signatureToSignatureDeclarationHelper(signature, 175, context);
+                            var signatureNode = signatureToSignatureDeclarationHelper(signature, 179, context);
                             return signatureNode;
                         }
                     }
@@ -39366,8 +42180,7 @@ var ts;
                         var types = ts.map(abstractSignatures, getOrCreateTypeFromSignature);
                         var typeElementCount = resolved.callSignatures.length +
                             (resolved.constructSignatures.length - abstractSignatures.length) +
-                            (resolved.stringIndexInfo ? 1 : 0) +
-                            (resolved.numberIndexInfo ? 1 : 0) +
+                            resolved.indexInfos.length +
                             (context.flags & 2048 ?
                                 ts.countWhere(resolved.properties, function (p) { return !(p.flags & 4194304); }) :
                                 ts.length(resolved.properties));
@@ -39394,9 +42207,10 @@ var ts;
                         }
                         var elementType = typeToTypeNodeHelper(typeArguments[0], context);
                         var arrayType = ts.factory.createArrayTypeNode(elementType);
-                        return type.target === globalArrayType ? arrayType : ts.factory.createTypeOperatorNode(142, arrayType);
+                        return type.target === globalArrayType ? arrayType : ts.factory.createTypeOperatorNode(144, arrayType);
                     }
                     else if (type.target.objectFlags & 8) {
+                        typeArguments = ts.sameMap(typeArguments, function (t, i) { return removeMissingType(t, !!(type.target.elementFlags[i] & 2)); });
                         if (typeArguments.length > 0) {
                             var arity = getTypeReferenceArity(type);
                             var tupleConstituentNodes = mapToTypeNodes(typeArguments.slice(0, arity), context);
@@ -39418,12 +42232,12 @@ var ts;
                                     }
                                 }
                                 var tupleTypeNode = ts.setEmitFlags(ts.factory.createTupleTypeNode(tupleConstituentNodes), 1);
-                                return type.target.readonly ? ts.factory.createTypeOperatorNode(142, tupleTypeNode) : tupleTypeNode;
+                                return type.target.readonly ? ts.factory.createTypeOperatorNode(144, tupleTypeNode) : tupleTypeNode;
                             }
                         }
                         if (context.encounteredError || (context.flags & 524288)) {
                             var tupleTypeNode = ts.setEmitFlags(ts.factory.createTupleTypeNode([]), 1);
-                            return type.target.readonly ? ts.factory.createTypeOperatorNode(142, tupleTypeNode) : tupleTypeNode;
+                            return type.target.readonly ? ts.factory.createTypeOperatorNode(144, tupleTypeNode) : tupleTypeNode;
                         }
                         context.encounteredError = true;
                         return undefined;
@@ -39523,34 +42337,25 @@ var ts;
                     var typeElements = [];
                     for (var _i = 0, _a = resolvedType.callSignatures; _i < _a.length; _i++) {
                         var signature = _a[_i];
-                        typeElements.push(signatureToSignatureDeclarationHelper(signature, 169, context));
+                        typeElements.push(signatureToSignatureDeclarationHelper(signature, 173, context));
                     }
                     for (var _b = 0, _c = resolvedType.constructSignatures; _b < _c.length; _b++) {
                         var signature = _c[_b];
                         if (signature.flags & 4)
                             continue;
-                        typeElements.push(signatureToSignatureDeclarationHelper(signature, 170, context));
-                    }
-                    if (resolvedType.stringIndexInfo) {
-                        var indexSignature = void 0;
-                        if (resolvedType.objectFlags & 2048) {
-                            indexSignature = indexInfoToIndexSignatureDeclarationHelper(createIndexInfo(anyType, resolvedType.stringIndexInfo.isReadonly, resolvedType.stringIndexInfo.declaration), 0, context, createElidedInformationPlaceholder(context));
-                        }
-                        else {
-                            indexSignature = indexInfoToIndexSignatureDeclarationHelper(resolvedType.stringIndexInfo, 0, context, undefined);
-                        }
-                        typeElements.push(indexSignature);
+                        typeElements.push(signatureToSignatureDeclarationHelper(signature, 174, context));
                     }
-                    if (resolvedType.numberIndexInfo) {
-                        typeElements.push(indexInfoToIndexSignatureDeclarationHelper(resolvedType.numberIndexInfo, 1, context, undefined));
+                    for (var _d = 0, _e = resolvedType.indexInfos; _d < _e.length; _d++) {
+                        var info = _e[_d];
+                        typeElements.push(indexInfoToIndexSignatureDeclarationHelper(info, context, resolvedType.objectFlags & 1024 ? createElidedInformationPlaceholder(context) : undefined));
                     }
                     var properties = resolvedType.properties;
                     if (!properties) {
                         return typeElements;
                     }
                     var i = 0;
-                    for (var _d = 0, properties_1 = properties; _d < properties_1.length; _d++) {
-                        var propertySymbol = properties_1[_d];
+                    for (var _f = 0, properties_1 = properties; _f < properties_1.length; _f++) {
+                        var propertySymbol = properties_1[_f];
                         i++;
                         if (context.flags & 2048) {
                             if (propertySymbol.flags & 4194304) {
@@ -39561,7 +42366,7 @@ var ts;
                             }
                         }
                         if (checkTruncationLength(context) && (i + 2 < properties.length - 1)) {
-                            typeElements.push(ts.factory.createPropertySignature(undefined, "... " + (properties.length - i) + " more ...", undefined, undefined));
+                            typeElements.push(ts.factory.createPropertySignature(undefined, "... ".concat(properties.length - i, " more ..."), undefined, undefined));
                             addPropertyToElementList(properties[properties.length - 1], context, typeElements);
                             break;
                         }
@@ -39575,52 +42380,70 @@ var ts;
                 if (!(context.flags & 1)) {
                     return ts.factory.createTypeReferenceNode(ts.factory.createIdentifier("..."), undefined);
                 }
-                return ts.factory.createKeywordTypeNode(128);
+                return ts.factory.createKeywordTypeNode(130);
+            }
+            function shouldUsePlaceholderForProperty(propertySymbol, context) {
+                var _a;
+                return !!(ts.getCheckFlags(propertySymbol) & 8192)
+                    && (ts.contains(context.reverseMappedStack, propertySymbol)
+                        || (((_a = context.reverseMappedStack) === null || _a === void 0 ? void 0 : _a[0])
+                            && !(ts.getObjectFlags(ts.last(context.reverseMappedStack).propertyType) & 16)));
             }
             function addPropertyToElementList(propertySymbol, context, typeElements) {
+                var _a, _b;
                 var propertyIsReverseMapped = !!(ts.getCheckFlags(propertySymbol) & 8192);
-                var propertyType = propertyIsReverseMapped && context.flags & 33554432 ?
-                    anyType : getTypeOfSymbol(propertySymbol);
+                var propertyType = shouldUsePlaceholderForProperty(propertySymbol, context) ?
+                    anyType : getNonMissingTypeOfSymbol(propertySymbol);
                 var saveEnclosingDeclaration = context.enclosingDeclaration;
                 context.enclosingDeclaration = undefined;
                 if (context.tracker.trackSymbol && ts.getCheckFlags(propertySymbol) & 4096 && isLateBoundName(propertySymbol.escapedName)) {
-                    var decl = ts.first(propertySymbol.declarations);
-                    if (hasLateBindableName(decl)) {
-                        if (ts.isBinaryExpression(decl)) {
-                            var name = ts.getNameOfDeclaration(decl);
-                            if (name && ts.isElementAccessExpression(name) && ts.isPropertyAccessEntityNameExpression(name.argumentExpression)) {
-                                trackComputedName(name.argumentExpression, saveEnclosingDeclaration, context);
+                    if (propertySymbol.declarations) {
+                        var decl = ts.first(propertySymbol.declarations);
+                        if (hasLateBindableName(decl)) {
+                            if (ts.isBinaryExpression(decl)) {
+                                var name = ts.getNameOfDeclaration(decl);
+                                if (name && ts.isElementAccessExpression(name) && ts.isPropertyAccessEntityNameExpression(name.argumentExpression)) {
+                                    trackComputedName(name.argumentExpression, saveEnclosingDeclaration, context);
+                                }
+                            }
+                            else {
+                                trackComputedName(decl.name.expression, saveEnclosingDeclaration, context);
                             }
-                        }
-                        else {
-                            trackComputedName(decl.name.expression, saveEnclosingDeclaration, context);
                         }
                     }
+                    else if ((_a = context.tracker) === null || _a === void 0 ? void 0 : _a.reportNonSerializableProperty) {
+                        context.tracker.reportNonSerializableProperty(symbolToString(propertySymbol));
+                    }
                 }
-                context.enclosingDeclaration = saveEnclosingDeclaration;
+                context.enclosingDeclaration = propertySymbol.valueDeclaration || ((_b = propertySymbol.declarations) === null || _b === void 0 ? void 0 : _b[0]) || saveEnclosingDeclaration;
                 var propertyName = getPropertyNameNodeForSymbol(propertySymbol, context);
+                context.enclosingDeclaration = saveEnclosingDeclaration;
                 context.approximateLength += (ts.symbolName(propertySymbol).length + 1);
                 var optionalToken = propertySymbol.flags & 16777216 ? ts.factory.createToken(57) : undefined;
                 if (propertySymbol.flags & (16 | 8192) && !getPropertiesOfObjectType(propertyType).length && !isReadonlySymbol(propertySymbol)) {
                     var signatures = getSignaturesOfType(filterType(propertyType, function (t) { return !(t.flags & 32768); }), 0);
                     for (var _i = 0, signatures_1 = signatures; _i < signatures_1.length; _i++) {
                         var signature = signatures_1[_i];
-                        var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 164, context, { name: propertyName, questionToken: optionalToken });
+                        var methodDeclaration = signatureToSignatureDeclarationHelper(signature, 167, context, { name: propertyName, questionToken: optionalToken });
                         typeElements.push(preserveCommentsOn(methodDeclaration));
                     }
                 }
                 else {
-                    var savedFlags = context.flags;
-                    context.flags |= propertyIsReverseMapped ? 33554432 : 0;
                     var propertyTypeNode = void 0;
-                    if (propertyIsReverseMapped && !!(savedFlags & 33554432)) {
+                    if (shouldUsePlaceholderForProperty(propertySymbol, context)) {
                         propertyTypeNode = createElidedInformationPlaceholder(context);
                     }
                     else {
-                        propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : ts.factory.createKeywordTypeNode(128);
+                        if (propertyIsReverseMapped) {
+                            context.reverseMappedStack || (context.reverseMappedStack = []);
+                            context.reverseMappedStack.push(propertySymbol);
+                        }
+                        propertyTypeNode = propertyType ? serializeTypeForDeclaration(context, propertyType, propertySymbol, saveEnclosingDeclaration) : ts.factory.createKeywordTypeNode(130);
+                        if (propertyIsReverseMapped) {
+                            context.reverseMappedStack.pop();
+                        }
                     }
-                    context.flags = savedFlags;
-                    var modifiers = isReadonlySymbol(propertySymbol) ? [ts.factory.createToken(142)] : undefined;
+                    var modifiers = isReadonlySymbol(propertySymbol) ? [ts.factory.createToken(144)] : undefined;
                     if (modifiers) {
                         context.approximateLength += 9;
                     }
@@ -39628,9 +42451,10 @@ var ts;
                     typeElements.push(preserveCommentsOn(propertySignature));
                 }
                 function preserveCommentsOn(node) {
-                    if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 333; })) {
-                        var d = ts.find(propertySymbol.declarations, function (d) { return d.kind === 333; });
-                        var commentText = d.comment;
+                    var _a;
+                    if (ts.some(propertySymbol.declarations, function (d) { return d.kind === 345; })) {
+                        var d = (_a = propertySymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 345; });
+                        var commentText = ts.getTextOfJSDocComment(d.comment);
                         if (commentText) {
                             ts.setSyntheticLeadingComments(node, [{ kind: 3, text: "*\n * " + commentText.replace(/\n/g, "\n * ") + "\n ", pos: -1, end: -1, hasTrailingNewLine: true }]);
                         }
@@ -39650,32 +42474,32 @@ var ts;
                         else if (types.length > 2) {
                             return [
                                 typeToTypeNodeHelper(types[0], context),
-                                ts.factory.createTypeReferenceNode("... " + (types.length - 2) + " more ...", undefined),
+                                ts.factory.createTypeReferenceNode("... ".concat(types.length - 2, " more ..."), undefined),
                                 typeToTypeNodeHelper(types[types.length - 1], context)
                             ];
                         }
                     }
                     var mayHaveNameCollisions = !(context.flags & 64);
                     var seenNames = mayHaveNameCollisions ? ts.createUnderscoreEscapedMultiMap() : undefined;
-                    var result_4 = [];
+                    var result_5 = [];
                     var i = 0;
                     for (var _i = 0, types_2 = types; _i < types_2.length; _i++) {
                         var type = types_2[_i];
                         i++;
                         if (checkTruncationLength(context) && (i + 2 < types.length - 1)) {
-                            result_4.push(ts.factory.createTypeReferenceNode("... " + (types.length - i) + " more ...", undefined));
+                            result_5.push(ts.factory.createTypeReferenceNode("... ".concat(types.length - i, " more ..."), undefined));
                             var typeNode_1 = typeToTypeNodeHelper(types[types.length - 1], context);
                             if (typeNode_1) {
-                                result_4.push(typeNode_1);
+                                result_5.push(typeNode_1);
                             }
                             break;
                         }
                         context.approximateLength += 2;
                         var typeNode = typeToTypeNodeHelper(type, context);
                         if (typeNode) {
-                            result_4.push(typeNode);
+                            result_5.push(typeNode);
                             if (seenNames && ts.isIdentifierTypeReference(typeNode)) {
-                                seenNames.add(typeNode.typeName.escapedText, [type, result_4.length - 1]);
+                                seenNames.add(typeNode.typeName.escapedText, [type, result_5.length - 1]);
                             }
                         }
                     }
@@ -39690,13 +42514,13 @@ var ts;
                             })) {
                                 for (var _i = 0, types_3 = types; _i < types_3.length; _i++) {
                                     var _a = types_3[_i], type = _a[0], resultIndex = _a[1];
-                                    result_4[resultIndex] = typeToTypeNodeHelper(type, context);
+                                    result_5[resultIndex] = typeToTypeNodeHelper(type, context);
                                 }
                             }
                         });
                         context.flags = saveContextFlags;
                     }
-                    return result_4;
+                    return result_5;
                 }
             }
             function typesAreSameReference(a, b) {
@@ -39704,9 +42528,9 @@ var ts;
                     || !!a.symbol && a.symbol === b.symbol
                     || !!a.aliasSymbol && a.aliasSymbol === b.aliasSymbol;
             }
-            function indexInfoToIndexSignatureDeclarationHelper(indexInfo, kind, context, typeNode) {
+            function indexInfoToIndexSignatureDeclarationHelper(indexInfo, context, typeNode) {
                 var name = ts.getNameFromIndexInfo(indexInfo) || "x";
-                var indexerTypeNode = ts.factory.createKeywordTypeNode(kind === 0 ? 147 : 144);
+                var indexerTypeNode = typeToTypeNodeHelper(indexInfo.keyType, context);
                 var indexingParameter = ts.factory.createParameterDeclaration(undefined, undefined, undefined, name, undefined, indexerTypeNode, undefined);
                 if (!typeNode) {
                     typeNode = typeToTypeNodeHelper(indexInfo.type || anyType, context);
@@ -39715,13 +42539,14 @@ var ts;
                     context.encounteredError = true;
                 }
                 context.approximateLength += (name.length + 4);
-                return ts.factory.createIndexSignature(undefined, indexInfo.isReadonly ? [ts.factory.createToken(142)] : undefined, [indexingParameter], typeNode);
+                return ts.factory.createIndexSignature(undefined, indexInfo.isReadonly ? [ts.factory.createToken(144)] : undefined, [indexingParameter], typeNode);
             }
             function signatureToSignatureDeclarationHelper(signature, kind, context, options) {
                 var _a, _b, _c, _d;
                 var suppressAny = context.flags & 256;
                 if (suppressAny)
                     context.flags &= ~256;
+                context.approximateLength += 3;
                 var typeParameters;
                 var typeArguments;
                 if (context.flags & 32 && signature.target && signature.mapper && signature.target.typeParameters) {
@@ -39731,7 +42556,7 @@ var ts;
                     typeParameters = signature.typeParameters && signature.typeParameters.map(function (parameter) { return typeParameterToDeclaration(parameter, context); });
                 }
                 var expandedParams = getExpandedParameters(signature, true)[0];
-                var parameters = (ts.some(expandedParams, function (p) { return p !== expandedParams[expandedParams.length - 1] && !!(ts.getCheckFlags(p) & 32768); }) ? signature.parameters : expandedParams).map(function (parameter) { return symbolToParameterDeclaration(parameter, context, kind === 166, options === null || options === void 0 ? void 0 : options.privateSymbolVisitor, options === null || options === void 0 ? void 0 : options.bundledImports); });
+                var parameters = (ts.some(expandedParams, function (p) { return p !== expandedParams[expandedParams.length - 1] && !!(ts.getCheckFlags(p) & 32768); }) ? signature.parameters : expandedParams).map(function (parameter) { return symbolToParameterDeclaration(parameter, context, kind === 170, options === null || options === void 0 ? void 0 : options.privateSymbolVisitor, options === null || options === void 0 ? void 0 : options.bundledImports); });
                 if (signature.thisParameter) {
                     var thisParameter = symbolToParameterDeclaration(signature.thisParameter, context);
                     parameters.unshift(thisParameter);
@@ -39740,7 +42565,7 @@ var ts;
                 var typePredicate = getTypePredicateOfSignature(signature);
                 if (typePredicate) {
                     var assertsModifier = typePredicate.kind === 2 || typePredicate.kind === 3 ?
-                        ts.factory.createToken(127) :
+                        ts.factory.createToken(128) :
                         undefined;
                     var parameterName = typePredicate.kind === 1 || typePredicate.kind === 3 ?
                         ts.setEmitFlags(ts.factory.createIdentifier(typePredicate.parameterName), 16777216) :
@@ -39754,29 +42579,28 @@ var ts;
                         returnTypeNode = serializeReturnTypeForSignature(context, returnType, signature, options === null || options === void 0 ? void 0 : options.privateSymbolVisitor, options === null || options === void 0 ? void 0 : options.bundledImports);
                     }
                     else if (!suppressAny) {
-                        returnTypeNode = ts.factory.createKeywordTypeNode(128);
+                        returnTypeNode = ts.factory.createKeywordTypeNode(130);
                     }
                 }
                 var modifiers = options === null || options === void 0 ? void 0 : options.modifiers;
-                if ((kind === 175) && signature.flags & 4) {
+                if ((kind === 179) && signature.flags & 4) {
                     var flags = ts.modifiersToFlags(modifiers);
                     modifiers = ts.factory.createModifiersFromModifierFlags(flags | 128);
                 }
-                context.approximateLength += 3;
-                var node = kind === 169 ? ts.factory.createCallSignature(typeParameters, parameters, returnTypeNode) :
-                    kind === 170 ? ts.factory.createConstructSignature(typeParameters, parameters, returnTypeNode) :
-                        kind === 164 ? ts.factory.createMethodSignature(modifiers, (_a = options === null || options === void 0 ? void 0 : options.name) !== null && _a !== void 0 ? _a : ts.factory.createIdentifier(""), options === null || options === void 0 ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) :
-                            kind === 165 ? ts.factory.createMethodDeclaration(undefined, modifiers, undefined, (_b = options === null || options === void 0 ? void 0 : options.name) !== null && _b !== void 0 ? _b : ts.factory.createIdentifier(""), undefined, typeParameters, parameters, returnTypeNode, undefined) :
-                                kind === 166 ? ts.factory.createConstructorDeclaration(undefined, modifiers, parameters, undefined) :
-                                    kind === 167 ? ts.factory.createGetAccessorDeclaration(undefined, modifiers, (_c = options === null || options === void 0 ? void 0 : options.name) !== null && _c !== void 0 ? _c : ts.factory.createIdentifier(""), parameters, returnTypeNode, undefined) :
-                                        kind === 168 ? ts.factory.createSetAccessorDeclaration(undefined, modifiers, (_d = options === null || options === void 0 ? void 0 : options.name) !== null && _d !== void 0 ? _d : ts.factory.createIdentifier(""), parameters, undefined) :
-                                            kind === 171 ? ts.factory.createIndexSignature(undefined, modifiers, parameters, returnTypeNode) :
-                                                kind === 308 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
-                                                    kind === 174 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
-                                                        kind === 175 ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
-                                                            kind === 251 ? ts.factory.createFunctionDeclaration(undefined, modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, undefined) :
-                                                                kind === 208 ? ts.factory.createFunctionExpression(modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, ts.factory.createBlock([])) :
-                                                                    kind === 209 ? ts.factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, undefined, ts.factory.createBlock([])) :
+                var node = kind === 173 ? ts.factory.createCallSignature(typeParameters, parameters, returnTypeNode) :
+                    kind === 174 ? ts.factory.createConstructSignature(typeParameters, parameters, returnTypeNode) :
+                        kind === 167 ? ts.factory.createMethodSignature(modifiers, (_a = options === null || options === void 0 ? void 0 : options.name) !== null && _a !== void 0 ? _a : ts.factory.createIdentifier(""), options === null || options === void 0 ? void 0 : options.questionToken, typeParameters, parameters, returnTypeNode) :
+                            kind === 168 ? ts.factory.createMethodDeclaration(undefined, modifiers, undefined, (_b = options === null || options === void 0 ? void 0 : options.name) !== null && _b !== void 0 ? _b : ts.factory.createIdentifier(""), undefined, typeParameters, parameters, returnTypeNode, undefined) :
+                                kind === 170 ? ts.factory.createConstructorDeclaration(undefined, modifiers, parameters, undefined) :
+                                    kind === 171 ? ts.factory.createGetAccessorDeclaration(undefined, modifiers, (_c = options === null || options === void 0 ? void 0 : options.name) !== null && _c !== void 0 ? _c : ts.factory.createIdentifier(""), parameters, returnTypeNode, undefined) :
+                                        kind === 172 ? ts.factory.createSetAccessorDeclaration(undefined, modifiers, (_d = options === null || options === void 0 ? void 0 : options.name) !== null && _d !== void 0 ? _d : ts.factory.createIdentifier(""), parameters, undefined) :
+                                            kind === 175 ? ts.factory.createIndexSignature(undefined, modifiers, parameters, returnTypeNode) :
+                                                kind === 315 ? ts.factory.createJSDocFunctionType(parameters, returnTypeNode) :
+                                                    kind === 178 ? ts.factory.createFunctionTypeNode(typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
+                                                        kind === 179 ? ts.factory.createConstructorTypeNode(modifiers, typeParameters, parameters, returnTypeNode !== null && returnTypeNode !== void 0 ? returnTypeNode : ts.factory.createTypeReferenceNode(ts.factory.createIdentifier(""))) :
+                                                            kind === 255 ? ts.factory.createFunctionDeclaration(undefined, modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, undefined) :
+                                                                kind === 212 ? ts.factory.createFunctionExpression(modifiers, undefined, (options === null || options === void 0 ? void 0 : options.name) ? ts.cast(options.name, ts.isIdentifier) : ts.factory.createIdentifier(""), typeParameters, parameters, returnTypeNode, ts.factory.createBlock([])) :
+                                                                    kind === 213 ? ts.factory.createArrowFunction(modifiers, typeParameters, parameters, returnTypeNode, undefined, ts.factory.createBlock([])) :
                                                                         ts.Debug.assertNever(kind);
                 if (typeArguments) {
                     node.typeArguments = ts.factory.createNodeArray(typeArguments);
@@ -39798,9 +42622,9 @@ var ts;
                 return typeParameterToDeclarationWithConstraint(type, context, constraintNode);
             }
             function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
-                var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 160);
+                var parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 163);
                 if (!parameterDeclaration && !ts.isTransientSymbol(parameterSymbol)) {
-                    parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 326);
+                    parameterDeclaration = ts.getDeclarationOfKind(parameterSymbol, 338);
                 }
                 var parameterType = getTypeOfSymbol(parameterSymbol);
                 if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
@@ -39814,8 +42638,8 @@ var ts;
                 var isRest = parameterDeclaration && ts.isRestParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 32768;
                 var dotDotDotToken = isRest ? ts.factory.createToken(25) : undefined;
                 var name = parameterDeclaration ? parameterDeclaration.name ?
-                    parameterDeclaration.name.kind === 78 ? ts.setEmitFlags(ts.factory.cloneNode(parameterDeclaration.name), 16777216) :
-                        parameterDeclaration.name.kind === 157 ? ts.setEmitFlags(ts.factory.cloneNode(parameterDeclaration.name.right), 16777216) :
+                    parameterDeclaration.name.kind === 79 ? ts.setEmitFlags(ts.factory.cloneNode(parameterDeclaration.name), 16777216) :
+                        parameterDeclaration.name.kind === 160 ? ts.setEmitFlags(ts.factory.cloneNode(parameterDeclaration.name.right), 16777216) :
                             cloneBindingName(parameterDeclaration.name) :
                     ts.symbolName(parameterSymbol) :
                     ts.symbolName(parameterSymbol);
@@ -39961,11 +42785,11 @@ var ts;
             }
             function getSpecifierForModuleSymbol(symbol, context) {
                 var _a;
-                var file = ts.getDeclarationOfKind(symbol, 297);
+                var file = ts.getDeclarationOfKind(symbol, 303);
                 if (!file) {
                     var equivalentFileSymbol = ts.firstDefined(symbol.declarations, function (d) { return getFileSymbolIfFileSymbolExportEqualsContainer(d, symbol); });
                     if (equivalentFileSymbol) {
-                        file = ts.getDeclarationOfKind(equivalentFileSymbol, 297);
+                        file = ts.getDeclarationOfKind(equivalentFileSymbol, 303);
                     }
                 }
                 if (file && file.moduleName !== undefined) {
@@ -39975,8 +42799,8 @@ var ts;
                     if (context.tracker.trackReferencedAmbientModule) {
                         var ambientDecls = ts.filter(symbol.declarations, ts.isAmbientModule);
                         if (ts.length(ambientDecls)) {
-                            for (var _i = 0, ambientDecls_1 = ambientDecls; _i < ambientDecls_1.length; _i++) {
-                                var decl = ambientDecls_1[_i];
+                            for (var _i = 0, _b = ambientDecls; _i < _b.length; _i++) {
+                                var decl = _b[_i];
                                 context.tracker.trackReferencedAmbientModule(decl, symbol);
                             }
                         }
@@ -39998,12 +42822,16 @@ var ts;
                     var isBundle_1 = !!ts.outFile(compilerOptions);
                     var moduleResolverHost = context.tracker.moduleResolverHost;
                     var specifierCompilerOptions = isBundle_1 ? __assign(__assign({}, compilerOptions), { baseUrl: moduleResolverHost.getCommonSourceDirectory() }) : compilerOptions;
-                    specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "relative", importModuleSpecifierEnding: isBundle_1 ? "minimal" : undefined }));
+                    specifier = ts.first(ts.moduleSpecifiers.getModuleSpecifiers(symbol, checker, specifierCompilerOptions, contextFile, moduleResolverHost, { importModuleSpecifierPreference: isBundle_1 ? "non-relative" : "project-relative", importModuleSpecifierEnding: isBundle_1 ? "minimal" : undefined }));
                     (_a = links.specifierCache) !== null && _a !== void 0 ? _a : (links.specifierCache = new ts.Map());
                     links.specifierCache.set(contextFile.path, specifier);
                 }
                 return specifier;
             }
+            function symbolToEntityNameNode(symbol) {
+                var identifier = ts.factory.createIdentifier(ts.unescapeLeadingUnderscores(symbol.escapedName));
+                return symbol.parent ? ts.factory.createQualifiedName(symbolToEntityNameNode(symbol.parent), identifier) : identifier;
+            }
             function symbolToTypeNode(symbol, context, meaning, overrideTypeArguments) {
                 var chain = lookupSymbolChain(symbol, context, meaning, !(context.flags & 16384));
                 var isTypeOf = meaning === 111551;
@@ -40011,7 +42839,7 @@ var ts;
                     var nonRootParts = chain.length > 1 ? createAccessFromSymbolChain(chain, chain.length - 1, 1) : undefined;
                     var typeParameterNodes = overrideTypeArguments || lookupTypeParameterNodes(chain, 0, context);
                     var specifier = getSpecifierForModuleSymbol(chain[0], context);
-                    if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) === ts.ModuleResolutionKind.NodeJs && specifier.indexOf("/node_modules/") >= 0) {
+                    if (!(context.flags & 67108864) && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Classic && specifier.indexOf("/node_modules/") >= 0) {
                         context.encounteredError = true;
                         if (context.tracker.reportLikelyUnsafeImportRequiredError) {
                             context.tracker.reportLikelyUnsafeImportRequiredError(specifier);
@@ -40107,7 +42935,7 @@ var ts;
                 return false;
             }
             function typeParameterToName(type, context) {
-                var _a;
+                var _a, _b;
                 if (context.flags & 4 && context.typeParameterNames) {
                     var cached = context.typeParameterNames.get(getTypeId(type));
                     if (cached) {
@@ -40115,22 +42943,23 @@ var ts;
                     }
                 }
                 var result = symbolToName(type.symbol, context, 788968, true);
-                if (!(result.kind & 78)) {
+                if (!(result.kind & 79)) {
                     return ts.factory.createIdentifier("(Missing type parameter)");
                 }
                 if (context.flags & 4) {
                     var rawtext = result.escapedText;
-                    var i = 0;
+                    var i = ((_a = context.typeParameterNamesByTextNextNameCount) === null || _a === void 0 ? void 0 : _a.get(rawtext)) || 0;
                     var text = rawtext;
-                    while (((_a = context.typeParameterNamesByText) === null || _a === void 0 ? void 0 : _a.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
+                    while (((_b = context.typeParameterNamesByText) === null || _b === void 0 ? void 0 : _b.has(text)) || typeParameterShadowsNameInScope(text, context, type)) {
                         i++;
-                        text = rawtext + "_" + i;
+                        text = "".concat(rawtext, "_").concat(i);
                     }
                     if (text !== rawtext) {
                         result = ts.factory.createIdentifier(text, result.typeArguments);
                     }
+                    (context.typeParameterNamesByTextNextNameCount || (context.typeParameterNamesByTextNextNameCount = new ts.Map())).set(rawtext, i);
                     (context.typeParameterNames || (context.typeParameterNames = new ts.Map())).set(getTypeId(type), result);
-                    (context.typeParameterNamesByText || (context.typeParameterNamesByText = new ts.Set())).add(result.escapedText);
+                    (context.typeParameterNamesByText || (context.typeParameterNamesByText = new ts.Set())).add(rawtext);
                 }
                 return result;
             }
@@ -40218,9 +43047,6 @@ var ts;
                 if (fromNameType) {
                     return fromNameType;
                 }
-                if (ts.isKnownSymbol(symbol)) {
-                    return ts.factory.createComputedPropertyName(ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier("Symbol"), symbol.escapedName.substr(3)));
-                }
                 var rawName = ts.unescapeLeadingUnderscores(symbol.escapedName);
                 var stringNamed = !!ts.length(symbol.declarations) && ts.every(symbol.declarations, isStringNamed);
                 return createPropertyNameNodeForIdentifierOrLiteral(rawName, stringNamed, singleQuote);
@@ -40230,7 +43056,7 @@ var ts;
                 if (nameType) {
                     if (nameType.flags & 384) {
                         var name = "" + nameType.value;
-                        if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) {
+                        if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
                             return ts.factory.createStringLiteral(name, !!singleQuote);
                         }
                         if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
@@ -40244,7 +43070,7 @@ var ts;
                 }
             }
             function createPropertyNameNodeForIdentifierOrLiteral(name, stringNamed, singleQuote) {
-                return ts.isIdentifierText(name, compilerOptions.target) ? ts.factory.createIdentifier(name) :
+                return ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) ? ts.factory.createIdentifier(name) :
                     !stringNamed && isNumericLiteralName(name) && +name >= 0 ? ts.factory.createNumericLiteral(+name) :
                         ts.factory.createStringLiteral(name, !!singleQuote);
             }
@@ -40259,6 +43085,7 @@ var ts;
                 if (initial.typeParameterSymbolList) {
                     initial.typeParameterSymbolList = new ts.Set(initial.typeParameterSymbolList);
                 }
+                initial.tracker = wrapSymbolTrackerToReportForContext(initial, initial.tracker);
                 return initial;
             }
             function getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration) {
@@ -40268,14 +43095,14 @@ var ts;
                 return !(ts.getObjectFlags(type) & 4) || !ts.isTypeReferenceNode(existing) || ts.length(existing.typeArguments) >= getMinTypeArgumentCount(type.target.typeParameters);
             }
             function serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled) {
-                if (type !== errorType && enclosingDeclaration) {
+                if (!isErrorType(type) && enclosingDeclaration) {
                     var declWithExistingAnnotation = getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration);
-                    if (declWithExistingAnnotation && !ts.isFunctionLikeDeclaration(declWithExistingAnnotation)) {
+                    if (declWithExistingAnnotation && !ts.isFunctionLikeDeclaration(declWithExistingAnnotation) && !ts.isGetAccessorDeclaration(declWithExistingAnnotation)) {
                         var existing = ts.getEffectiveTypeAnnotationNode(declWithExistingAnnotation);
                         if (getTypeFromTypeNode(existing) === type && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) {
-                            var result_5 = serializeExistingTypeNode(context, existing, includePrivateSymbol, bundled);
-                            if (result_5) {
-                                return result_5;
+                            var result_6 = serializeExistingTypeNode(context, existing, includePrivateSymbol, bundled);
+                            if (result_6) {
+                                return result_6;
                             }
                         }
                     }
@@ -40290,12 +43117,16 @@ var ts;
                 return result;
             }
             function serializeReturnTypeForSignature(context, type, signature, includePrivateSymbol, bundled) {
-                if (type !== errorType && context.enclosingDeclaration) {
+                if (!isErrorType(type) && context.enclosingDeclaration) {
                     var annotation = signature.declaration && ts.getEffectiveReturnTypeNode(signature.declaration);
-                    if (!!ts.findAncestor(annotation, function (n) { return n === context.enclosingDeclaration; }) && annotation && instantiateType(getTypeFromTypeNode(annotation), signature.mapper) === type && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(annotation, type)) {
-                        var result = serializeExistingTypeNode(context, annotation, includePrivateSymbol, bundled);
-                        if (result) {
-                            return result;
+                    if (!!ts.findAncestor(annotation, function (n) { return n === context.enclosingDeclaration; }) && annotation) {
+                        var annotated = getTypeFromTypeNode(annotation);
+                        var thisInstantiated = annotated.flags & 262144 && annotated.isThisType ? instantiateType(annotated, signature.mapper) : annotated;
+                        if (thisInstantiated === type && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(annotation, type)) {
+                            var result = serializeExistingTypeNode(context, annotation, includePrivateSymbol, bundled);
+                            if (result) {
+                                return result;
+                            }
                         }
                     }
                 }
@@ -40338,17 +43169,17 @@ var ts;
                 }
                 return transformed === existing ? ts.setTextRange(ts.factory.cloneNode(existing), existing) : transformed;
                 function visitExistingNodeTreeSymbols(node) {
-                    if (ts.isJSDocAllType(node) || node.kind === 310) {
-                        return ts.factory.createKeywordTypeNode(128);
+                    if (ts.isJSDocAllType(node) || node.kind === 317) {
+                        return ts.factory.createKeywordTypeNode(130);
                     }
                     if (ts.isJSDocUnknownType(node)) {
-                        return ts.factory.createKeywordTypeNode(152);
+                        return ts.factory.createKeywordTypeNode(154);
                     }
                     if (ts.isJSDocNullableType(node)) {
                         return ts.factory.createUnionTypeNode([ts.visitNode(node.type, visitExistingNodeTreeSymbols), ts.factory.createLiteralTypeNode(ts.factory.createNull())]);
                     }
                     if (ts.isJSDocOptionalType(node)) {
-                        return ts.factory.createUnionTypeNode([ts.visitNode(node.type, visitExistingNodeTreeSymbols), ts.factory.createKeywordTypeNode(150)]);
+                        return ts.factory.createUnionTypeNode([ts.visitNode(node.type, visitExistingNodeTreeSymbols), ts.factory.createKeywordTypeNode(152)]);
                     }
                     if (ts.isJSDocNonNullableType(node)) {
                         return ts.visitNode(node.type, visitExistingNodeTreeSymbols);
@@ -40361,11 +43192,11 @@ var ts;
                             var name = ts.isIdentifier(t.name) ? t.name : t.name.right;
                             var typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode(node), name.escapedText);
                             var overrideTypeNode = typeViaParent && t.typeExpression && getTypeFromTypeNode(t.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : undefined;
-                            return ts.factory.createPropertySignature(undefined, name, t.isBracketed || t.typeExpression && ts.isJSDocOptionalType(t.typeExpression.type) ? ts.factory.createToken(57) : undefined, overrideTypeNode || (t.typeExpression && ts.visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols)) || ts.factory.createKeywordTypeNode(128));
+                            return ts.factory.createPropertySignature(undefined, name, t.isBracketed || t.typeExpression && ts.isJSDocOptionalType(t.typeExpression.type) ? ts.factory.createToken(57) : undefined, overrideTypeNode || (t.typeExpression && ts.visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols)) || ts.factory.createKeywordTypeNode(130));
                         }));
                     }
                     if (ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "") {
-                        return ts.setOriginalNode(ts.factory.createKeywordTypeNode(128), node);
+                        return ts.setOriginalNode(ts.factory.createKeywordTypeNode(130), node);
                     }
                     if ((ts.isExpressionWithTypeArguments(node) || ts.isTypeReferenceNode(node)) && ts.isJSDocIndexSignature(node)) {
                         return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(undefined, undefined, [ts.factory.createParameterDeclaration(undefined, undefined, undefined, "x", undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols))], ts.visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols))]);
@@ -40373,13 +43204,13 @@ var ts;
                     if (ts.isJSDocFunctionType(node)) {
                         if (ts.isJSDocConstructSignature(node)) {
                             var newTypeNode_1;
-                            return ts.factory.createConstructorTypeNode(node.modifiers, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.mapDefined(node.parameters, function (p, i) { return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode_1 = p.type, undefined) : ts.factory.createParameterDeclaration(undefined, undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(newTypeNode_1 || node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(128));
+                            return ts.factory.createConstructorTypeNode(node.modifiers, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.mapDefined(node.parameters, function (p, i) { return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode_1 = p.type, undefined) : ts.factory.createParameterDeclaration(undefined, undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(newTypeNode_1 || node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(130));
                         }
                         else {
-                            return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(undefined, undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(128));
+                            return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(undefined, undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(130));
                         }
                     }
-                    if (ts.isTypeReferenceNode(node) && ts.isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName(getTypeReferenceName(node), 788968, true))) {
+                    if (ts.isTypeReferenceNode(node) && ts.isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName(node, 788968, true))) {
                         return ts.setOriginalNode(typeToTypeNodeHelper(getTypeFromTypeNode(node), context), node);
                     }
                     if (ts.isLiteralImportTypeNode(node)) {
@@ -40409,7 +43240,7 @@ var ts;
                     function getNameForJSDocFunctionParameter(p, index) {
                         return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "this" ? "this"
                             : getEffectiveDotDotDotForParameter(p) ? "args"
-                                : "arg" + index;
+                                : "arg".concat(index);
                     }
                     function rewriteModuleSpecifier(parent, lit) {
                         if (bundled) {
@@ -40440,8 +43271,8 @@ var ts;
                 }
             }
             function symbolTableToDeclarationStatements(symbolTable, context, bundled) {
-                var serializePropertySymbolForClass = makeSerializePropertySymbol(ts.factory.createPropertyDeclaration, 165, true);
-                var serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(function (_decorators, mods, name, question, type) { return ts.factory.createPropertySignature(mods, name, question, type); }, 164, false);
+                var serializePropertySymbolForClass = makeSerializePropertySymbol(ts.factory.createPropertyDeclaration, 168, true);
+                var serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(function (_decorators, mods, name, question, type) { return ts.factory.createPropertySignature(mods, name, question, type); }, 167, false);
                 var enclosingDeclaration = context.enclosingDeclaration;
                 var results = [];
                 var visitedSymbols = new ts.Set();
@@ -40456,9 +43287,11 @@ var ts;
                                 }
                             }
                             else if (oldcontext.tracker && oldcontext.tracker.trackSymbol) {
-                                oldcontext.tracker.trackSymbol(sym, decl, meaning);
+                                return oldcontext.tracker.trackSymbol(sym, decl, meaning);
                             }
+                            return false;
                         } }) });
+                context.tracker = wrapSymbolTrackerToReportForContext(context, context.tracker);
                 ts.forEachEntry(symbolTable, function (symbol, name) {
                     var baseName = ts.unescapeLeadingUnderscores(name);
                     void getInternalSymbolName(symbol, baseName);
@@ -40472,7 +43305,7 @@ var ts;
                 visitSymbolTable(symbolTable);
                 return mergeRedundantStatements(results);
                 function isIdentifierAndNotUndefined(node) {
-                    return !!node && node.kind === 78;
+                    return !!node && node.kind === 79;
                 }
                 function getNamesOfDeclaration(statement) {
                     if (ts.isVariableStatement(statement)) {
@@ -40491,8 +43324,8 @@ var ts;
                         var name_2 = ns.name;
                         var body = ns.body;
                         if (ts.length(excessExports)) {
-                            ns = ts.factory.updateModuleDeclaration(ns, ns.decorators, ns.modifiers, ns.name, body = ts.factory.updateModuleBlock(body, ts.factory.createNodeArray(__spreadArray(__spreadArray([], ns.body.statements), [ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports(ts.map(ts.flatMap(excessExports, function (e) { return getNamesOfDeclaration(e); }), function (id) { return ts.factory.createExportSpecifier(undefined, id); })), undefined)]))));
-                            statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, nsIndex)), [ns]), statements.slice(nsIndex + 1));
+                            ns = ts.factory.updateModuleDeclaration(ns, ns.decorators, ns.modifiers, ns.name, body = ts.factory.updateModuleBlock(body, ts.factory.createNodeArray(__spreadArray(__spreadArray([], ns.body.statements, true), [ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports(ts.map(ts.flatMap(excessExports, function (e) { return getNamesOfDeclaration(e); }), function (id) { return ts.factory.createExportSpecifier(false, undefined, id); })), undefined)], false))));
+                            statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, nsIndex), true), [ns], false), statements.slice(nsIndex + 1), true);
                         }
                         if (!ts.find(statements, function (s) { return s !== ns && ts.nodeHasName(s, name_2); })) {
                             results = [];
@@ -40500,7 +43333,7 @@ var ts;
                             ts.forEach(body.statements, function (s) {
                                 addResult(s, mixinExportFlag_1 ? 1 : 0);
                             });
-                            statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return s !== ns && s !== exportAssignment; })), results);
+                            statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return s !== ns && s !== exportAssignment; }), true), results, true);
                         }
                     }
                     return statements;
@@ -40509,7 +43342,7 @@ var ts;
                     var exports = ts.filter(statements, function (d) { return ts.isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
                     if (ts.length(exports) > 1) {
                         var nonExports = ts.filter(statements, function (d) { return !ts.isExportDeclaration(d) || !!d.moduleSpecifier || !d.exportClause; });
-                        statements = __spreadArray(__spreadArray([], nonExports), [ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports(ts.flatMap(exports, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })), undefined)]);
+                        statements = __spreadArray(__spreadArray([], nonExports, true), [ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports(ts.flatMap(exports, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })), undefined)], false);
                     }
                     var reexports = ts.filter(statements, function (d) { return ts.isExportDeclaration(d) && !!d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
                     if (ts.length(reexports) > 1) {
@@ -40517,9 +43350,9 @@ var ts;
                         if (groups.length !== reexports.length) {
                             var _loop_9 = function (group_1) {
                                 if (group_1.length > 1) {
-                                    statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return group_1.indexOf(s) === -1; })), [
+                                    statements = __spreadArray(__spreadArray([], ts.filter(statements, function (s) { return group_1.indexOf(s) === -1; }), true), [
                                         ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports(ts.flatMap(group_1, function (e) { return ts.cast(e.exportClause, ts.isNamedExports).elements; })), group_1[0].moduleSpecifier)
-                                    ]);
+                                    ], false);
                                 }
                             };
                             for (var _i = 0, groups_1 = groups; _i < groups_1.length; _i++) {
@@ -40531,7 +43364,7 @@ var ts;
                     return statements;
                 }
                 function inlineExportModifiers(statements) {
-                    var index = ts.findIndex(statements, function (d) { return ts.isExportDeclaration(d) && !d.moduleSpecifier && !!d.exportClause && ts.isNamedExports(d.exportClause); });
+                    var index = ts.findIndex(statements, function (d) { return ts.isExportDeclaration(d) && !d.moduleSpecifier && !d.assertClause && !!d.exportClause && ts.isNamedExports(d.exportClause); });
                     if (index >= 0) {
                         var exportDecl = statements[index];
                         var replacements = ts.mapDefined(exportDecl.exportClause.elements, function (e) {
@@ -40552,7 +43385,7 @@ var ts;
                             ts.orderedRemoveItemAt(statements, index);
                         }
                         else {
-                            statements[index] = ts.factory.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.isTypeOnly, ts.factory.updateNamedExports(exportDecl.exportClause, replacements), exportDecl.moduleSpecifier);
+                            statements[index] = ts.factory.updateExportDeclaration(exportDecl, exportDecl.decorators, exportDecl.modifiers, exportDecl.isTypeOnly, ts.factory.updateNamedExports(exportDecl.exportClause, replacements), exportDecl.moduleSpecifier, exportDecl.assertClause);
                         }
                     }
                     return statements;
@@ -40610,11 +43443,15 @@ var ts;
                         var oldContext = context;
                         context = cloneNodeBuilderContext(context);
                         var result = serializeSymbolWorker(symbol, isPrivate, propertyAsAlias);
+                        if (context.reportedDiagnostic) {
+                            oldcontext.reportedDiagnostic = context.reportedDiagnostic;
+                        }
                         context = oldContext;
                         return result;
                     }
                 }
                 function serializeSymbolWorker(symbol, isPrivate, propertyAsAlias) {
+                    var _a, _b;
                     var symbolName = ts.unescapeLeadingUnderscores(symbol.escapedName);
                     var isDefault = symbol.escapedName === "default";
                     if (isPrivate && !(context.flags & 131072) && ts.isStringANonContextualKeyword(symbolName) && !isDefault) {
@@ -40665,11 +43502,11 @@ var ts;
                                 if (textRange && ts.isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) {
                                     textRange = textRange.parent.parent;
                                 }
-                                var propertyAccessRequire = ts.find(symbol.declarations, ts.isPropertyAccessExpression);
+                                var propertyAccessRequire = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isPropertyAccessExpression);
                                 if (propertyAccessRequire && ts.isBinaryExpression(propertyAccessRequire.parent) && ts.isIdentifier(propertyAccessRequire.parent.right)
-                                    && type.symbol && ts.isSourceFile(type.symbol.valueDeclaration)) {
+                                    && ((_b = type.symbol) === null || _b === void 0 ? void 0 : _b.valueDeclaration) && ts.isSourceFile(type.symbol.valueDeclaration)) {
                                     var alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right;
-                                    addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(alias, localName)])), 0);
+                                    addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, alias, localName)])), 0);
                                     context.tracker.trackSymbol(type.symbol, context.enclosingDeclaration, 111551);
                                 }
                                 else {
@@ -40678,7 +43515,7 @@ var ts;
                                     ], flags)), textRange);
                                     addResult(statement, name !== localName ? modifierFlags & ~1 : modifierFlags);
                                     if (name !== localName && !isPrivate) {
-                                        addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(name, localName)])), 0);
+                                        addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, name, localName)])), 0);
                                         needsExportDeclaration = false;
                                         needsPostExportDefault = false;
                                     }
@@ -40690,7 +43527,10 @@ var ts;
                         serializeEnum(symbol, symbolName, modifierFlags);
                     }
                     if (symbol.flags & 32) {
-                        if (symbol.flags & 4 && ts.isBinaryExpression(symbol.valueDeclaration.parent) && ts.isClassExpression(symbol.valueDeclaration.parent.right)) {
+                        if (symbol.flags & 4
+                            && symbol.valueDeclaration
+                            && ts.isBinaryExpression(symbol.valueDeclaration.parent)
+                            && ts.isClassExpression(symbol.valueDeclaration.parent.right)) {
                             serializeAsAlias(symbol, getInternalSymbolName(symbol, symbolName), modifierFlags);
                         }
                         else {
@@ -40710,19 +43550,21 @@ var ts;
                         serializeMaybeAliasAssignment(symbol);
                     }
                     if (symbol.flags & 8388608) {
-                        for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
-                            var node = _a[_i];
-                            var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
-                            if (!resolvedModule)
-                                continue;
-                            addResult(ts.factory.createExportDeclaration(undefined, undefined, false, undefined, ts.factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context))), 0);
+                        if (symbol.declarations) {
+                            for (var _i = 0, _c = symbol.declarations; _i < _c.length; _i++) {
+                                var node = _c[_i];
+                                var resolvedModule = resolveExternalModuleName(node, node.moduleSpecifier);
+                                if (!resolvedModule)
+                                    continue;
+                                addResult(ts.factory.createExportDeclaration(undefined, undefined, false, undefined, ts.factory.createStringLiteral(getSpecifierForModuleSymbol(resolvedModule, context))), 0);
+                            }
                         }
                     }
                     if (needsPostExportDefault) {
                         addResult(ts.factory.createExportAssignment(undefined, undefined, false, ts.factory.createIdentifier(getInternalSymbolName(symbol, symbolName))), 0);
                     }
                     else if (needsExportDeclaration) {
-                        addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(getInternalSymbolName(symbol, symbolName), symbolName)])), 0);
+                        addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, getInternalSymbolName(symbol, symbolName), symbolName)])), 0);
                     }
                 }
                 function includePrivateSymbol(symbol) {
@@ -40766,11 +43608,12 @@ var ts;
                     results.push(node);
                 }
                 function serializeTypeAlias(symbol, symbolName, modifierFlags) {
+                    var _a;
                     var aliasType = getDeclaredTypeOfTypeAlias(symbol);
                     var typeParams = getSymbolLinks(symbol).typeParameters;
                     var typeParamDecls = ts.map(typeParams, function (p) { return typeParameterToDeclaration(p, context); });
-                    var jsdocAliasDecl = ts.find(symbol.declarations, ts.isJSDocTypeAlias);
-                    var commentText = jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : undefined;
+                    var jsdocAliasDecl = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isJSDocTypeAlias);
+                    var commentText = ts.getTextOfJSDocComment(jsdocAliasDecl ? jsdocAliasDecl.comment || jsdocAliasDecl.parent.comment : undefined);
                     var oldFlags = context.flags;
                     context.flags |= 8388608;
                     var oldEnclosingDecl = context.enclosingDeclaration;
@@ -40790,11 +43633,11 @@ var ts;
                     var baseTypes = getBaseTypes(interfaceType);
                     var baseType = ts.length(baseTypes) ? getIntersectionType(baseTypes) : undefined;
                     var members = ts.flatMap(getPropertiesOfType(interfaceType), function (p) { return serializePropertySymbolForInterface(p, baseType); });
-                    var callSignatures = serializeSignatures(0, interfaceType, baseType, 169);
-                    var constructSignatures = serializeSignatures(1, interfaceType, baseType, 170);
+                    var callSignatures = serializeSignatures(0, interfaceType, baseType, 173);
+                    var constructSignatures = serializeSignatures(1, interfaceType, baseType, 174);
                     var indexSignatures = serializeIndexSignatures(interfaceType, baseType);
-                    var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.factory.createHeritageClause(93, ts.mapDefined(baseTypes, function (b) { return trySerializeAsTypeReference(b, 111551); }))];
-                    addResult(ts.factory.createInterfaceDeclaration(undefined, undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures), constructSignatures), callSignatures), members)), modifierFlags);
+                    var heritageClauses = !ts.length(baseTypes) ? undefined : [ts.factory.createHeritageClause(94, ts.mapDefined(baseTypes, function (b) { return trySerializeAsTypeReference(b, 111551); }))];
+                    addResult(ts.factory.createInterfaceDeclaration(undefined, undefined, getInternalSymbolName(symbol, symbolName), typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures, true), constructSignatures, true), callSignatures, true), members, true)), modifierFlags);
                 }
                 function getNamespaceMembersForSerialization(symbol) {
                     return !symbol.exports ? [] : ts.filter(ts.arrayFrom(symbol.exports.values()), isNamespaceMember);
@@ -40826,7 +43669,7 @@ var ts;
                                 var target = aliasDecl && getTargetOfAliasDeclaration(aliasDecl, true);
                                 includePrivateSymbol(target || s);
                                 var targetName = target ? getInternalSymbolName(target, ts.unescapeLeadingUnderscores(target.escapedName)) : localName;
-                                return ts.factory.createExportSpecifier(name === targetName ? undefined : targetName, name);
+                                return ts.factory.createExportSpecifier(false, name === targetName ? undefined : targetName, name);
                             })))]);
                         addResult(ts.factory.createModuleDeclaration(undefined, undefined, ts.factory.createIdentifier(localName), nsBody, 16), 0);
                     }
@@ -40843,14 +43686,25 @@ var ts;
                     var signatures = getSignaturesOfType(type, 0);
                     for (var _i = 0, signatures_2 = signatures; _i < signatures_2.length; _i++) {
                         var sig = signatures_2[_i];
-                        var decl = signatureToSignatureDeclarationHelper(sig, 251, context, { name: ts.factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled });
-                        addResult(ts.setTextRange(decl, sig.declaration && ts.isVariableDeclaration(sig.declaration.parent) && sig.declaration.parent.parent || sig.declaration), modifierFlags);
+                        var decl = signatureToSignatureDeclarationHelper(sig, 255, context, { name: ts.factory.createIdentifier(localName), privateSymbolVisitor: includePrivateSymbol, bundledImports: bundled });
+                        addResult(ts.setTextRange(decl, getSignatureTextRangeLocation(sig)), modifierFlags);
                     }
                     if (!(symbol.flags & (512 | 1024) && !!symbol.exports && !!symbol.exports.size)) {
                         var props = ts.filter(getPropertiesOfType(type), isNamespaceMember);
                         serializeAsNamespaceDeclaration(props, localName, modifierFlags, true);
                     }
                 }
+                function getSignatureTextRangeLocation(signature) {
+                    if (signature.declaration && signature.declaration.parent) {
+                        if (ts.isBinaryExpression(signature.declaration.parent) && ts.getAssignmentDeclarationKind(signature.declaration.parent) === 5) {
+                            return signature.declaration.parent;
+                        }
+                        if (ts.isVariableDeclaration(signature.declaration.parent) && signature.declaration.parent.parent) {
+                            return signature.declaration.parent.parent;
+                        }
+                    }
+                    return signature.declaration;
+                }
                 function serializeAsNamespaceDeclaration(props, localName, modifierFlags, suppressNewPrivateContext) {
                     if (ts.length(props)) {
                         var localVsRemoteMap = ts.arrayToMultiMap(props, function (p) {
@@ -40875,7 +43729,7 @@ var ts;
                         addingDeclare = oldAddingDeclare;
                         var declarations = results;
                         results = oldResults;
-                        var defaultReplaced = ts.map(declarations, function (d) { return ts.isExportAssignment(d) && !d.isExportEquals && ts.isIdentifier(d.expression) ? ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(d.expression, ts.factory.createIdentifier("default"))])) : d; });
+                        var defaultReplaced = ts.map(declarations, function (d) { return ts.isExportAssignment(d) && !d.isExportEquals && ts.isIdentifier(d.expression) ? ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, d.expression, ts.factory.createIdentifier("default"))])) : d; });
                         var exportModifierStripped = ts.every(defaultReplaced, function (d) { return ts.hasSyntacticModifier(d, 1); }) ? ts.map(defaultReplaced, removeExportModifier) : defaultReplaced;
                         fakespace = ts.factory.updateModuleDeclaration(fakespace, fakespace.decorators, fakespace.modifiers, fakespace.name, ts.factory.createModuleBlock(exportModifierStripped));
                         addResult(fakespace, modifierFlags);
@@ -40883,7 +43737,7 @@ var ts;
                 }
                 function isNamespaceMember(p) {
                     return !!(p.flags & (788968 | 1920 | 2097152)) ||
-                        !(p.flags & 4194304 || p.escapedName === "prototype" || p.valueDeclaration && ts.getEffectiveModifierFlags(p.valueDeclaration) & 32 && ts.isClassLike(p.valueDeclaration.parent));
+                        !(p.flags & 4194304 || p.escapedName === "prototype" || p.valueDeclaration && ts.isStatic(p.valueDeclaration) && ts.isClassLike(p.valueDeclaration.parent));
                 }
                 function sanitizeJSDocImplements(clauses) {
                     var result = ts.mapDefined(clauses, function (e) {
@@ -40916,8 +43770,8 @@ var ts;
                     return undefined;
                 }
                 function serializeAsClass(symbol, localName, modifierFlags) {
-                    var _a;
-                    var originalDecl = ts.find(symbol.declarations, ts.isClassLike);
+                    var _a, _b;
+                    var originalDecl = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isClassLike);
                     var oldEnclosing = context.enclosingDeclaration;
                     context.enclosingDeclaration = originalDecl || oldEnclosing;
                     var localParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol);
@@ -40928,19 +43782,19 @@ var ts;
                     var implementsExpressions = originalImplements && sanitizeJSDocImplements(originalImplements)
                         || ts.mapDefined(getImplementsTypes(classType), serializeImplementedType);
                     var staticType = getTypeOfSymbol(symbol);
-                    var isClass = !!((_a = staticType.symbol) === null || _a === void 0 ? void 0 : _a.valueDeclaration) && ts.isClassLike(staticType.symbol.valueDeclaration);
+                    var isClass = !!((_b = staticType.symbol) === null || _b === void 0 ? void 0 : _b.valueDeclaration) && ts.isClassLike(staticType.symbol.valueDeclaration);
                     var staticBaseType = isClass
                         ? getBaseConstructorTypeOfClass(staticType)
                         : anyType;
-                    var heritageClauses = __spreadArray(__spreadArray([], !ts.length(baseTypes) ? [] : [ts.factory.createHeritageClause(93, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))]), !ts.length(implementsExpressions) ? [] : [ts.factory.createHeritageClause(116, implementsExpressions)]);
+                    var heritageClauses = __spreadArray(__spreadArray([], !ts.length(baseTypes) ? [] : [ts.factory.createHeritageClause(94, ts.map(baseTypes, function (b) { return serializeBaseType(b, staticBaseType, localName); }))], true), !ts.length(implementsExpressions) ? [] : [ts.factory.createHeritageClause(117, implementsExpressions)], true);
                     var symbolProps = getNonInterhitedProperties(classType, baseTypes, getPropertiesOfType(classType));
                     var publicSymbolProps = ts.filter(symbolProps, function (s) {
                         var valueDecl = s.valueDeclaration;
-                        return valueDecl && !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name));
+                        return !!valueDecl && !(ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name));
                     });
                     var hasPrivateIdentifier = ts.some(symbolProps, function (s) {
                         var valueDecl = s.valueDeclaration;
-                        return valueDecl && ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name);
+                        return !!valueDecl && ts.isNamedDeclaration(valueDecl) && ts.isPrivateIdentifier(valueDecl.name);
                     });
                     var privateProperties = hasPrivateIdentifier ?
                         [ts.factory.createPropertyDeclaration(undefined, undefined, ts.factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)] :
@@ -40953,10 +43807,30 @@ var ts;
                         !ts.some(getSignaturesOfType(staticType, 1));
                     var constructors = isNonConstructableClassLikeInJsFile ?
                         [ts.factory.createConstructorDeclaration(undefined, ts.factory.createModifiersFromModifierFlags(8), [], undefined)] :
-                        serializeSignatures(1, staticType, staticBaseType, 166);
+                        serializeSignatures(1, staticType, staticBaseType, 170);
                     var indexSignatures = serializeIndexSignatures(classType, baseTypes[0]);
                     context.enclosingDeclaration = oldEnclosing;
-                    addResult(ts.setTextRange(ts.factory.createClassDeclaration(undefined, undefined, localName, typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures), staticMembers), constructors), publicProperties), privateProperties)), symbol.declarations && ts.filter(symbol.declarations, function (d) { return ts.isClassDeclaration(d) || ts.isClassExpression(d); })[0]), modifierFlags);
+                    addResult(ts.setTextRange(ts.factory.createClassDeclaration(undefined, undefined, localName, typeParamDecls, heritageClauses, __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], indexSignatures, true), staticMembers, true), constructors, true), publicProperties, true), privateProperties, true)), symbol.declarations && ts.filter(symbol.declarations, function (d) { return ts.isClassDeclaration(d) || ts.isClassExpression(d); })[0]), modifierFlags);
+                }
+                function getSomeTargetNameFromDeclarations(declarations) {
+                    return ts.firstDefined(declarations, function (d) {
+                        if (ts.isImportSpecifier(d) || ts.isExportSpecifier(d)) {
+                            return ts.idText(d.propertyName || d.name);
+                        }
+                        if (ts.isBinaryExpression(d) || ts.isExportAssignment(d)) {
+                            var expression = ts.isExportAssignment(d) ? d.expression : d.right;
+                            if (ts.isPropertyAccessExpression(expression)) {
+                                return ts.idText(expression.name);
+                            }
+                        }
+                        if (isAliasSymbolDeclaration(d)) {
+                            var name = ts.getNameOfDeclaration(d);
+                            if (name && ts.isIdentifier(name)) {
+                                return ts.idText(name);
+                            }
+                        }
+                        return undefined;
+                    });
                 }
                 function serializeAsAlias(symbol, localName, modifierFlags) {
                     var _a, _b, _c, _d, _e;
@@ -40967,28 +43841,28 @@ var ts;
                     if (!target) {
                         return;
                     }
-                    var verbatimTargetName = ts.unescapeLeadingUnderscores(target.escapedName);
-                    if (verbatimTargetName === "export=" && (compilerOptions.esModuleInterop || compilerOptions.allowSyntheticDefaultImports)) {
+                    var verbatimTargetName = ts.isShorthandAmbientModuleSymbol(target) && getSomeTargetNameFromDeclarations(symbol.declarations) || ts.unescapeLeadingUnderscores(target.escapedName);
+                    if (verbatimTargetName === "export=" && (ts.getESModuleInterop(compilerOptions) || compilerOptions.allowSyntheticDefaultImports)) {
                         verbatimTargetName = "default";
                     }
                     var targetName = getInternalSymbolName(target, verbatimTargetName);
                     includePrivateSymbol(target);
                     switch (node.kind) {
-                        case 198:
-                            if (((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.kind) === 249) {
+                        case 202:
+                            if (((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.kind) === 253) {
                                 var specifier_1 = getSpecifierForModuleSymbol(target.parent || target, context);
                                 var propertyName = node.propertyName;
-                                addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([ts.factory.createImportSpecifier(propertyName && ts.isIdentifier(propertyName) ? ts.factory.createIdentifier(ts.idText(propertyName)) : undefined, ts.factory.createIdentifier(localName))])), ts.factory.createStringLiteral(specifier_1)), 0);
+                                addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([ts.factory.createImportSpecifier(false, propertyName && ts.isIdentifier(propertyName) ? ts.factory.createIdentifier(ts.idText(propertyName)) : undefined, ts.factory.createIdentifier(localName))])), ts.factory.createStringLiteral(specifier_1), undefined), 0);
                                 break;
                             }
                             ts.Debug.failBadSyntaxKind(((_c = node.parent) === null || _c === void 0 ? void 0 : _c.parent) || node, "Unhandled binding element grandparent kind in declaration serialization");
                             break;
-                        case 289:
-                            if (((_e = (_d = node.parent) === null || _d === void 0 ? void 0 : _d.parent) === null || _e === void 0 ? void 0 : _e.kind) === 216) {
+                        case 295:
+                            if (((_e = (_d = node.parent) === null || _d === void 0 ? void 0 : _d.parent) === null || _e === void 0 ? void 0 : _e.kind) === 220) {
                                 serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), targetName);
                             }
                             break;
-                        case 249:
+                        case 253:
                             if (ts.isPropertyAccessExpression(node.initializer)) {
                                 var initializer = node.initializer;
                                 var uniqueName = ts.factory.createUniqueName(localName);
@@ -40997,7 +43871,7 @@ var ts;
                                 addResult(ts.factory.createImportEqualsDeclaration(undefined, undefined, false, ts.factory.createIdentifier(localName), ts.factory.createQualifiedName(uniqueName, initializer.name)), modifierFlags);
                                 break;
                             }
-                        case 260:
+                        case 264:
                             if (target.escapedName === "export=" && ts.some(target.declarations, ts.isJsonSourceFile)) {
                                 serializeMaybeAliasAssignment(symbol);
                                 break;
@@ -41007,33 +43881,33 @@ var ts;
                                 ? symbolToName(target, context, 67108863, false)
                                 : ts.factory.createExternalModuleReference(ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)))), isLocalImport ? modifierFlags : 0);
                             break;
-                        case 259:
+                        case 263:
                             addResult(ts.factory.createNamespaceExportDeclaration(ts.idText(node.name)), 0);
                             break;
-                        case 262:
-                            addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, ts.factory.createIdentifier(localName), undefined), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0);
+                        case 266:
+                            addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, ts.factory.createIdentifier(localName), undefined), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)), undefined), 0);
                             break;
-                        case 263:
-                            addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(localName))), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))), 0);
+                        case 267:
+                            addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamespaceImport(ts.factory.createIdentifier(localName))), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context)), undefined), 0);
                             break;
-                        case 269:
+                        case 273:
                             addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamespaceExport(ts.factory.createIdentifier(localName)), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))), 0);
                             break;
-                        case 265:
+                        case 269:
                             addResult(ts.factory.createImportDeclaration(undefined, undefined, ts.factory.createImportClause(false, undefined, ts.factory.createNamedImports([
-                                ts.factory.createImportSpecifier(localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
-                            ])), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context))), 0);
+                                ts.factory.createImportSpecifier(false, localName !== verbatimTargetName ? ts.factory.createIdentifier(verbatimTargetName) : undefined, ts.factory.createIdentifier(localName))
+                            ])), ts.factory.createStringLiteral(getSpecifierForModuleSymbol(target.parent || target, context)), undefined), 0);
                             break;
-                        case 270:
+                        case 274:
                             var specifier = node.parent.parent.moduleSpecifier;
                             serializeExportSpecifier(ts.unescapeLeadingUnderscores(symbol.escapedName), specifier ? verbatimTargetName : targetName, specifier && ts.isStringLiteralLike(specifier) ? ts.factory.createStringLiteral(specifier.text) : undefined);
                             break;
-                        case 266:
+                        case 270:
                             serializeMaybeAliasAssignment(symbol);
                             break;
-                        case 216:
-                        case 201:
-                        case 202:
+                        case 220:
+                        case 205:
+                        case 206:
                             if (symbol.escapedName === "default" || symbol.escapedName === "export=") {
                                 serializeMaybeAliasAssignment(symbol);
                             }
@@ -41046,7 +43920,7 @@ var ts;
                     }
                 }
                 function serializeExportSpecifier(localName, targetName, specifier) {
-                    addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(localName !== targetName ? targetName : undefined, localName)]), specifier), 0);
+                    addResult(ts.factory.createExportDeclaration(undefined, undefined, false, ts.factory.createNamedExports([ts.factory.createExportSpecifier(false, localName !== targetName ? targetName : undefined, localName)]), specifier), 0);
                 }
                 function serializeMaybeAliasAssignment(symbol) {
                     if (symbol.flags & 4194304) {
@@ -41066,7 +43940,7 @@ var ts;
                             includePrivateSymbol(referenced || target);
                         }
                         var oldTrack = context.tracker.trackSymbol;
-                        context.tracker.trackSymbol = ts.noop;
+                        context.tracker.trackSymbol = function () { return false; };
                         if (isExportAssignmentCompatibleSymbolName) {
                             results.push(ts.factory.createExportAssignment(undefined, undefined, isExportEquals, symbolToExpression(target, context, 67108863)));
                         }
@@ -41114,8 +43988,7 @@ var ts;
                 function isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, hostSymbol) {
                     var ctxSrc = ts.getSourceFileOfNode(context.enclosingDeclaration);
                     return ts.getObjectFlags(typeToSerialize) & (16 | 32) &&
-                        !getIndexInfoOfType(typeToSerialize, 0) &&
-                        !getIndexInfoOfType(typeToSerialize, 1) &&
+                        !ts.length(getIndexInfosOfType(typeToSerialize)) &&
                         !isClassInstanceSide(typeToSerialize) &&
                         !!(ts.length(ts.filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || ts.length(getSignaturesOfType(typeToSerialize, 0))) &&
                         !ts.length(getSignaturesOfType(typeToSerialize, 1)) &&
@@ -41127,6 +44000,7 @@ var ts;
                 }
                 function makeSerializePropertySymbol(createProperty, methodKind, useAccessors) {
                     return function serializePropertySymbol(p, isStatic, baseType) {
+                        var _a, _b, _c, _d, _e;
                         var modifierFlags = ts.getDeclarationModifierFlagsFromSymbol(p);
                         var isPrivate = !!(modifierFlags & 8);
                         if (isStatic && (p.flags & (788968 | 1920 | 2097152))) {
@@ -41141,26 +44015,26 @@ var ts;
                         }
                         var flag = (modifierFlags & ~256) | (isStatic ? 32 : 0);
                         var name = getPropertyNameNodeForSymbol(p, context);
-                        var firstPropertyLikeDecl = ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression));
+                        var firstPropertyLikeDecl = (_a = p.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.or(ts.isPropertyDeclaration, ts.isAccessor, ts.isVariableDeclaration, ts.isPropertySignature, ts.isBinaryExpression, ts.isPropertyAccessExpression));
                         if (p.flags & 98304 && useAccessors) {
                             var result = [];
                             if (p.flags & 65536) {
-                                result.push(ts.setTextRange(ts.factory.createSetAccessorDeclaration(undefined, ts.factory.createModifiersFromModifierFlags(flag), name, [ts.factory.createParameterDeclaration(undefined, undefined, undefined, "arg", undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled))], undefined), ts.find(p.declarations, ts.isSetAccessor) || firstPropertyLikeDecl));
+                                result.push(ts.setTextRange(ts.factory.createSetAccessorDeclaration(undefined, ts.factory.createModifiersFromModifierFlags(flag), name, [ts.factory.createParameterDeclaration(undefined, undefined, undefined, "arg", undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled))], undefined), ((_b = p.declarations) === null || _b === void 0 ? void 0 : _b.find(ts.isSetAccessor)) || firstPropertyLikeDecl));
                             }
                             if (p.flags & 32768) {
                                 var isPrivate_1 = modifierFlags & 8;
-                                result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(undefined, ts.factory.createModifiersFromModifierFlags(flag), name, [], isPrivate_1 ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), undefined), ts.find(p.declarations, ts.isGetAccessor) || firstPropertyLikeDecl));
+                                result.push(ts.setTextRange(ts.factory.createGetAccessorDeclaration(undefined, ts.factory.createModifiersFromModifierFlags(flag), name, [], isPrivate_1 ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), undefined), ((_c = p.declarations) === null || _c === void 0 ? void 0 : _c.find(ts.isGetAccessor)) || firstPropertyLikeDecl));
                             }
                             return result;
                         }
                         else if (p.flags & (4 | 3 | 98304)) {
-                            return ts.setTextRange(createProperty(undefined, ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 : 0) | flag), name, p.flags & 16777216 ? ts.factory.createToken(57) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), undefined), ts.find(p.declarations, ts.or(ts.isPropertyDeclaration, ts.isVariableDeclaration)) || firstPropertyLikeDecl);
+                            return ts.setTextRange(createProperty(undefined, ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 : 0) | flag), name, p.flags & 16777216 ? ts.factory.createToken(57) : undefined, isPrivate ? undefined : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled), undefined), ((_d = p.declarations) === null || _d === void 0 ? void 0 : _d.find(ts.or(ts.isPropertyDeclaration, ts.isVariableDeclaration))) || firstPropertyLikeDecl);
                         }
                         if (p.flags & (8192 | 16)) {
                             var type = getTypeOfSymbol(p);
                             var signatures = getSignaturesOfType(type, 0);
                             if (flag & 8) {
-                                return ts.setTextRange(createProperty(undefined, ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 : 0) | flag), name, p.flags & 16777216 ? ts.factory.createToken(57) : undefined, undefined, undefined), ts.find(p.declarations, ts.isFunctionLikeDeclaration) || signatures[0] && signatures[0].declaration || p.declarations[0]);
+                                return ts.setTextRange(createProperty(undefined, ts.factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? 64 : 0) | flag), name, p.flags & 16777216 ? ts.factory.createToken(57) : undefined, undefined, undefined), ((_e = p.declarations) === null || _e === void 0 ? void 0 : _e.find(ts.isFunctionLikeDeclaration)) || signatures[0] && signatures[0].declaration || p.declarations && p.declarations[0]);
                             }
                             var results_1 = [];
                             for (var _i = 0, signatures_3 = signatures; _i < signatures_3.length; _i++) {
@@ -41170,11 +44044,12 @@ var ts;
                                     questionToken: p.flags & 16777216 ? ts.factory.createToken(57) : undefined,
                                     modifiers: flag ? ts.factory.createModifiersFromModifierFlags(flag) : undefined
                                 });
-                                results_1.push(ts.setTextRange(decl, sig.declaration));
+                                var location = sig.declaration && ts.isPrototypePropertyAssignment(sig.declaration.parent) ? sig.declaration.parent : sig.declaration;
+                                results_1.push(ts.setTextRange(decl, location));
                             }
                             return results_1;
                         }
-                        return ts.Debug.fail("Unhandled class member kind! " + (p.__debugFlags || p.flags));
+                        return ts.Debug.fail("Unhandled class member kind! ".concat(p.__debugFlags || p.flags));
                     };
                 }
                 function serializePropertySymbolForInterface(p, baseType) {
@@ -41225,20 +44100,17 @@ var ts;
                 }
                 function serializeIndexSignatures(input, baseType) {
                     var results = [];
-                    for (var _i = 0, _a = [0, 1]; _i < _a.length; _i++) {
-                        var type = _a[_i];
-                        var info = getIndexInfoOfType(input, type);
-                        if (info) {
-                            if (baseType) {
-                                var baseInfo = getIndexInfoOfType(baseType, type);
-                                if (baseInfo) {
-                                    if (isTypeIdenticalTo(info.type, baseInfo.type)) {
-                                        continue;
-                                    }
+                    for (var _i = 0, _a = getIndexInfosOfType(input); _i < _a.length; _i++) {
+                        var info = _a[_i];
+                        if (baseType) {
+                            var baseInfo = getIndexInfoOfType(baseType, info.keyType);
+                            if (baseInfo) {
+                                if (isTypeIdenticalTo(info.type, baseInfo.type)) {
+                                    continue;
                                 }
                             }
-                            results.push(indexInfoToIndexSignatureDeclarationHelper(info, type, context, undefined));
                         }
+                        results.push(indexInfoToIndexSignatureDeclarationHelper(info, context, undefined));
                     }
                     return results;
                 }
@@ -41247,7 +44119,7 @@ var ts;
                     if (ref) {
                         return ref;
                     }
-                    var tempName = getUnusedName(rootName + "_base");
+                    var tempName = getUnusedName("".concat(rootName, "_base"));
                     var statement = ts.factory.createVariableStatement(undefined, ts.factory.createVariableDeclarationList([
                         ts.factory.createVariableDeclaration(tempName, undefined, typeToTypeNodeHelper(staticType, context))
                     ], 2));
@@ -41292,7 +44164,7 @@ var ts;
                     var original = input;
                     while ((_a = context.usedSymbolNames) === null || _a === void 0 ? void 0 : _a.has(input)) {
                         i++;
-                        input = original + "_" + i;
+                        input = "".concat(original, "_").concat(i);
                     }
                     (_b = context.usedSymbolNames) === null || _b === void 0 ? void 0 : _b.add(input);
                     if (id) {
@@ -41332,7 +44204,7 @@ var ts;
             if (flags === void 0) { flags = 16384; }
             return writer ? typePredicateToStringWorker(writer).getText() : ts.usingSingleLineStringWriter(typePredicateToStringWorker);
             function typePredicateToStringWorker(writer) {
-                var predicate = ts.factory.createTypePredicateNode(typePredicate.kind === 2 || typePredicate.kind === 3 ? ts.factory.createToken(127) : undefined, typePredicate.kind === 1 || typePredicate.kind === 3 ? ts.factory.createIdentifier(typePredicate.parameterName) : ts.factory.createThisTypeNode(), typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 | 512));
+                var predicate = ts.factory.createTypePredicateNode(typePredicate.kind === 2 || typePredicate.kind === 3 ? ts.factory.createToken(128) : undefined, typePredicate.kind === 1 || typePredicate.kind === 3 ? ts.factory.createIdentifier(typePredicate.parameterName) : ts.factory.createThisTypeNode(), typePredicate.type && nodeBuilder.typeToTypeNode(typePredicate.type, enclosingDeclaration, toNodeBuilderFlags(flags) | 70221824 | 512));
                 var printer = ts.createPrinter({ removeComments: true });
                 var sourceFile = enclosingDeclaration && ts.getSourceFileOfNode(enclosingDeclaration);
                 printer.writeNode(4, predicate, sourceFile, writer);
@@ -41376,9 +44248,9 @@ var ts;
             return "public";
         }
         function getTypeAliasForTypeLiteral(type) {
-            if (type.symbol && type.symbol.flags & 2048) {
+            if (type.symbol && type.symbol.flags & 2048 && type.symbol.declarations) {
                 var node = ts.walkUpParenthesizedTypes(type.symbol.declarations[0].parent);
-                if (node.kind === 254) {
+                if (node.kind === 258) {
                     return getSymbolOfNode(node);
                 }
             }
@@ -41386,27 +44258,27 @@ var ts;
         }
         function isTopLevelInExternalModuleAugmentation(node) {
             return node && node.parent &&
-                node.parent.kind === 257 &&
+                node.parent.kind === 261 &&
                 ts.isExternalModuleAugmentation(node.parent.parent);
         }
         function isDefaultBindingContext(location) {
-            return location.kind === 297 || ts.isAmbientModule(location);
+            return location.kind === 303 || ts.isAmbientModule(location);
         }
         function getNameOfSymbolFromNameType(symbol, context) {
             var nameType = getSymbolLinks(symbol).nameType;
             if (nameType) {
                 if (nameType.flags & 384) {
                     var name = "" + nameType.value;
-                    if (!ts.isIdentifierText(name, compilerOptions.target) && !isNumericLiteralName(name)) {
-                        return "\"" + ts.escapeString(name, 34) + "\"";
+                    if (!ts.isIdentifierText(name, ts.getEmitScriptTarget(compilerOptions)) && !isNumericLiteralName(name)) {
+                        return "\"".concat(ts.escapeString(name, 34), "\"");
                     }
                     if (isNumericLiteralName(name) && ts.startsWith(name, "-")) {
-                        return "[" + name + "]";
+                        return "[".concat(name, "]");
                     }
                     return name;
                 }
                 if (nameType.flags & 8192) {
-                    return "[" + getNameOfSymbolAsWritten(nameType.symbol, context) + "]";
+                    return "[".concat(getNameOfSymbolAsWritten(nameType.symbol, context), "]");
                 }
             }
         }
@@ -41438,17 +44310,17 @@ var ts;
                 if (!declaration) {
                     declaration = symbol.declarations[0];
                 }
-                if (declaration.parent && declaration.parent.kind === 249) {
+                if (declaration.parent && declaration.parent.kind === 253) {
                     return ts.declarationNameToString(declaration.parent.name);
                 }
                 switch (declaration.kind) {
-                    case 221:
-                    case 208:
-                    case 209:
+                    case 225:
+                    case 212:
+                    case 213:
                         if (context && !context.encounteredError && !(context.flags & 131072)) {
                             context.encounteredError = true;
                         }
-                        return declaration.kind === 221 ? "(Anonymous class)" : "(Anonymous function)";
+                        return declaration.kind === 225 ? "(Anonymous class)" : "(Anonymous function)";
                 }
             }
             var name = getNameOfSymbolFromNameType(symbol, context);
@@ -41465,68 +44337,68 @@ var ts;
             return false;
             function determineIfDeclarationIsVisible() {
                 switch (node.kind) {
-                    case 324:
-                    case 331:
-                    case 325:
+                    case 336:
+                    case 343:
+                    case 337:
                         return !!(node.parent && node.parent.parent && node.parent.parent.parent && ts.isSourceFile(node.parent.parent.parent));
-                    case 198:
+                    case 202:
                         return isDeclarationVisible(node.parent.parent);
-                    case 249:
+                    case 253:
                         if (ts.isBindingPattern(node.name) &&
                             !node.name.elements.length) {
                             return false;
                         }
+                    case 260:
                     case 256:
-                    case 252:
-                    case 253:
-                    case 254:
-                    case 251:
+                    case 257:
+                    case 258:
                     case 255:
-                    case 260:
+                    case 259:
+                    case 264:
                         if (ts.isExternalModuleAugmentation(node)) {
                             return true;
                         }
                         var parent = getDeclarationContainer(node);
                         if (!(ts.getCombinedModifierFlags(node) & 1) &&
-                            !(node.kind !== 260 && parent.kind !== 297 && parent.flags & 8388608)) {
+                            !(node.kind !== 264 && parent.kind !== 303 && parent.flags & 8388608)) {
                             return isGlobalSourceFile(parent);
                         }
                         return isDeclarationVisible(parent);
-                    case 163:
-                    case 162:
-                    case 167:
-                    case 168:
+                    case 166:
                     case 165:
-                    case 164:
+                    case 171:
+                    case 172:
+                    case 168:
+                    case 167:
                         if (ts.hasEffectiveModifier(node, 8 | 16)) {
                             return false;
                         }
-                    case 166:
                     case 170:
-                    case 169:
-                    case 171:
-                    case 160:
-                    case 257:
                     case 174:
-                    case 175:
-                    case 177:
                     case 173:
+                    case 175:
+                    case 163:
+                    case 261:
                     case 178:
                     case 179:
+                    case 181:
+                    case 177:
                     case 182:
                     case 183:
                     case 186:
-                    case 192:
+                    case 187:
+                    case 190:
+                    case 196:
                         return isDeclarationVisible(node.parent);
-                    case 262:
-                    case 263:
-                    case 265:
+                    case 266:
+                    case 267:
+                    case 269:
                         return false;
-                    case 159:
-                    case 297:
-                    case 259:
+                    case 162:
+                    case 303:
+                    case 263:
                         return true;
-                    case 266:
+                    case 270:
                         return false;
                     default:
                         return false;
@@ -41535,10 +44407,10 @@ var ts;
         }
         function collectLinkedAliases(node, setVisibility) {
             var exportSymbol;
-            if (node.parent && node.parent.kind === 266) {
+            if (node.parent && node.parent.kind === 270) {
                 exportSymbol = resolveName(node, node.escapedText, 111551 | 788968 | 1920 | 2097152, undefined, node, false);
             }
-            else if (node.parent.kind === 270) {
+            else if (node.parent.kind === 274) {
                 exportSymbol = getTargetOfExportSpecifier(node.parent, 111551 | 788968 | 1920 | 2097152);
             }
             var result;
@@ -41626,12 +44498,12 @@ var ts;
         function getDeclarationContainer(node) {
             return ts.findAncestor(ts.getRootDeclaration(node), function (node) {
                 switch (node.kind) {
-                    case 249:
-                    case 250:
-                    case 265:
-                    case 264:
-                    case 263:
-                    case 262:
+                    case 253:
+                    case 254:
+                    case 269:
+                    case 268:
+                    case 267:
+                    case 266:
                         return false;
                     default:
                         return true;
@@ -41647,11 +44519,15 @@ var ts;
             return prop ? getTypeOfSymbol(prop) : undefined;
         }
         function getTypeOfPropertyOrIndexSignature(type, name) {
-            return getTypeOfPropertyOfType(type, name) || isNumericLiteralName(name) && getIndexTypeOfType(type, 1) || getIndexTypeOfType(type, 0) || unknownType;
+            var _a;
+            return getTypeOfPropertyOfType(type, name) || ((_a = getApplicableIndexInfoForName(type, name)) === null || _a === void 0 ? void 0 : _a.type) || unknownType;
         }
         function isTypeAny(type) {
             return type && (type.flags & 1) !== 0;
         }
+        function isErrorType(type) {
+            return type === errorType || !!(type.flags & 1 && type.aliasSymbol);
+        }
         function getTypeForBindingElementParent(node) {
             var symbol = getSymbolOfNode(node);
             return symbol && getSymbolLinks(symbol).type || getTypeForVariableLikeDeclaration(node, false);
@@ -41684,12 +44560,17 @@ var ts;
                     members.set(prop.escapedName, getSpreadSymbol(prop, false));
                 }
             }
-            var stringIndexInfo = getIndexInfoOfType(source, 0);
-            var numberIndexInfo = getIndexInfoOfType(source, 1);
-            var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo);
-            result.objectFlags |= 131072;
+            var result = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfosOfType(source));
+            result.objectFlags |= 8388608;
             return result;
         }
+        function isGenericTypeWithUndefinedConstraint(type) {
+            return !!(type.flags & 465829888) && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 32768);
+        }
+        function getNonUndefinedType(type) {
+            var typeOrConstraint = someType(type, isGenericTypeWithUndefinedConstraint) ? mapType(type, function (t) { return t.flags & 465829888 ? getBaseConstraintOrType(t) : t; }) : type;
+            return getTypeWithFacts(typeOrConstraint, 524288);
+        }
         function getFlowTypeOfDestructuring(node, declaredType) {
             var reference = getSyntheticElementAccess(node);
             return reference ? getFlowTypeOfReference(reference, declaredType) : declaredType;
@@ -41715,23 +44596,23 @@ var ts;
         function getParentElementAccess(node) {
             var ancestor = node.parent.parent;
             switch (ancestor.kind) {
-                case 198:
-                case 288:
+                case 202:
+                case 294:
                     return getSyntheticElementAccess(ancestor);
-                case 199:
+                case 203:
                     return getSyntheticElementAccess(node.parent);
-                case 249:
+                case 253:
                     return ancestor.initializer;
-                case 216:
+                case 220:
                     return ancestor.right;
             }
         }
         function getDestructuringPropertyName(node) {
             var parent = node.parent;
-            if (node.kind === 198 && parent.kind === 196) {
+            if (node.kind === 202 && parent.kind === 200) {
                 return getLiteralPropertyNameText(node.propertyName || node.name);
             }
-            if (node.kind === 288 || node.kind === 289) {
+            if (node.kind === 294 || node.kind === 295) {
                 return getLiteralPropertyNameText(node.name);
             }
             return "" + parent.elements.indexOf(node);
@@ -41753,7 +44634,7 @@ var ts;
                 parentType = getTypeWithFacts(parentType, 524288);
             }
             var type;
-            if (pattern.kind === 196) {
+            if (pattern.kind === 200) {
                 if (declaration.dotDotDotToken) {
                     parentType = getReducedType(parentType);
                     if (parentType.flags & 2 || !isValidSpreadType(parentType)) {
@@ -41772,7 +44653,7 @@ var ts;
                 else {
                     var name = declaration.propertyName || declaration.name;
                     var indexType = getLiteralTypeFromPropertyName(name);
-                    var declaredType = getConstraintForLocation(getIndexedAccessType(parentType, indexType, undefined, name, undefined, undefined, 16), declaration.name);
+                    var declaredType = getIndexedAccessType(parentType, indexType, 32, name);
                     type = getFlowTypeOfDestructuring(declaration, declaredType);
                 }
             }
@@ -41785,9 +44666,9 @@ var ts;
                         createArrayType(elementType);
                 }
                 else if (isArrayLikeType(parentType)) {
-                    var indexType = getLiteralType(index_2);
-                    var accessFlags = hasDefaultValue(declaration) ? 8 : 0;
-                    var declaredType = getConstraintForLocation(getIndexedAccessTypeOrUndefined(parentType, indexType, undefined, declaration.name, accessFlags | 16) || errorType, declaration.name);
+                    var indexType = getNumberLiteralType(index_2);
+                    var accessFlags = 32 | (hasDefaultValue(declaration) ? 16 : 0);
+                    var declaredType = getIndexedAccessTypeOrUndefined(parentType, indexType, accessFlags, declaration.name) || errorType;
                     type = getFlowTypeOfDestructuring(declaration, declaredType);
                 }
                 else {
@@ -41798,11 +44679,9 @@ var ts;
                 return type;
             }
             if (ts.getEffectiveTypeAnnotationNode(ts.walkUpBindingElementsAndPatterns(declaration))) {
-                return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & 32768) ?
-                    getTypeWithFacts(type, 524288) :
-                    type;
+                return strictNullChecks && !(getFalsyFlags(checkDeclarationInitializer(declaration)) & 32768) ? getNonUndefinedType(type) : type;
             }
-            return widenTypeInferredFromInitializer(declaration, getUnionType([getTypeWithFacts(type, 524288), checkDeclarationInitializer(declaration)], 2));
+            return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration)], 2));
         }
         function getTypeForDeclarationFromJSDocComment(declaration) {
             var jsdocType = ts.getJSDocType(declaration);
@@ -41812,35 +44691,37 @@ var ts;
             return undefined;
         }
         function isNullOrUndefined(node) {
-            var expr = ts.skipParentheses(node);
-            return expr.kind === 103 || expr.kind === 78 && getResolvedSymbol(expr) === undefinedSymbol;
+            var expr = ts.skipParentheses(node, true);
+            return expr.kind === 104 || expr.kind === 79 && getResolvedSymbol(expr) === undefinedSymbol;
         }
         function isEmptyArrayLiteral(node) {
-            var expr = ts.skipParentheses(node);
-            return expr.kind === 199 && expr.elements.length === 0;
+            var expr = ts.skipParentheses(node, true);
+            return expr.kind === 203 && expr.elements.length === 0;
         }
-        function addOptionality(type, optional) {
-            if (optional === void 0) { optional = true; }
-            return strictNullChecks && optional ? getOptionalType(type) : type;
+        function addOptionality(type, isProperty, isOptional) {
+            if (isProperty === void 0) { isProperty = false; }
+            if (isOptional === void 0) { isOptional = true; }
+            return strictNullChecks && isOptional ? getOptionalType(type, isProperty) : type;
         }
         function getTypeForVariableLikeDeclaration(declaration, includeOptionality) {
-            if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 238) {
+            if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 242) {
                 var indexType = getIndexType(getNonNullableTypeIfNeeded(checkExpression(declaration.parent.parent.expression)));
                 return indexType.flags & (262144 | 4194304) ? getExtractStringType(indexType) : stringType;
             }
-            if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 239) {
+            if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 243) {
                 var forOfStatement = declaration.parent.parent;
                 return checkRightHandSideOfForOf(forOfStatement) || anyType;
             }
             if (ts.isBindingPattern(declaration.parent)) {
                 return getTypeForBindingElement(declaration);
             }
-            var isOptional = includeOptionality && (ts.isParameter(declaration) && isJSDocOptionalParameter(declaration)
-                || isOptionalJSDocPropertyLikeTag(declaration)
-                || !ts.isBindingElement(declaration) && !ts.isVariableDeclaration(declaration) && !!declaration.questionToken);
+            var isProperty = ts.isPropertyDeclaration(declaration) || ts.isPropertySignature(declaration);
+            var isOptional = includeOptionality && (isProperty && !!declaration.questionToken ||
+                ts.isParameter(declaration) && (!!declaration.questionToken || isJSDocOptionalParameter(declaration)) ||
+                isOptionalJSDocPropertyLikeTag(declaration));
             var declaredType = tryGetTypeFromEffectiveTypeNode(declaration);
             if (declaredType) {
-                return addOptionality(declaredType, isOptional);
+                return addOptionality(declaredType, isProperty, isOptional);
             }
             if ((noImplicitAny || ts.isInJSFile(declaration)) &&
                 ts.isVariableDeclaration(declaration) && !ts.isBindingPattern(declaration.name) &&
@@ -41854,8 +44735,8 @@ var ts;
             }
             if (ts.isParameter(declaration)) {
                 var func = declaration.parent;
-                if (func.kind === 168 && hasBindableName(func)) {
-                    var getter = ts.getDeclarationOfKind(getSymbolOfNode(declaration.parent), 167);
+                if (func.kind === 172 && hasBindableName(func)) {
+                    var getter = ts.getDeclarationOfKind(getSymbolOfNode(declaration.parent), 171);
                     if (getter) {
                         var getterSignature = getSignatureFromDeclaration(getter);
                         var thisParameter = getAccessorThisParameter(func);
@@ -41876,7 +44757,7 @@ var ts;
                 }
                 var type = declaration.symbol.escapedName === "this" ? getContextualThisParameterType(func) : getContextuallyTypedParameterType(declaration);
                 if (type) {
-                    return addOptionality(type, isOptional);
+                    return addOptionality(type, false, isOptional);
                 }
             }
             if (ts.hasOnlyExpressionInitializer(declaration) && !!declaration.initializer) {
@@ -41887,14 +44768,23 @@ var ts;
                     }
                 }
                 var type = widenTypeInferredFromInitializer(declaration, checkDeclarationInitializer(declaration));
-                return addOptionality(type, isOptional);
+                return addOptionality(type, isProperty, isOptional);
             }
-            if (ts.isPropertyDeclaration(declaration) && !ts.hasStaticModifier(declaration) && (noImplicitAny || ts.isInJSFile(declaration))) {
-                var constructor = findConstructorDeclaration(declaration.parent);
-                var type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) :
-                    ts.getEffectiveModifierFlags(declaration) & 2 ? getTypeOfPropertyInBaseClass(declaration.symbol) :
-                        undefined;
-                return type && addOptionality(type, isOptional);
+            if (ts.isPropertyDeclaration(declaration) && (noImplicitAny || ts.isInJSFile(declaration))) {
+                if (!ts.hasStaticModifier(declaration)) {
+                    var constructor = findConstructorDeclaration(declaration.parent);
+                    var type = constructor ? getFlowTypeInConstructor(declaration.symbol, constructor) :
+                        ts.getEffectiveModifierFlags(declaration) & 2 ? getTypeOfPropertyInBaseClass(declaration.symbol) :
+                            undefined;
+                    return type && addOptionality(type, true, isOptional);
+                }
+                else {
+                    var staticBlocks = ts.filter(declaration.parent.members, ts.isClassStaticBlockDeclaration);
+                    var type = staticBlocks.length ? getFlowTypeInStaticBlocks(declaration.symbol, staticBlocks) :
+                        ts.getEffectiveModifierFlags(declaration) & 2 ? getTypeOfPropertyInBaseClass(declaration.symbol) :
+                            undefined;
+                    return type && addOptionality(type, true, isOptional);
+                }
             }
             if (ts.isJsxAttribute(declaration)) {
                 return trueType;
@@ -41912,7 +44802,7 @@ var ts;
                     links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && ts.every(symbol.declarations, function (declaration) {
                         return ts.isBinaryExpression(declaration) &&
                             isPossiblyAliasedThisProperty(declaration) &&
-                            (declaration.left.kind !== 202 || ts.isStringOrNumericLiteralLike(declaration.left.argumentExpression)) &&
+                            (declaration.left.kind !== 206 || ts.isStringOrNumericLiteralLike(declaration.left.argumentExpression)) &&
                             !getAnnotatedTypeForAssignmentDeclaration(undefined, declaration, symbol, declaration);
                     });
                 }
@@ -41926,13 +44816,52 @@ var ts;
                 !declaration.initializer && (noImplicitAny || ts.isInJSFile(declaration));
         }
         function getDeclaringConstructor(symbol) {
+            if (!symbol.declarations) {
+                return;
+            }
             for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
                 var declaration = _a[_i];
                 var container = ts.getThisContainer(declaration, false);
-                if (container && (container.kind === 166 || isJSConstructor(container))) {
+                if (container && (container.kind === 170 || isJSConstructor(container))) {
                     return container;
                 }
             }
+            ;
+        }
+        function getFlowTypeFromCommonJSExport(symbol) {
+            var file = ts.getSourceFileOfNode(symbol.declarations[0]);
+            var accessName = ts.unescapeLeadingUnderscores(symbol.escapedName);
+            var areAllModuleExports = symbol.declarations.every(function (d) { return ts.isInJSFile(d) && ts.isAccessExpression(d) && ts.isModuleExportsAccessExpression(d.expression); });
+            var reference = areAllModuleExports
+                ? ts.factory.createPropertyAccessExpression(ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier("module"), ts.factory.createIdentifier("exports")), accessName)
+                : ts.factory.createPropertyAccessExpression(ts.factory.createIdentifier("exports"), accessName);
+            if (areAllModuleExports) {
+                ts.setParent(reference.expression.expression, reference.expression);
+            }
+            ts.setParent(reference.expression, reference);
+            ts.setParent(reference, file);
+            reference.flowNode = file.endFlowNode;
+            return getFlowTypeOfReference(reference, autoType, undefinedType);
+        }
+        function getFlowTypeInStaticBlocks(symbol, staticBlocks) {
+            var accessName = ts.startsWith(symbol.escapedName, "__#")
+                ? ts.factory.createPrivateIdentifier(symbol.escapedName.split("@")[1])
+                : ts.unescapeLeadingUnderscores(symbol.escapedName);
+            for (var _i = 0, staticBlocks_1 = staticBlocks; _i < staticBlocks_1.length; _i++) {
+                var staticBlock = staticBlocks_1[_i];
+                var reference = ts.factory.createPropertyAccessExpression(ts.factory.createThis(), accessName);
+                ts.setParent(reference.expression, reference);
+                ts.setParent(reference, staticBlock);
+                reference.flowNode = staticBlock.returnFlowNode;
+                var flowType = getFlowTypeOfProperty(reference, symbol);
+                if (noImplicitAny && (flowType === autoType || flowType === autoArrayType)) {
+                    error(symbol.valueDeclaration, ts.Diagnostics.Member_0_implicitly_has_an_1_type, symbolToString(symbol), typeToString(flowType));
+                }
+                if (everyType(flowType, isNullableType)) {
+                    continue;
+                }
+                return convertAutoToAny(flowType);
+            }
         }
         function getFlowTypeInConstructor(symbol, constructor) {
             var accessName = ts.startsWith(symbol.escapedName, "__#")
@@ -41949,7 +44878,10 @@ var ts;
             return everyType(flowType, isNullableType) ? undefined : convertAutoToAny(flowType);
         }
         function getFlowTypeOfProperty(reference, prop) {
-            var initialType = prop && (!isAutoTypedProperty(prop) || ts.getEffectiveModifierFlags(prop.valueDeclaration) & 2) && getTypeOfPropertyInBaseClass(prop) || undefinedType;
+            var initialType = (prop === null || prop === void 0 ? void 0 : prop.valueDeclaration)
+                && (!isAutoTypedProperty(prop) || ts.getEffectiveModifierFlags(prop.valueDeclaration) & 2)
+                && getTypeOfPropertyInBaseClass(prop)
+                || undefinedType;
             return getFlowTypeOfReference(reference, autoType, initialType);
         }
         function getWidenedTypeForAssignmentDeclaration(symbol, resolvedSymbol) {
@@ -41959,7 +44891,7 @@ var ts;
                 if (tag && tag.typeExpression) {
                     return getTypeFromTypeNode(tag.typeExpression);
                 }
-                var containerObjectType = getJSContainerObjectType(symbol.valueDeclaration, symbol, container);
+                var containerObjectType = symbol.valueDeclaration && getJSContainerObjectType(symbol.valueDeclaration, symbol, container);
                 return containerObjectType || getWidenedLiteralType(checkExpressionCached(container));
             }
             var type;
@@ -41969,40 +44901,42 @@ var ts;
                 type = getFlowTypeInConstructor(symbol, getDeclaringConstructor(symbol));
             }
             if (!type) {
-                var jsdocType = void 0;
                 var types = void 0;
-                for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
-                    var declaration = _a[_i];
-                    var expression = (ts.isBinaryExpression(declaration) || ts.isCallExpression(declaration)) ? declaration :
-                        ts.isAccessExpression(declaration) ? ts.isBinaryExpression(declaration.parent) ? declaration.parent : declaration :
-                            undefined;
-                    if (!expression) {
-                        continue;
-                    }
-                    var kind = ts.isAccessExpression(expression)
-                        ? ts.getAssignmentDeclarationPropertyAccessKind(expression)
-                        : ts.getAssignmentDeclarationKind(expression);
-                    if (kind === 4 || ts.isBinaryExpression(expression) && isPossiblyAliasedThisProperty(expression, kind)) {
-                        if (isDeclarationInConstructor(expression)) {
-                            definedInConstructor = true;
+                if (symbol.declarations) {
+                    var jsdocType = void 0;
+                    for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+                        var declaration = _a[_i];
+                        var expression = (ts.isBinaryExpression(declaration) || ts.isCallExpression(declaration)) ? declaration :
+                            ts.isAccessExpression(declaration) ? ts.isBinaryExpression(declaration.parent) ? declaration.parent : declaration :
+                                undefined;
+                        if (!expression) {
+                            continue;
                         }
-                        else {
-                            definedInMethod = true;
+                        var kind = ts.isAccessExpression(expression)
+                            ? ts.getAssignmentDeclarationPropertyAccessKind(expression)
+                            : ts.getAssignmentDeclarationKind(expression);
+                        if (kind === 4 || ts.isBinaryExpression(expression) && isPossiblyAliasedThisProperty(expression, kind)) {
+                            if (isDeclarationInConstructor(expression)) {
+                                definedInConstructor = true;
+                            }
+                            else {
+                                definedInMethod = true;
+                            }
+                        }
+                        if (!ts.isCallExpression(expression)) {
+                            jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol, declaration);
+                        }
+                        if (!jsdocType) {
+                            (types || (types = [])).push((ts.isBinaryExpression(expression) || ts.isCallExpression(expression)) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType);
                         }
                     }
-                    if (!ts.isCallExpression(expression)) {
-                        jsdocType = getAnnotatedTypeForAssignmentDeclaration(jsdocType, expression, symbol, declaration);
-                    }
-                    if (!jsdocType) {
-                        (types || (types = [])).push((ts.isBinaryExpression(expression) || ts.isCallExpression(expression)) ? getInitializerTypeFromAssignmentDeclaration(symbol, resolvedSymbol, expression, kind) : neverType);
-                    }
+                    type = jsdocType;
                 }
-                type = jsdocType;
                 if (!type) {
                     if (!ts.length(types)) {
                         return errorType;
                     }
-                    var constructorTypes = definedInConstructor ? getConstructorDefinedThisAssignmentTypes(types, symbol.declarations) : undefined;
+                    var constructorTypes = definedInConstructor && symbol.declarations ? getConstructorDefinedThisAssignmentTypes(types, symbol.declarations) : undefined;
                     if (definedInMethod) {
                         var propType = getTypeOfPropertyInBaseClass(symbol);
                         if (propType) {
@@ -42014,8 +44948,8 @@ var ts;
                     type = getUnionType(sourceTypes, 2);
                 }
             }
-            var widened = getWidenedType(addOptionality(type, definedInMethod && !definedInConstructor));
-            if (filterType(widened, function (t) { return !!(t.flags & ~98304); }) === neverType) {
+            var widened = getWidenedType(addOptionality(type, false, definedInMethod && !definedInConstructor));
+            if (symbol.valueDeclaration && filterType(widened, function (t) { return !!(t.flags & ~98304); }) === neverType) {
                 reportImplicitAny(symbol.valueDeclaration, anyType);
                 return anyType;
             }
@@ -42038,25 +44972,29 @@ var ts;
             if ((_b = s === null || s === void 0 ? void 0 : s.exports) === null || _b === void 0 ? void 0 : _b.size) {
                 mergeSymbolTable(exports, s.exports);
             }
-            var type = createAnonymousType(symbol, exports, ts.emptyArray, ts.emptyArray, undefined, undefined);
-            type.objectFlags |= 16384;
+            var type = createAnonymousType(symbol, exports, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+            type.objectFlags |= 8192;
             return type;
         }
         function getAnnotatedTypeForAssignmentDeclaration(declaredType, expression, symbol, declaration) {
+            var _a;
             var typeNode = ts.getEffectiveTypeAnnotationNode(expression.parent);
             if (typeNode) {
                 var type = getWidenedType(getTypeFromTypeNode(typeNode));
                 if (!declaredType) {
                     return type;
                 }
-                else if (declaredType !== errorType && type !== errorType && !isTypeIdenticalTo(declaredType, type)) {
+                else if (!isErrorType(declaredType) && !isErrorType(type) && !isTypeIdenticalTo(declaredType, type)) {
                     errorNextVariableOrPropertyDeclarationMustHaveSameType(undefined, declaredType, declaration, type);
                 }
             }
-            if (symbol.parent) {
+            if ((_a = symbol.parent) === null || _a === void 0 ? void 0 : _a.valueDeclaration) {
                 var typeNode_2 = ts.getEffectiveTypeAnnotationNode(symbol.parent.valueDeclaration);
                 if (typeNode_2) {
-                    return getTypeOfPropertyOfType(getTypeFromTypeNode(typeNode_2), symbol.escapedName);
+                    var annotationSymbol = getPropertyOfType(getTypeFromTypeNode(typeNode_2), symbol.escapedName);
+                    if (annotationSymbol) {
+                        return getNonMissingTypeOfSymbol(annotationSymbol);
+                    }
                 }
             }
             return declaredType;
@@ -42106,7 +45044,7 @@ var ts;
                     var exportedMember = members_4.get(name);
                     if (exportedMember && exportedMember !== s) {
                         if (s.flags & 111551 && exportedMember.flags & 111551) {
-                            if (ts.getSourceFileOfNode(s.valueDeclaration) !== ts.getSourceFileOfNode(exportedMember.valueDeclaration)) {
+                            if (s.valueDeclaration && exportedMember.valueDeclaration && ts.getSourceFileOfNode(s.valueDeclaration) !== ts.getSourceFileOfNode(exportedMember.valueDeclaration)) {
                                 var unescapedName = ts.unescapeLeadingUnderscores(s.escapedName);
                                 var exportedMemberName = ((_a = ts.tryCast(exportedMember.valueDeclaration, ts.isNamedDeclaration)) === null || _a === void 0 ? void 0 : _a.name) || exportedMember.valueDeclaration;
                                 ts.addRelatedInfo(error(s.valueDeclaration, ts.Diagnostics.Duplicate_identifier_0, unescapedName), ts.createDiagnosticForNode(exportedMemberName, ts.Diagnostics._0_was_also_declared_here, unescapedName));
@@ -42126,10 +45064,10 @@ var ts;
                         members_4.set(name, s);
                     }
                 });
-                var result = createAnonymousType(initialSize !== members_4.size ? undefined : exportedType.symbol, members_4, exportedType.callSignatures, exportedType.constructSignatures, exportedType.stringIndexInfo, exportedType.numberIndexInfo);
-                result.objectFlags |= (ts.getObjectFlags(type) & 16384);
+                var result = createAnonymousType(initialSize !== members_4.size ? undefined : exportedType.symbol, members_4, exportedType.callSignatures, exportedType.constructSignatures, exportedType.indexInfos);
+                result.objectFlags |= (ts.getObjectFlags(type) & 8192);
                 if (result.symbol && result.symbol.flags & 32 && type === getDeclaredTypeOfClassOrInterface(result.symbol)) {
-                    result.objectFlags |= 1073741824;
+                    result.objectFlags |= 16777216;
                 }
                 return result;
             }
@@ -42141,14 +45079,14 @@ var ts;
         }
         function containsSameNamedThisProperty(thisProperty, expression) {
             return ts.isPropertyAccessExpression(thisProperty)
-                && thisProperty.expression.kind === 107
+                && thisProperty.expression.kind === 108
                 && ts.forEachChildRecursively(expression, function (n) { return isMatchingReference(thisProperty, n); });
         }
         function isDeclarationInConstructor(expression) {
             var thisContainer = ts.getThisContainer(expression, false);
-            return thisContainer.kind === 166 ||
-                thisContainer.kind === 251 ||
-                (thisContainer.kind === 208 && !ts.isPrototypePropertyAssignment(thisContainer.parent));
+            return thisContainer.kind === 170 ||
+                thisContainer.kind === 255 ||
+                (thisContainer.kind === 212 && !ts.isPrototypePropertyAssignment(thisContainer.parent));
         }
         function getConstructorDefinedThisAssignmentTypes(types, declarations) {
             ts.Debug.assert(types.length === declarations.length);
@@ -42175,11 +45113,11 @@ var ts;
         function getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors) {
             var members = ts.createSymbolTable();
             var stringIndexInfo;
-            var objectFlags = 128 | 1048576;
+            var objectFlags = 128 | 262144;
             ts.forEach(pattern.elements, function (e) {
                 var name = e.propertyName || e.name;
                 if (e.dotDotDotToken) {
-                    stringIndexInfo = createIndexInfo(anyType, false);
+                    stringIndexInfo = createIndexInfo(stringType, anyType, false);
                     return;
                 }
                 var exprType = getLiteralTypeFromPropertyName(name);
@@ -42194,18 +45132,18 @@ var ts;
                 symbol.bindingElement = e;
                 members.set(symbol.escapedName, symbol);
             });
-            var result = createAnonymousType(undefined, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, undefined);
+            var result = createAnonymousType(undefined, members, ts.emptyArray, ts.emptyArray, stringIndexInfo ? [stringIndexInfo] : ts.emptyArray);
             result.objectFlags |= objectFlags;
             if (includePatternInType) {
                 result.pattern = pattern;
-                result.objectFlags |= 1048576;
+                result.objectFlags |= 262144;
             }
             return result;
         }
         function getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors) {
             var elements = pattern.elements;
             var lastElement = ts.lastOrUndefined(elements);
-            var restElement = lastElement && lastElement.kind === 198 && lastElement.dotDotDotToken ? lastElement : undefined;
+            var restElement = lastElement && lastElement.kind === 202 && lastElement.dotDotDotToken ? lastElement : undefined;
             if (elements.length === 0 || elements.length === 1 && restElement) {
                 return languageVersion >= 2 ? createIterableType(anyType) : anyArrayType;
             }
@@ -42216,22 +45154,30 @@ var ts;
             if (includePatternInType) {
                 result = cloneTypeReference(result);
                 result.pattern = pattern;
-                result.objectFlags |= 1048576;
+                result.objectFlags |= 262144;
             }
             return result;
         }
         function getTypeFromBindingPattern(pattern, includePatternInType, reportErrors) {
             if (includePatternInType === void 0) { includePatternInType = false; }
             if (reportErrors === void 0) { reportErrors = false; }
-            return pattern.kind === 196
+            return pattern.kind === 200
                 ? getTypeFromObjectBindingPattern(pattern, includePatternInType, reportErrors)
                 : getTypeFromArrayBindingPattern(pattern, includePatternInType, reportErrors);
         }
         function getWidenedTypeForVariableLikeDeclaration(declaration, reportErrors) {
             return widenTypeForVariableLikeDeclaration(getTypeForVariableLikeDeclaration(declaration, true), declaration, reportErrors);
         }
+        function isGlobalSymbolConstructor(node) {
+            var symbol = getSymbolOfNode(node);
+            var globalSymbol = getGlobalESSymbolConstructorTypeSymbol(false);
+            return globalSymbol && symbol && symbol === globalSymbol;
+        }
         function widenTypeForVariableLikeDeclaration(type, declaration, reportErrors) {
             if (type) {
+                if (type.flags & 4096 && isGlobalSymbolConstructor(declaration.parent)) {
+                    type = getESSymbolLikeTypeForNode(declaration);
+                }
                 if (reportErrors) {
                     reportErrorsFromWidening(declaration, type);
                 }
@@ -42250,7 +45196,7 @@ var ts;
         }
         function declarationBelongsToPrivateAmbientMember(declaration) {
             var root = ts.getRootDeclaration(declaration);
-            var memberDeclaration = root.kind === 160 ? root.parent : root;
+            var memberDeclaration = root.kind === 163 ? root.parent : root;
             return isPrivateWithinAmbient(memberDeclaration);
         }
         function tryGetTypeFromEffectiveTypeNode(declaration) {
@@ -42276,7 +45222,7 @@ var ts;
             if (symbol === requireSymbol) {
                 return anyType;
             }
-            if (symbol.flags & 134217728) {
+            if (symbol.flags & 134217728 && symbol.valueDeclaration) {
                 var fileSymbol = getSymbolOfNode(ts.getSourceFileOfNode(symbol.valueDeclaration));
                 var result = createSymbol(fileSymbol.flags, "exports");
                 result.declarations = fileSymbol.declarations ? fileSymbol.declarations.slice() : [];
@@ -42290,14 +45236,16 @@ var ts;
                     result.exports = new ts.Map(fileSymbol.exports);
                 var members = ts.createSymbolTable();
                 members.set("exports", result);
-                return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, undefined, undefined);
+                return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
             }
+            ts.Debug.assertIsDefined(symbol.valueDeclaration);
             var declaration = symbol.valueDeclaration;
             if (ts.isCatchClauseVariableDeclarationOrBindingElement(declaration)) {
-                var decl = declaration;
-                if (!decl.type)
-                    return anyType;
-                var type_1 = getTypeOfNode(decl.type);
+                var typeNode = ts.getEffectiveTypeAnnotationNode(declaration);
+                if (typeNode === undefined) {
+                    return useUnknownInCatchVariables ? unknownType : anyType;
+                }
+                var type_1 = getTypeOfNode(typeNode);
                 return isTypeAny(type_1) || type_1 === unknownType ? type_1 : errorType;
             }
             if (ts.isSourceFile(declaration) && ts.isJsonSourceFile(declaration)) {
@@ -42313,8 +45261,8 @@ var ts;
                 return reportCircularityError(symbol);
             }
             var type;
-            if (declaration.kind === 266) {
-                type = widenTypeForVariableLikeDeclaration(checkExpressionCached(declaration.expression), declaration);
+            if (declaration.kind === 270) {
+                type = widenTypeForVariableLikeDeclaration(tryGetTypeFromEffectiveTypeNode(declaration) || checkExpressionCached(declaration.expression), declaration);
             }
             else if (ts.isBinaryExpression(declaration) ||
                 (ts.isInJSFile(declaration) &&
@@ -42365,7 +45313,7 @@ var ts;
                 type = getTypeOfEnumMember(symbol);
             }
             else if (ts.isAccessor(declaration)) {
-                type = resolveTypeOfAccessors(symbol);
+                type = resolveTypeOfAccessors(symbol) || ts.Debug.fail("Non-write accessor resolution must always produce a type");
             }
             else {
                 return ts.Debug.fail("Unhandled declaration kind! " + ts.Debug.formatSyntaxKind(declaration.kind) + " for " + ts.Debug.formatSymbol(symbol));
@@ -42380,7 +45328,7 @@ var ts;
         }
         function getAnnotatedAccessorTypeNode(accessor) {
             if (accessor) {
-                if (accessor.kind === 167) {
+                if (accessor.kind === 171) {
                     var getterTypeAnnotation = ts.getEffectiveReturnTypeNode(accessor);
                     return getterTypeAnnotation;
                 }
@@ -42404,59 +45352,72 @@ var ts;
         }
         function getTypeOfAccessors(symbol) {
             var links = getSymbolLinks(symbol);
-            return links.type || (links.type = getTypeOfAccessorsWorker(symbol));
+            return links.type || (links.type = getTypeOfAccessorsWorker(symbol) || ts.Debug.fail("Read type of accessor must always produce a type"));
+        }
+        function getTypeOfSetAccessor(symbol) {
+            var links = getSymbolLinks(symbol);
+            return links.writeType || (links.writeType = getTypeOfAccessorsWorker(symbol, true));
         }
-        function getTypeOfAccessorsWorker(symbol) {
+        function getTypeOfAccessorsWorker(symbol, writing) {
+            if (writing === void 0) { writing = false; }
             if (!pushTypeResolution(symbol, 0)) {
                 return errorType;
             }
-            var type = resolveTypeOfAccessors(symbol);
+            var type = resolveTypeOfAccessors(symbol, writing);
             if (!popTypeResolution()) {
                 type = anyType;
                 if (noImplicitAny) {
-                    var getter = ts.getDeclarationOfKind(symbol, 167);
+                    var getter = ts.getDeclarationOfKind(symbol, 171);
                     error(getter, ts.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
                 }
             }
             return type;
         }
-        function resolveTypeOfAccessors(symbol) {
-            var getter = ts.getDeclarationOfKind(symbol, 167);
-            var setter = ts.getDeclarationOfKind(symbol, 168);
+        function resolveTypeOfAccessors(symbol, writing) {
+            if (writing === void 0) { writing = false; }
+            var getter = ts.getDeclarationOfKind(symbol, 171);
+            var setter = ts.getDeclarationOfKind(symbol, 172);
+            var setterType = getAnnotatedAccessorType(setter);
+            if (writing && setterType) {
+                return instantiateTypeIfNeeded(setterType, symbol);
+            }
             if (getter && ts.isInJSFile(getter)) {
                 var jsDocType = getTypeForDeclarationFromJSDocComment(getter);
                 if (jsDocType) {
-                    return jsDocType;
+                    return instantiateTypeIfNeeded(jsDocType, symbol);
                 }
             }
-            var getterReturnType = getAnnotatedAccessorType(getter);
-            if (getterReturnType) {
-                return getterReturnType;
+            var getterType = getAnnotatedAccessorType(getter);
+            if (getterType) {
+                return instantiateTypeIfNeeded(getterType, symbol);
             }
-            else {
-                var setterParameterType = getAnnotatedAccessorType(setter);
-                if (setterParameterType) {
-                    return setterParameterType;
+            if (setterType) {
+                return setterType;
+            }
+            if (getter && getter.body) {
+                var returnTypeFromBody = getReturnTypeFromBody(getter);
+                return instantiateTypeIfNeeded(returnTypeFromBody, symbol);
+            }
+            if (setter) {
+                if (!isPrivateWithinAmbient(setter)) {
+                    errorOrSuggestion(noImplicitAny, setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
                 }
-                else {
-                    if (getter && getter.body) {
-                        return getReturnTypeFromBody(getter);
-                    }
-                    else {
-                        if (setter) {
-                            if (!isPrivateWithinAmbient(setter)) {
-                                errorOrSuggestion(noImplicitAny, setter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_parameter_type_annotation, symbolToString(symbol));
-                            }
-                        }
-                        else {
-                            ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function");
-                            if (!isPrivateWithinAmbient(getter)) {
-                                errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol));
-                            }
-                        }
-                        return anyType;
-                    }
+                return anyType;
+            }
+            else if (getter) {
+                ts.Debug.assert(!!getter, "there must exist a getter as we are current checking either setter or getter in this function");
+                if (!isPrivateWithinAmbient(getter)) {
+                    errorOrSuggestion(noImplicitAny, getter, ts.Diagnostics.Property_0_implicitly_has_type_any_because_its_get_accessor_lacks_a_return_type_annotation, symbolToString(symbol));
+                }
+                return anyType;
+            }
+            return undefined;
+            function instantiateTypeIfNeeded(type, symbol) {
+                if (ts.getCheckFlags(symbol) & 1) {
+                    var links = getSymbolLinks(symbol);
+                    return instantiateType(type, links.mapper);
                 }
+                return type;
             }
         }
         function getBaseTypeVariableOfClass(symbol) {
@@ -42485,9 +45446,9 @@ var ts;
             if (symbol.flags & 1536 && ts.isShorthandAmbientModuleSymbol(symbol)) {
                 return anyType;
             }
-            else if (declaration && (declaration.kind === 216 ||
+            else if (declaration && (declaration.kind === 220 ||
                 ts.isAccessExpression(declaration) &&
-                    declaration.parent.kind === 216)) {
+                    declaration.parent.kind === 220)) {
                 return getWidenedTypeForAssignmentDeclaration(symbol);
             }
             else if (symbol.flags & 512 && declaration && ts.isSourceFile(declaration) && declaration.commonJsModuleIndicator) {
@@ -42521,9 +45482,13 @@ var ts;
             var links = getSymbolLinks(symbol);
             if (!links.type) {
                 var targetSymbol = resolveAlias(symbol);
-                links.type = targetSymbol.flags & 111551
-                    ? getTypeOfSymbol(targetSymbol)
-                    : errorType;
+                var exportSymbol = symbol.declarations && getTargetOfAliasDeclaration(getDeclarationOfAliasSymbol(symbol), true);
+                var declaredType = ts.firstDefined(exportSymbol === null || exportSymbol === void 0 ? void 0 : exportSymbol.declarations, function (d) { return ts.isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : undefined; });
+                links.type = (exportSymbol === null || exportSymbol === void 0 ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol)
+                    : isDuplicatedCommonJSExport(symbol.declarations) ? autoType
+                        : declaredType ? declaredType
+                            : targetSymbol.flags & 111551 ? getTypeOfSymbol(targetSymbol)
+                                : errorType;
             }
             return links.type;
         }
@@ -42547,7 +45512,7 @@ var ts;
                 error(symbol.valueDeclaration, ts.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
                 return errorType;
             }
-            if (noImplicitAny && (declaration.kind !== 160 || declaration.initializer)) {
+            if (noImplicitAny && (declaration.kind !== 163 || declaration.initializer)) {
                 error(symbol.valueDeclaration, ts.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer, symbolToString(symbol));
             }
             return anyType;
@@ -42561,6 +45526,15 @@ var ts;
             }
             return links.type;
         }
+        function getSetAccessorTypeOfSymbol(symbol) {
+            if (symbol.flags & 98304) {
+                var type = getTypeOfSetAccessor(symbol);
+                if (type) {
+                    return type;
+                }
+            }
+            return getTypeOfSymbol(symbol);
+        }
         function getTypeOfSymbol(symbol) {
             var checkFlags = ts.getCheckFlags(symbol);
             if (checkFlags & 65536) {
@@ -42592,6 +45566,9 @@ var ts;
             }
             return errorType;
         }
+        function getNonMissingTypeOfSymbol(symbol) {
+            return removeMissingType(getTypeOfSymbol(symbol), !!(symbol.flags & 16777216));
+        }
         function isReferenceToType(type, target) {
             return type !== undefined
                 && target !== undefined
@@ -42637,63 +45614,69 @@ var ts;
                     return undefined;
                 }
                 switch (node.kind) {
-                    case 232:
-                    case 252:
-                    case 221:
-                    case 253:
-                    case 169:
-                    case 170:
-                    case 164:
+                    case 256:
+                    case 225:
+                    case 257:
+                    case 173:
                     case 174:
-                    case 175:
-                    case 308:
-                    case 251:
-                    case 165:
-                    case 208:
-                    case 209:
-                    case 254:
-                    case 330:
-                    case 331:
-                    case 325:
-                    case 324:
-                    case 190:
-                    case 184:
+                    case 167:
+                    case 178:
+                    case 179:
+                    case 315:
+                    case 255:
+                    case 168:
+                    case 212:
+                    case 213:
+                    case 258:
+                    case 342:
+                    case 343:
+                    case 337:
+                    case 336:
+                    case 194:
+                    case 188: {
                         var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
-                        if (node.kind === 190) {
+                        if (node.kind === 194) {
                             return ts.append(outerTypeParameters, getDeclaredTypeOfTypeParameter(getSymbolOfNode(node.typeParameter)));
                         }
-                        else if (node.kind === 184) {
+                        else if (node.kind === 188) {
                             return ts.concatenate(outerTypeParameters, getInferTypeParameters(node));
                         }
-                        else if (node.kind === 232 && !ts.isInJSFile(node)) {
-                            break;
-                        }
                         var outerAndOwnTypeParameters = appendTypeParameters(outerTypeParameters, ts.getEffectiveTypeParameterDeclarations(node));
                         var thisType = includeThisTypes &&
-                            (node.kind === 252 || node.kind === 221 || node.kind === 253 || isJSConstructor(node)) &&
+                            (node.kind === 256 || node.kind === 225 || node.kind === 257 || isJSConstructor(node)) &&
                             getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node)).thisType;
                         return thisType ? ts.append(outerAndOwnTypeParameters, thisType) : outerAndOwnTypeParameters;
-                    case 326:
+                    }
+                    case 338:
                         var paramSymbol = ts.getParameterSymbolFromJSDoc(node);
                         if (paramSymbol) {
                             node = paramSymbol.valueDeclaration;
                         }
                         break;
+                    case 318: {
+                        var outerTypeParameters = getOuterTypeParameters(node, includeThisTypes);
+                        return node.tags
+                            ? appendTypeParameters(outerTypeParameters, ts.flatMap(node.tags, function (t) { return ts.isJSDocTemplateTag(t) ? t.typeParameters : undefined; }))
+                            : outerTypeParameters;
+                    }
                 }
             }
         }
         function getOuterTypeParametersOfClassOrInterface(symbol) {
-            var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 253);
+            var declaration = symbol.flags & 32 ? symbol.valueDeclaration : ts.getDeclarationOfKind(symbol, 257);
             ts.Debug.assert(!!declaration, "Class was missing valueDeclaration -OR- non-class had no interface declarations");
             return getOuterTypeParameters(declaration);
         }
         function getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(symbol) {
+            if (!symbol.declarations) {
+                return;
+            }
             var result;
             for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
                 var node = _a[_i];
-                if (node.kind === 253 ||
-                    node.kind === 252 ||
-                    node.kind === 221 ||
+                if (node.kind === 257 ||
+                    node.kind === 256 ||
+                    node.kind === 225 ||
                     isJSConstructor(node) ||
                     ts.isTypeAlias(node)) {
                     var declaration = node;
@@ -42773,7 +45756,9 @@ var ts;
                                 ctorReturn = getReturnTypeOfSignature(ctorSig[0]);
                             }
                         }
-                        ts.addRelatedInfo(err, ts.createDiagnosticForNode(baseConstructorType.symbol.declarations[0], ts.Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));
+                        if (baseConstructorType.symbol.declarations) {
+                            ts.addRelatedInfo(err, ts.createDiagnosticForNode(baseConstructorType.symbol.declarations[0], ts.Diagnostics.Did_you_mean_for_0_to_be_constrained_to_type_new_args_Colon_any_1, symbolToString(baseConstructorType.symbol), typeToString(ctorReturn)));
+                        }
                     }
                     return type.resolvedBaseConstructorType = errorType;
                 }
@@ -42783,20 +45768,22 @@ var ts;
         }
         function getImplementsTypes(type) {
             var resolvedImplementsTypes = ts.emptyArray;
-            for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
-                var declaration = _a[_i];
-                var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration);
-                if (!implementsTypeNodes)
-                    continue;
-                for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) {
-                    var node = implementsTypeNodes_1[_b];
-                    var implementsType = getTypeFromTypeNode(node);
-                    if (implementsType !== errorType) {
-                        if (resolvedImplementsTypes === ts.emptyArray) {
-                            resolvedImplementsTypes = [implementsType];
-                        }
-                        else {
-                            resolvedImplementsTypes.push(implementsType);
+            if (type.symbol.declarations) {
+                for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
+                    var declaration = _a[_i];
+                    var implementsTypeNodes = ts.getEffectiveImplementsTypeNodes(declaration);
+                    if (!implementsTypeNodes)
+                        continue;
+                    for (var _b = 0, implementsTypeNodes_1 = implementsTypeNodes; _b < implementsTypeNodes_1.length; _b++) {
+                        var node = implementsTypeNodes_1[_b];
+                        var implementsType = getTypeFromTypeNode(node);
+                        if (!isErrorType(implementsType)) {
+                            if (resolvedImplementsTypes === ts.emptyArray) {
+                                resolvedImplementsTypes = [implementsType];
+                            }
+                            else {
+                                resolvedImplementsTypes.push(implementsType);
+                            }
                         }
                     }
                 }
@@ -42823,10 +45810,10 @@ var ts;
                     else {
                         ts.Debug.fail("type must be class or interface");
                     }
-                    if (!popTypeResolution()) {
+                    if (!popTypeResolution() && type.symbol.declarations) {
                         for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
                             var declaration = _a[_i];
-                            if (declaration.kind === 252 || declaration.kind === 253) {
+                            if (declaration.kind === 256 || declaration.kind === 257) {
                                 reportCircularBaseType(declaration, type);
                             }
                         }
@@ -42864,7 +45851,7 @@ var ts;
                 }
                 baseType = getReturnTypeOfSignature(constructors[0]);
             }
-            if (baseType === errorType) {
+            if (isErrorType(baseType)) {
                 return type.resolvedBaseTypes = ts.emptyArray;
             }
             var reducedBaseType = getReducedType(baseType);
@@ -42904,38 +45891,43 @@ var ts;
         }
         function resolveBaseTypesOfInterface(type) {
             type.resolvedBaseTypes = type.resolvedBaseTypes || ts.emptyArray;
-            for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
-                var declaration = _a[_i];
-                if (declaration.kind === 253 && ts.getInterfaceBaseTypeNodes(declaration)) {
-                    for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
-                        var node = _c[_b];
-                        var baseType = getReducedType(getTypeFromTypeNode(node));
-                        if (baseType !== errorType) {
-                            if (isValidBaseType(baseType)) {
-                                if (type !== baseType && !hasBaseType(baseType, type)) {
-                                    if (type.resolvedBaseTypes === ts.emptyArray) {
-                                        type.resolvedBaseTypes = [baseType];
+            if (type.symbol.declarations) {
+                for (var _i = 0, _a = type.symbol.declarations; _i < _a.length; _i++) {
+                    var declaration = _a[_i];
+                    if (declaration.kind === 257 && ts.getInterfaceBaseTypeNodes(declaration)) {
+                        for (var _b = 0, _c = ts.getInterfaceBaseTypeNodes(declaration); _b < _c.length; _b++) {
+                            var node = _c[_b];
+                            var baseType = getReducedType(getTypeFromTypeNode(node));
+                            if (!isErrorType(baseType)) {
+                                if (isValidBaseType(baseType)) {
+                                    if (type !== baseType && !hasBaseType(baseType, type)) {
+                                        if (type.resolvedBaseTypes === ts.emptyArray) {
+                                            type.resolvedBaseTypes = [baseType];
+                                        }
+                                        else {
+                                            type.resolvedBaseTypes.push(baseType);
+                                        }
                                     }
                                     else {
-                                        type.resolvedBaseTypes.push(baseType);
+                                        reportCircularBaseType(declaration, type);
                                     }
                                 }
                                 else {
-                                    reportCircularBaseType(declaration, type);
+                                    error(node, ts.Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members);
                                 }
                             }
-                            else {
-                                error(node, ts.Diagnostics.An_interface_can_only_extend_an_object_type_or_intersection_of_object_types_with_statically_known_members);
-                            }
                         }
                     }
                 }
             }
         }
         function isThislessInterface(symbol) {
+            if (!symbol.declarations) {
+                return true;
+            }
             for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
                 var declaration = _a[_i];
-                if (declaration.kind === 253) {
+                if (declaration.kind === 257) {
                     if (declaration.flags & 128) {
                         return false;
                     }
@@ -42960,7 +45952,7 @@ var ts;
             var originalLinks = links;
             if (!links.declaredType) {
                 var kind = symbol.flags & 32 ? 1 : 2;
-                var merged = mergeJSSymbols(symbol, getAssignedClassSymbol(symbol.valueDeclaration));
+                var merged = mergeJSSymbols(symbol, symbol.valueDeclaration && getAssignedClassSymbol(symbol.valueDeclaration));
                 if (merged) {
                     symbol = links = merged;
                 }
@@ -42984,12 +45976,13 @@ var ts;
             return links.declaredType;
         }
         function getDeclaredTypeOfTypeAlias(symbol) {
+            var _a;
             var links = getSymbolLinks(symbol);
             if (!links.declaredType) {
                 if (!pushTypeResolution(symbol, 2)) {
                     return errorType;
                 }
-                var declaration = ts.Debug.checkDefined(ts.find(symbol.declarations, ts.isTypeAlias), "Type alias symbol with no valid declaration found");
+                var declaration = ts.Debug.checkDefined((_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isTypeAlias), "Type alias symbol with no valid declaration found");
                 var typeNode = ts.isJSDocTypeAlias(declaration) ? declaration.typeExpression : declaration.type;
                 var type = typeNode ? getTypeFromTypeNode(typeNode) : errorType;
                 if (popTypeResolution()) {
@@ -43002,7 +45995,12 @@ var ts;
                 }
                 else {
                     type = errorType;
-                    error(ts.isNamedDeclaration(declaration) ? declaration.name : declaration || declaration, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
+                    if (declaration.kind === 337) {
+                        error(declaration.typeExpression.type, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
+                    }
+                    else {
+                        error(ts.isNamedDeclaration(declaration) ? declaration.name : declaration || declaration, ts.Diagnostics.Type_alias_0_circularly_references_itself, symbolToString(symbol));
+                    }
                 }
                 links.declaredType = type;
             }
@@ -43012,7 +46010,7 @@ var ts;
             if (ts.isStringLiteralLike(expr)) {
                 return true;
             }
-            else if (expr.kind === 216) {
+            else if (expr.kind === 220) {
                 return isStringConcatExpression(expr.left) && isStringConcatExpression(expr.right);
             }
             return false;
@@ -43027,12 +46025,12 @@ var ts;
                 case 8:
                 case 14:
                     return true;
-                case 214:
+                case 218:
                     return expr.operator === 40 &&
                         expr.operand.kind === 8;
-                case 78:
+                case 79:
                     return ts.nodeIsMissing(expr) || !!getSymbolOfNode(member.parent).exports.get(expr.escapedText);
-                case 216:
+                case 220:
                     return isStringConcatExpression(expr);
                 default:
                     return false;
@@ -43044,16 +46042,18 @@ var ts;
                 return links.enumKind;
             }
             var hasNonLiteralMember = false;
-            for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
-                var declaration = _a[_i];
-                if (declaration.kind === 255) {
-                    for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
-                        var member = _c[_b];
-                        if (member.initializer && ts.isStringLiteralLike(member.initializer)) {
-                            return links.enumKind = 1;
-                        }
-                        if (!isLiteralEnumMember(member)) {
-                            hasNonLiteralMember = true;
+            if (symbol.declarations) {
+                for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+                    var declaration = _a[_i];
+                    if (declaration.kind === 259) {
+                        for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+                            var member = _c[_b];
+                            if (member.initializer && ts.isStringLiteralLike(member.initializer)) {
+                                return links.enumKind = 1;
+                            }
+                            if (!isLiteralEnumMember(member)) {
+                                hasNonLiteralMember = true;
+                            }
                         }
                     }
                 }
@@ -43071,15 +46071,17 @@ var ts;
             if (getEnumKind(symbol) === 1) {
                 enumCount++;
                 var memberTypeList = [];
-                for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
-                    var declaration = _a[_i];
-                    if (declaration.kind === 255) {
-                        for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
-                            var member = _c[_b];
-                            var value = getEnumMemberValue(member);
-                            var memberType = getFreshTypeOfLiteralType(getLiteralType(value !== undefined ? value : 0, enumCount, getSymbolOfNode(member)));
-                            getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
-                            memberTypeList.push(getRegularTypeOfLiteralType(memberType));
+                if (symbol.declarations) {
+                    for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
+                        var declaration = _a[_i];
+                        if (declaration.kind === 259) {
+                            for (var _b = 0, _c = declaration.members; _b < _c.length; _b++) {
+                                var member = _c[_b];
+                                var value = getEnumMemberValue(member);
+                                var memberType = getFreshTypeOfLiteralType(getEnumLiteralType(value !== undefined ? value : 0, enumCount, getSymbolOfNode(member)));
+                                getSymbolLinks(getSymbolOfNode(member)).declaredType = memberType;
+                                memberTypeList.push(getRegularTypeOfLiteralType(memberType));
+                            }
                         }
                     }
                 }
@@ -43140,22 +46142,22 @@ var ts;
         }
         function isThislessType(node) {
             switch (node.kind) {
-                case 128:
-                case 152:
-                case 147:
-                case 144:
-                case 155:
-                case 131:
-                case 148:
-                case 145:
-                case 113:
+                case 130:
+                case 154:
+                case 149:
+                case 146:
+                case 157:
+                case 133:
                 case 150:
-                case 141:
-                case 191:
+                case 147:
+                case 114:
+                case 152:
+                case 143:
+                case 195:
                     return true;
-                case 178:
+                case 182:
                     return isThislessType(node.elementType);
-                case 173:
+                case 177:
                     return !node.typeArguments || node.typeArguments.every(isThislessType);
             }
             return false;
@@ -43171,7 +46173,7 @@ var ts;
         function isThislessFunctionLikeDeclaration(node) {
             var returnType = ts.getEffectiveReturnTypeNode(node);
             var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
-            return (node.kind === 166 || (!!returnType && isThislessType(returnType))) &&
+            return (node.kind === 170 || (!!returnType && isThislessType(returnType))) &&
                 node.parameters.every(isThislessVariableLikeDeclaration) &&
                 typeParameters.every(isThislessTypeParameter);
         }
@@ -43180,14 +46182,14 @@ var ts;
                 var declaration = symbol.declarations[0];
                 if (declaration) {
                     switch (declaration.kind) {
-                        case 163:
-                        case 162:
-                            return isThislessVariableLikeDeclaration(declaration);
-                        case 165:
-                        case 164:
                         case 166:
-                        case 167:
+                        case 165:
+                            return isThislessVariableLikeDeclaration(declaration);
                         case 168:
+                        case 167:
+                        case 170:
+                        case 171:
+                        case 172:
                             return isThislessFunctionLikeDeclaration(declaration);
                     }
                 }
@@ -43211,7 +46213,7 @@ var ts;
             }
         }
         function isStaticPrivateIdentifierProperty(s) {
-            return !!s.valueDeclaration && ts.isPrivateIdentifierPropertyDeclaration(s.valueDeclaration) && ts.hasSyntacticModifier(s.valueDeclaration, 32);
+            return !!s.valueDeclaration && ts.isPrivateIdentifierClassElementDeclaration(s.valueDeclaration) && ts.isStatic(s.valueDeclaration);
         }
         function resolveDeclaredMembers(type) {
             if (!type.declaredProperties) {
@@ -43220,10 +46222,10 @@ var ts;
                 type.declaredProperties = getNamedMembers(members);
                 type.declaredCallSignatures = ts.emptyArray;
                 type.declaredConstructSignatures = ts.emptyArray;
+                type.declaredIndexInfos = ts.emptyArray;
                 type.declaredCallSignatures = getSignaturesOfSymbol(members.get("__call"));
                 type.declaredConstructSignatures = getSignaturesOfSymbol(members.get("__new"));
-                type.declaredStringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
-                type.declaredNumberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
+                type.declaredIndexInfos = getIndexInfosOfSymbol(symbol);
             }
             return type;
         }
@@ -43269,7 +46271,7 @@ var ts;
             if (!symbol.declarations) {
                 symbol.declarations = [member];
             }
-            else {
+            else if (!member.symbol.isReplaceableByMethod) {
                 symbol.declarations.push(member);
             }
             if (symbolFlags & 111551) {
@@ -43315,8 +46317,8 @@ var ts;
         function getResolvedMembersOrExportsOfSymbol(symbol, resolutionKind) {
             var links = getSymbolLinks(symbol);
             if (!links[resolutionKind]) {
-                var isStatic = resolutionKind === "resolvedExports";
-                var earlySymbols = !isStatic ? symbol.members :
+                var isStatic_1 = resolutionKind === "resolvedExports";
+                var earlySymbols = !isStatic_1 ? symbol.members :
                     symbol.flags & 1536 ? getExportsOfModuleWorker(symbol) :
                         symbol.exports;
                 links[resolutionKind] = earlySymbols || emptySymbols;
@@ -43327,7 +46329,7 @@ var ts;
                     if (members) {
                         for (var _b = 0, members_5 = members; _b < members_5.length; _b++) {
                             var member = members_5[_b];
-                            if (isStatic === ts.hasStaticModifier(member) && hasLateBindableName(member)) {
+                            if (isStatic_1 === ts.hasStaticModifier(member) && hasLateBindableName(member)) {
                                 lateBindMember(symbol, earlySymbols, lateSymbols, member);
                             }
                         }
@@ -43343,7 +46345,7 @@ var ts;
                             || ts.isBinaryExpression(member) && isPossiblyAliasedThisProperty(member, assignmentKind)
                             || assignmentKind === 9
                             || assignmentKind === 6;
-                        if (isStatic === !isInstanceMember && hasLateBindableName(member)) {
+                        if (isStatic_1 === !isInstanceMember && hasLateBindableName(member)) {
                             lateBindMember(symbol, earlySymbols, lateSymbols, member);
                         }
                     }
@@ -43393,29 +46395,26 @@ var ts;
             var members;
             var callSignatures;
             var constructSignatures;
-            var stringIndexInfo;
-            var numberIndexInfo;
+            var indexInfos;
             if (ts.rangeEquals(typeParameters, typeArguments, 0, typeParameters.length)) {
                 members = source.symbol ? getMembersOfSymbol(source.symbol) : ts.createSymbolTable(source.declaredProperties);
                 callSignatures = source.declaredCallSignatures;
                 constructSignatures = source.declaredConstructSignatures;
-                stringIndexInfo = source.declaredStringIndexInfo;
-                numberIndexInfo = source.declaredNumberIndexInfo;
+                indexInfos = source.declaredIndexInfos;
             }
             else {
                 mapper = createTypeMapper(typeParameters, typeArguments);
                 members = createInstantiatedSymbolTable(source.declaredProperties, mapper, typeParameters.length === 1);
                 callSignatures = instantiateSignatures(source.declaredCallSignatures, mapper);
                 constructSignatures = instantiateSignatures(source.declaredConstructSignatures, mapper);
-                stringIndexInfo = instantiateIndexInfo(source.declaredStringIndexInfo, mapper);
-                numberIndexInfo = instantiateIndexInfo(source.declaredNumberIndexInfo, mapper);
+                indexInfos = instantiateIndexInfos(source.declaredIndexInfos, mapper);
             }
             var baseTypes = getBaseTypes(source);
             if (baseTypes.length) {
                 if (source.symbol && members === getMembersOfSymbol(source.symbol)) {
                     members = ts.createSymbolTable(source.declaredProperties);
                 }
-                setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
+                setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
                 var thisArgument = ts.lastOrUndefined(typeArguments);
                 for (var _i = 0, baseTypes_1 = baseTypes; _i < baseTypes_1.length; _i++) {
                     var baseType = baseTypes_1[_i];
@@ -43423,15 +46422,11 @@ var ts;
                     addInheritedMembers(members, getPropertiesOfType(instantiatedBaseType));
                     callSignatures = ts.concatenate(callSignatures, getSignaturesOfType(instantiatedBaseType, 0));
                     constructSignatures = ts.concatenate(constructSignatures, getSignaturesOfType(instantiatedBaseType, 1));
-                    if (!stringIndexInfo) {
-                        stringIndexInfo = instantiatedBaseType === anyType ?
-                            createIndexInfo(anyType, false) :
-                            getIndexInfoOfType(instantiatedBaseType, 0);
-                    }
-                    numberIndexInfo = numberIndexInfo || getIndexInfoOfType(instantiatedBaseType, 1);
+                    var inheritedIndexInfos = instantiatedBaseType !== anyType ? getIndexInfosOfType(instantiatedBaseType) : [createIndexInfo(stringType, anyType, false)];
+                    indexInfos = ts.concatenate(indexInfos, ts.filter(inheritedIndexInfos, function (info) { return !findIndexInfo(indexInfos, info.keyType); }));
                 }
             }
-            setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
+            setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
         }
         function resolveClassOrInterfaceMembers(type) {
             resolveObjectTypeMembers(type, resolveDeclaredMembers(type), ts.emptyArray, ts.emptyArray);
@@ -43455,19 +46450,22 @@ var ts;
             sig.resolvedMinArgumentCount = undefined;
             sig.target = undefined;
             sig.mapper = undefined;
-            sig.unionSignatures = undefined;
+            sig.compositeSignatures = undefined;
+            sig.compositeKind = undefined;
             return sig;
         }
         function cloneSignature(sig) {
             var result = createSignature(sig.declaration, sig.typeParameters, sig.thisParameter, sig.parameters, undefined, undefined, sig.minArgumentCount, sig.flags & 39);
             result.target = sig.target;
             result.mapper = sig.mapper;
-            result.unionSignatures = sig.unionSignatures;
+            result.compositeSignatures = sig.compositeSignatures;
+            result.compositeKind = sig.compositeKind;
             return result;
         }
         function createUnionSignature(signature, unionSignatures) {
             var result = cloneSignature(signature);
-            result.unionSignatures = unionSignatures;
+            result.compositeSignatures = unionSignatures;
+            result.compositeKind = 1048576;
             result.target = undefined;
             result.mapper = undefined;
             return result;
@@ -43611,7 +46609,7 @@ var ts;
                     if (signatures !== masterList) {
                         var signature_1 = signatures[0];
                         ts.Debug.assert(!!signature_1, "getUnionSignatures bails early on empty signature lists and should not have empty lists on second pass");
-                        results = signature_1.typeParameters && ts.some(results, function (s) { return !!s.typeParameters && !compareTypeParametersIdentical(signature_1.typeParameters, s.typeParameters); }) ? undefined : ts.map(results, function (sig) { return combineSignaturesOfUnionMembers(sig, signature_1); });
+                        results = !!signature_1.typeParameters && ts.some(results, function (s) { return !!s.typeParameters && !compareTypeParametersIdentical(signature_1.typeParameters, s.typeParameters); }) ? undefined : ts.map(results, function (sig) { return combineSignaturesOfUnionMembers(sig, signature_1); });
                         if (!results) {
                             return "break";
                         }
@@ -43628,9 +46626,12 @@ var ts;
             return result || ts.emptyArray;
         }
         function compareTypeParametersIdentical(sourceParams, targetParams) {
-            if (sourceParams.length !== targetParams.length) {
+            if (ts.length(sourceParams) !== ts.length(targetParams)) {
                 return false;
             }
+            if (!sourceParams || !targetParams) {
+                return true;
+            }
             var mapper = createTypeMapper(targetParams, sourceParams);
             for (var i = 0; i < sourceParams.length; i++) {
                 var source = sourceParams[i];
@@ -43676,7 +46677,7 @@ var ts;
                     !leftName ? rightName :
                         !rightName ? leftName :
                             undefined;
-                var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg" + i);
+                var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
                 paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
                 params[i] = paramSymbol;
             }
@@ -43701,42 +46702,40 @@ var ts;
             var thisParam = combineUnionThisParam(left.thisParameter, right.thisParameter, paramMapper);
             var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
             var result = createSignature(declaration, typeParams, thisParam, params, undefined, undefined, minArgCount, (left.flags | right.flags) & 39);
-            result.unionSignatures = ts.concatenate(left.unionSignatures || [left], [right]);
+            result.compositeKind = 1048576;
+            result.compositeSignatures = ts.concatenate(left.compositeKind !== 2097152 && left.compositeSignatures || [left], [right]);
             if (paramMapper) {
-                result.mapper = left.mapper && left.unionSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper;
+                result.mapper = left.compositeKind !== 2097152 && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper;
             }
             return result;
         }
-        function getUnionIndexInfo(types, kind) {
-            var indexTypes = [];
-            var isAnyReadonly = false;
-            for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
-                var type = types_4[_i];
-                var indexInfo = getIndexInfoOfType(getApparentType(type), kind);
-                if (!indexInfo) {
-                    return undefined;
+        function getUnionIndexInfos(types) {
+            var sourceInfos = getIndexInfosOfType(types[0]);
+            if (sourceInfos) {
+                var result = [];
+                var _loop_11 = function (info) {
+                    var indexType = info.keyType;
+                    if (ts.every(types, function (t) { return !!getIndexInfoOfType(t, indexType); })) {
+                        result.push(createIndexInfo(indexType, getUnionType(ts.map(types, function (t) { return getIndexTypeOfType(t, indexType); })), ts.some(types, function (t) { return getIndexInfoOfType(t, indexType).isReadonly; })));
+                    }
+                };
+                for (var _i = 0, sourceInfos_1 = sourceInfos; _i < sourceInfos_1.length; _i++) {
+                    var info = sourceInfos_1[_i];
+                    _loop_11(info);
                 }
-                indexTypes.push(indexInfo.type);
-                isAnyReadonly = isAnyReadonly || indexInfo.isReadonly;
+                return result;
             }
-            return createIndexInfo(getUnionType(indexTypes, 2), isAnyReadonly);
+            return ts.emptyArray;
         }
         function resolveUnionTypeMembers(type) {
             var callSignatures = getUnionSignatures(ts.map(type.types, function (t) { return t === globalFunctionType ? [unknownSignature] : getSignaturesOfType(t, 0); }));
             var constructSignatures = getUnionSignatures(ts.map(type.types, function (t) { return getSignaturesOfType(t, 1); }));
-            var stringIndexInfo = getUnionIndexInfo(type.types, 0);
-            var numberIndexInfo = getUnionIndexInfo(type.types, 1);
-            setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
+            var indexInfos = getUnionIndexInfos(type.types);
+            setStructuredTypeMembers(type, emptySymbols, callSignatures, constructSignatures, indexInfos);
         }
         function intersectTypes(type1, type2) {
             return !type1 ? type2 : !type2 ? type1 : getIntersectionType([type1, type2]);
         }
-        function intersectIndexInfos(info1, info2) {
-            return !info1 ? info2 : !info2 ? info1 : createIndexInfo(getIntersectionType([info1.type, info2.type]), info1.isReadonly && info2.isReadonly);
-        }
-        function unionSpreadIndexInfos(info1, info2) {
-            return info1 && info2 && createIndexInfo(getUnionType([info1.type, info2.type]), info1.isReadonly || info2.isReadonly);
-        }
         function findMixins(types) {
             var constructorTypeCount = ts.countWhere(types, function (t) { return getSignaturesOfType(t, 1).length > 0; });
             var mixinFlags = ts.map(types, isMixinConstructorType);
@@ -43761,12 +46760,11 @@ var ts;
         function resolveIntersectionTypeMembers(type) {
             var callSignatures;
             var constructSignatures;
-            var stringIndexInfo;
-            var numberIndexInfo;
+            var indexInfos;
             var types = type.types;
             var mixinFlags = findMixins(types);
             var mixinCount = ts.countWhere(mixinFlags, function (b) { return b; });
-            var _loop_11 = function (i) {
+            var _loop_12 = function (i) {
                 var t = type.types[i];
                 if (!mixinFlags[i]) {
                     var signatures = getSignaturesOfType(t, 1);
@@ -43780,49 +46778,58 @@ var ts;
                     constructSignatures = appendSignatures(constructSignatures, signatures);
                 }
                 callSignatures = appendSignatures(callSignatures, getSignaturesOfType(t, 0));
-                stringIndexInfo = intersectIndexInfos(stringIndexInfo, getIndexInfoOfType(t, 0));
-                numberIndexInfo = intersectIndexInfos(numberIndexInfo, getIndexInfoOfType(t, 1));
+                indexInfos = ts.reduceLeft(getIndexInfosOfType(t), function (infos, newInfo) { return appendIndexInfo(infos, newInfo, false); }, indexInfos);
             };
             for (var i = 0; i < types.length; i++) {
-                _loop_11(i);
+                _loop_12(i);
             }
-            setStructuredTypeMembers(type, emptySymbols, callSignatures || ts.emptyArray, constructSignatures || ts.emptyArray, stringIndexInfo, numberIndexInfo);
+            setStructuredTypeMembers(type, emptySymbols, callSignatures || ts.emptyArray, constructSignatures || ts.emptyArray, indexInfos || ts.emptyArray);
         }
         function appendSignatures(signatures, newSignatures) {
-            var _loop_12 = function (sig) {
+            var _loop_13 = function (sig) {
                 if (!signatures || ts.every(signatures, function (s) { return !compareSignaturesIdentical(s, sig, false, false, false, compareTypesIdentical); })) {
                     signatures = ts.append(signatures, sig);
                 }
             };
             for (var _i = 0, newSignatures_1 = newSignatures; _i < newSignatures_1.length; _i++) {
                 var sig = newSignatures_1[_i];
-                _loop_12(sig);
+                _loop_13(sig);
             }
             return signatures;
         }
+        function appendIndexInfo(indexInfos, newInfo, union) {
+            if (indexInfos) {
+                for (var i = 0; i < indexInfos.length; i++) {
+                    var info = indexInfos[i];
+                    if (info.keyType === newInfo.keyType) {
+                        indexInfos[i] = createIndexInfo(info.keyType, union ? getUnionType([info.type, newInfo.type]) : getIntersectionType([info.type, newInfo.type]), union ? info.isReadonly || newInfo.isReadonly : info.isReadonly && newInfo.isReadonly);
+                        return indexInfos;
+                    }
+                }
+            }
+            return ts.append(indexInfos, newInfo);
+        }
         function resolveAnonymousTypeMembers(type) {
             var symbol = getMergedSymbol(type.symbol);
             if (type.target) {
-                setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
+                setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
                 var members = createInstantiatedSymbolTable(getPropertiesOfObjectType(type.target), type.mapper, false);
                 var callSignatures = instantiateSignatures(getSignaturesOfType(type.target, 0), type.mapper);
                 var constructSignatures = instantiateSignatures(getSignaturesOfType(type.target, 1), type.mapper);
-                var stringIndexInfo = instantiateIndexInfo(getIndexInfoOfType(type.target, 0), type.mapper);
-                var numberIndexInfo = instantiateIndexInfo(getIndexInfoOfType(type.target, 1), type.mapper);
-                setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
+                var indexInfos = instantiateIndexInfos(getIndexInfosOfType(type.target), type.mapper);
+                setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
             }
             else if (symbol.flags & 2048) {
-                setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
+                setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
                 var members = getMembersOfSymbol(symbol);
                 var callSignatures = getSignaturesOfSymbol(members.get("__call"));
                 var constructSignatures = getSignaturesOfSymbol(members.get("__new"));
-                var stringIndexInfo = getIndexInfoOfSymbol(symbol, 0);
-                var numberIndexInfo = getIndexInfoOfSymbol(symbol, 1);
-                setStructuredTypeMembers(type, members, callSignatures, constructSignatures, stringIndexInfo, numberIndexInfo);
+                var indexInfos = getIndexInfosOfSymbol(symbol);
+                setStructuredTypeMembers(type, members, callSignatures, constructSignatures, indexInfos);
             }
             else {
                 var members = emptySymbols;
-                var stringIndexInfo = void 0;
+                var indexInfos = void 0;
                 if (symbol.exports) {
                     members = getExportsOfSymbol(symbol);
                     if (symbol === globalThisSymbol) {
@@ -43835,21 +46842,33 @@ var ts;
                         members = varsOnly_1;
                     }
                 }
-                setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, undefined, undefined);
+                var baseConstructorIndexInfo = void 0;
+                setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
                 if (symbol.flags & 32) {
                     var classType = getDeclaredTypeOfClassOrInterface(symbol);
                     var baseConstructorType = getBaseConstructorTypeOfClass(classType);
                     if (baseConstructorType.flags & (524288 | 2097152 | 8650752)) {
-                        members = ts.createSymbolTable(getNamedMembers(members));
+                        members = ts.createSymbolTable(getNamedOrIndexSignatureMembers(members));
                         addInheritedMembers(members, getPropertiesOfType(baseConstructorType));
                     }
                     else if (baseConstructorType === anyType) {
-                        stringIndexInfo = createIndexInfo(anyType, false);
+                        baseConstructorIndexInfo = createIndexInfo(stringType, anyType, false);
                     }
                 }
-                var numberIndexInfo = symbol.flags & 384 && (getDeclaredTypeOfSymbol(symbol).flags & 32 ||
-                    ts.some(type.properties, function (prop) { return !!(getTypeOfSymbol(prop).flags & 296); })) ? enumNumberIndexInfo : undefined;
-                setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo);
+                var indexSymbol = getIndexSymbolFromSymbolTable(members);
+                if (indexSymbol) {
+                    indexInfos = getIndexInfosOfIndexSymbol(indexSymbol);
+                }
+                else {
+                    if (baseConstructorIndexInfo) {
+                        indexInfos = ts.append(indexInfos, baseConstructorIndexInfo);
+                    }
+                    if (symbol.flags & 384 && (getDeclaredTypeOfSymbol(symbol).flags & 32 ||
+                        ts.some(type.properties, function (prop) { return !!(getTypeOfSymbol(prop).flags & 296); }))) {
+                        indexInfos = ts.append(indexInfos, enumNumberIndexInfo);
+                    }
+                }
+                setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, indexInfos || ts.emptyArray);
                 if (symbol.flags & (16 | 8192)) {
                     type.callSignatures = getSignaturesOfSymbol(symbol);
                 }
@@ -43868,12 +46887,15 @@ var ts;
                 }
             }
         }
+        function replaceIndexedAccess(instantiable, type, replacement) {
+            return instantiateType(instantiable, createTypeMapper([type.indexType, type.objectType], [getNumberLiteralType(0), createTupleType([replacement])]));
+        }
         function resolveReverseMappedTypeMembers(type) {
-            var indexInfo = getIndexInfoOfType(type.source, 0);
+            var indexInfo = getIndexInfoOfType(type.source, stringType);
             var modifiers = getMappedTypeModifiers(type.mappedType);
             var readonlyMask = modifiers & 1 ? false : true;
             var optionalMask = modifiers & 4 ? 0 : 16777216;
-            var stringIndexInfo = indexInfo && createIndexInfo(inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly);
+            var indexInfos = indexInfo ? [createIndexInfo(stringType, inferReverseMappedType(indexInfo.type, type.mappedType, type.constraintType), readonlyMask && indexInfo.isReadonly)] : ts.emptyArray;
             var members = ts.createSymbolTable();
             for (var _i = 0, _a = getPropertiesOfType(type.source); _i < _a.length; _i++) {
                 var prop = _a[_i];
@@ -43882,11 +46904,21 @@ var ts;
                 inferredProp.declarations = prop.declarations;
                 inferredProp.nameType = getSymbolLinks(prop).nameType;
                 inferredProp.propertyType = getTypeOfSymbol(prop);
-                inferredProp.mappedType = type.mappedType;
-                inferredProp.constraintType = type.constraintType;
+                if (type.constraintType.type.flags & 8388608
+                    && type.constraintType.type.objectType.flags & 262144
+                    && type.constraintType.type.indexType.flags & 262144) {
+                    var newTypeParam = type.constraintType.type.objectType;
+                    var newMappedType = replaceIndexedAccess(type.mappedType, type.constraintType.type, newTypeParam);
+                    inferredProp.mappedType = newMappedType;
+                    inferredProp.constraintType = getIndexType(newTypeParam);
+                }
+                else {
+                    inferredProp.mappedType = type.mappedType;
+                    inferredProp.constraintType = type.constraintType;
+                }
                 members.set(prop.escapedName, inferredProp);
             }
-            setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, undefined);
+            setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, indexInfos);
         }
         function getLowerBoundOfKeyType(type) {
             if (type.flags & 4194304) {
@@ -43914,11 +46946,27 @@ var ts;
         function getIsLateCheckFlag(s) {
             return ts.getCheckFlags(s) & 4096;
         }
+        function forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(type, include, stringsOnly, cb) {
+            for (var _i = 0, _a = getPropertiesOfType(type); _i < _a.length; _i++) {
+                var prop = _a[_i];
+                cb(getLiteralTypeFromProperty(prop, include));
+            }
+            if (type.flags & 1) {
+                cb(stringType);
+            }
+            else {
+                for (var _b = 0, _c = getIndexInfosOfType(type); _b < _c.length; _b++) {
+                    var info = _c[_b];
+                    if (!stringsOnly || info.keyType.flags & (4 | 134217728)) {
+                        cb(info.keyType);
+                    }
+                }
+            }
+        }
         function resolveMappedTypeMembers(type) {
             var members = ts.createSymbolTable();
-            var stringIndexInfo;
-            var numberIndexInfo;
-            setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
+            var indexInfos;
+            setStructuredTypeMembers(type, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
             var typeParameter = getTypeParameterFromMappedType(type);
             var constraintType = getConstraintTypeFromMappedType(type);
             var nameType = getNameTypeFromMappedType(type.target || type);
@@ -43927,21 +46975,12 @@ var ts;
             var templateModifiers = getMappedTypeModifiers(type);
             var include = keyofStringsOnly ? 128 : 8576;
             if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
-                for (var _i = 0, _a = getPropertiesOfType(modifiersType); _i < _a.length; _i++) {
-                    var prop = _a[_i];
-                    addMemberForKeyType(getLiteralTypeFromProperty(prop, include));
-                }
-                if (modifiersType.flags & 1 || getIndexInfoOfType(modifiersType, 0)) {
-                    addMemberForKeyType(stringType);
-                }
-                if (!keyofStringsOnly && getIndexInfoOfType(modifiersType, 1)) {
-                    addMemberForKeyType(numberType);
-                }
+                forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, include, keyofStringsOnly, addMemberForKeyType);
             }
             else {
                 forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
             }
-            setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo);
+            setStructuredTypeMembers(type, members, ts.emptyArray, ts.emptyArray, indexInfos || ts.emptyArray);
             function addMemberForKeyType(keyType) {
                 var propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType;
                 forEachType(propNameType, function (t) { return addMemberForKeyTypeWorker(keyType, t); });
@@ -43968,19 +47007,18 @@ var ts;
                         prop.keyType = keyType;
                         if (modifiersProp) {
                             prop.syntheticOrigin = modifiersProp;
-                            prop.declarations = modifiersProp.declarations;
+                            prop.declarations = nameType ? undefined : modifiersProp.declarations;
                         }
                         members.set(propName, prop);
                     }
                 }
-                else if (propNameType.flags & (1 | 4 | 8 | 32)) {
+                else if (isValidIndexKeyType(propNameType) || propNameType.flags & (1 | 32)) {
+                    var indexKeyType = propNameType.flags & (1 | 4) ? stringType :
+                        propNameType.flags & (8 | 32) ? numberType :
+                            propNameType;
                     var propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType));
-                    if (propNameType.flags & (1 | 4)) {
-                        stringIndexInfo = createIndexInfo(stringIndexInfo ? getUnionType([stringIndexInfo.type, propType]) : propType, !!(templateModifiers & 1));
-                    }
-                    else {
-                        numberIndexInfo = createIndexInfo(numberIndexInfo ? getUnionType([numberIndexInfo.type, propType]) : propType, !!(templateModifiers & 1));
-                    }
+                    var indexInfo = createIndexInfo(indexKeyType, propType, !!(templateModifiers & 1));
+                    indexInfos = appendIndexInfo(indexInfos, indexInfo, true);
                 }
             }
         }
@@ -43994,8 +47032,8 @@ var ts;
                 var templateType = getTemplateTypeFromMappedType(mappedType.target || mappedType);
                 var mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.keyType);
                 var propType = instantiateType(templateType, mapper);
-                var type = strictNullChecks && symbol.flags & 16777216 && !maybeTypeOfKind(propType, 32768 | 16384) ? getOptionalType(propType) :
-                    symbol.checkFlags & 524288 ? getTypeWithFacts(propType, 524288) :
+                var type = strictNullChecks && symbol.flags & 16777216 && !maybeTypeOfKind(propType, 32768 | 16384) ? getOptionalType(propType, true) :
+                    symbol.checkFlags & 524288 ? removeMissingOrUndefinedType(propType) :
                         propType;
                 if (!popTypeResolution()) {
                     error(currentNode, ts.Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType));
@@ -44021,7 +47059,7 @@ var ts;
         function getTemplateTypeFromMappedType(type) {
             return type.templateType ||
                 (type.templateType = type.declaration.type ?
-                    instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), !!(getMappedTypeModifiers(type) & 4)), type.mapper) :
+                    instantiateType(addOptionality(getTypeFromTypeNode(type.declaration.type), true, !!(getMappedTypeModifiers(type) & 4)), type.mapper) :
                     errorType);
         }
         function getConstraintDeclarationForMappedType(type) {
@@ -44029,8 +47067,8 @@ var ts;
         }
         function isMappedTypeWithKeyofConstraintDeclaration(type) {
             var constraintDeclaration = getConstraintDeclarationForMappedType(type);
-            return constraintDeclaration.kind === 188 &&
-                constraintDeclaration.operator === 138;
+            return constraintDeclaration.kind === 192 &&
+                constraintDeclaration.operator === 140;
         }
         function getModifiersTypeFromMappedType(type) {
             if (!type.modifiersType) {
@@ -44075,7 +47113,7 @@ var ts;
                     else if (type.objectFlags & 3) {
                         resolveClassOrInterfaceMembers(type);
                     }
-                    else if (type.objectFlags & 2048) {
+                    else if (type.objectFlags & 1024) {
                         resolveReverseMappedTypeMembers(type);
                     }
                     else if (type.objectFlags & 16) {
@@ -44123,7 +47161,7 @@ var ts;
                             }
                         }
                     }
-                    if (type.flags & 1048576 && !getIndexInfoOfType(current, 0) && !getIndexInfoOfType(current, 1)) {
+                    if (type.flags & 1048576 && getIndexInfosOfType(current).length === 0) {
                         break;
                     }
                 }
@@ -44137,6 +47175,16 @@ var ts;
                 getPropertiesOfUnionOrIntersectionType(type) :
                 getPropertiesOfObjectType(type);
         }
+        function forEachPropertyOfType(type, action) {
+            type = getReducedApparentType(type);
+            if (type.flags & 3670016) {
+                resolveStructuredTypeMembers(type).members.forEach(function (symbol, escapedName) {
+                    if (isNamedMember(symbol, escapedName)) {
+                        action(symbol, escapedName);
+                    }
+                });
+            }
+        }
         function isTypeInvalidDueToUnionDiscriminant(contextualType, obj) {
             var list = obj.properties;
             return list.some(function (property) {
@@ -44152,8 +47200,8 @@ var ts;
                 return getAugmentedPropertiesOfType(unionType);
             }
             var props = ts.createSymbolTable();
-            for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
-                var memberType = types_5[_i];
+            for (var _i = 0, types_4 = types; _i < types_4.length; _i++) {
+                var memberType = types_4[_i];
                 for (var _a = 0, _b = getAugmentedPropertiesOfType(memberType); _a < _b.length; _a++) {
                     var escapedName = _b[_a].escapedName;
                     if (!props.has(escapedName)) {
@@ -44184,14 +47232,14 @@ var ts;
         function getConstraintFromIndexedAccess(type) {
             var indexConstraint = getSimplifiedTypeOrConstraint(type.indexType);
             if (indexConstraint && indexConstraint !== type.indexType) {
-                var indexedAccess = getIndexedAccessTypeOrUndefined(type.objectType, indexConstraint, type.noUncheckedIndexedAccessCandidate);
+                var indexedAccess = getIndexedAccessTypeOrUndefined(type.objectType, indexConstraint, type.accessFlags);
                 if (indexedAccess) {
                     return indexedAccess;
                 }
             }
             var objectConstraint = getSimplifiedTypeOrConstraint(type.objectType);
             if (objectConstraint && objectConstraint !== type.objectType) {
-                return getIndexedAccessTypeOrUndefined(objectConstraint, type.indexType, type.noUncheckedIndexedAccessCandidate);
+                return getIndexedAccessTypeOrUndefined(objectConstraint, type.indexType, type.accessFlags);
             }
             return undefined;
         }
@@ -44225,8 +47273,8 @@ var ts;
         function getEffectiveConstraintOfIntersection(types, targetIsUnion) {
             var constraints;
             var hasDisjointDomainType = false;
-            for (var _i = 0, types_6 = types; _i < types_6.length; _i++) {
-                var t = types_6[_i];
+            for (var _i = 0, types_5 = types; _i < types_5.length; _i++) {
+                var t = types_5[_i];
                 if (t.flags & 465829888) {
                     var constraint = getConstraintOfType(t);
                     while (constraint && constraint.flags & (262144 | 4194304 | 16777216)) {
@@ -44245,8 +47293,8 @@ var ts;
             }
             if (constraints && (targetIsUnion || hasDisjointDomainType)) {
                 if (hasDisjointDomainType) {
-                    for (var _a = 0, types_7 = types; _a < types_7.length; _a++) {
-                        var t = types_7[_a];
+                    for (var _a = 0, types_6 = types; _a < types_6.length; _a++) {
+                        var t = types_6[_a];
                         if (t.flags & 469892092) {
                             constraints = ts.append(constraints, t);
                         }
@@ -44317,8 +47365,8 @@ var ts;
                     var types = t.types;
                     var baseTypes = [];
                     var different = false;
-                    for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
-                        var type_3 = types_8[_i];
+                    for (var _i = 0, types_7 = types; _i < types_7.length; _i++) {
+                        var type_3 = types_7[_i];
                         var baseType = getBaseConstraint(type_3);
                         if (baseType) {
                             if (baseType !== type_3) {
@@ -44352,7 +47400,7 @@ var ts;
                 if (t.flags & 8388608) {
                     var baseObjectType = getBaseConstraint(t.objectType);
                     var baseIndexType = getBaseConstraint(t.indexType);
-                    var baseIndexedAccess = baseObjectType && baseIndexType && getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, t.noUncheckedIndexedAccessCandidate);
+                    var baseIndexedAccess = baseObjectType && baseIndexType && getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, t.accessFlags);
                     return baseIndexedAccess && getBaseConstraint(baseIndexedAccess);
                 }
                 if (t.flags & 16777216) {
@@ -44429,17 +47477,19 @@ var ts;
             return getReducedType(getApparentType(getReducedType(type)));
         }
         function createUnionOrIntersectionProperty(containingType, name, skipObjectFunctionPropertyAugment) {
+            var _a, _b;
             var singleProp;
             var propSet;
             var indexTypes;
             var isUnion = containingType.flags & 1048576;
             var optionalFlag = isUnion ? 0 : 16777216;
             var syntheticFlag = 4;
-            var checkFlags = 0;
-            for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
-                var current = _a[_i];
+            var checkFlags = isUnion ? 0 : 8;
+            var mergedInstantiations = false;
+            for (var _i = 0, _c = containingType.types; _i < _c.length; _i++) {
+                var current = _c[_i];
                 var type = getApparentType(current);
-                if (!(type === errorType || type.flags & 131072)) {
+                if (!(isErrorType(type) || type.flags & 131072)) {
                     var prop = getPropertyOfType(type, name, skipObjectFunctionPropertyAugment);
                     var modifiers = prop ? ts.getDeclarationModifierFlagsFromSymbol(prop) : 0;
                     if (prop) {
@@ -44453,17 +47503,28 @@ var ts;
                             singleProp = prop;
                         }
                         else if (prop !== singleProp) {
-                            if (!propSet) {
-                                propSet = new ts.Map();
-                                propSet.set(getSymbolId(singleProp), singleProp);
+                            var isInstantiation = (getTargetSymbol(prop) || prop) === (getTargetSymbol(singleProp) || singleProp);
+                            if (isInstantiation && compareProperties(singleProp, prop, function (a, b) { return a === b ? -1 : 0; }) === -1) {
+                                mergedInstantiations = !!singleProp.parent && !!ts.length(getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(singleProp.parent));
                             }
-                            var id = getSymbolId(prop);
-                            if (!propSet.has(id)) {
-                                propSet.set(id, prop);
+                            else {
+                                if (!propSet) {
+                                    propSet = new ts.Map();
+                                    propSet.set(getSymbolId(singleProp), singleProp);
+                                }
+                                var id = getSymbolId(prop);
+                                if (!propSet.has(id)) {
+                                    propSet.set(id, prop);
+                                }
                             }
                         }
-                        checkFlags |= (isReadonlySymbol(prop) ? 8 : 0) |
-                            (!(modifiers & 24) ? 256 : 0) |
+                        if (isUnion && isReadonlySymbol(prop)) {
+                            checkFlags |= 8;
+                        }
+                        else if (!isUnion && !isReadonlySymbol(prop)) {
+                            checkFlags &= ~8;
+                        }
+                        checkFlags |= (!(modifiers & 24) ? 256 : 0) |
                             (modifiers & 16 ? 512 : 0) |
                             (modifiers & 8 ? 1024 : 0) |
                             (modifiers & 32 ? 2048 : 0);
@@ -44472,12 +47533,12 @@ var ts;
                         }
                     }
                     else if (isUnion) {
-                        var indexInfo = !isLateBoundName(name) && (isNumericLiteralName(name) && getIndexInfoOfType(type, 1) || getIndexInfoOfType(type, 0));
+                        var indexInfo = !isLateBoundName(name) && getApplicableIndexInfoForName(type, name);
                         if (indexInfo) {
                             checkFlags |= 32 | (indexInfo.isReadonly ? 8 : 0);
                             indexTypes = ts.append(indexTypes, isTupleType(type) ? getRestTypeOfTupleType(type) || undefinedType : indexInfo.type);
                         }
-                        else if (isObjectLiteralType(type)) {
+                        else if (isObjectLiteralType(type) && !(ts.getObjectFlags(type) & 4194304)) {
                             checkFlags |= 32;
                             indexTypes = ts.append(indexTypes, undefinedType);
                         }
@@ -44491,7 +47552,16 @@ var ts;
                 return undefined;
             }
             if (!propSet && !(checkFlags & 16) && !indexTypes) {
-                return singleProp;
+                if (mergedInstantiations) {
+                    var clone_1 = createSymbolWithType(singleProp, singleProp.type);
+                    clone_1.parent = (_b = (_a = singleProp.valueDeclaration) === null || _a === void 0 ? void 0 : _a.symbol) === null || _b === void 0 ? void 0 : _b.parent;
+                    clone_1.containingType = containingType;
+                    clone_1.mapper = singleProp.mapper;
+                    return clone_1;
+                }
+                else {
+                    return singleProp;
+                }
             }
             var props = propSet ? ts.arrayFrom(propSet.values()) : [singleProp];
             var declarations;
@@ -44500,8 +47570,8 @@ var ts;
             var propTypes = [];
             var firstValueDeclaration;
             var hasNonUniformValueDeclaration = false;
-            for (var _b = 0, props_1 = props; _b < props_1.length; _b++) {
-                var prop = props_1[_b];
+            for (var _d = 0, props_1 = props; _d < props_1.length; _d++) {
+                var prop = props_1[_d];
                 if (!firstValueDeclaration) {
                     firstValueDeclaration = prop.valueDeclaration;
                 }
@@ -44517,7 +47587,7 @@ var ts;
                 else if (type !== firstType) {
                     checkFlags |= 64;
                 }
-                if (isLiteralType(type)) {
+                if (isLiteralType(type) || isPatternLiteralType(type)) {
                     checkFlags |= 128;
                 }
                 if (type.flags & 131072) {
@@ -44564,15 +47634,15 @@ var ts;
             return property && !(ts.getCheckFlags(property) & 16) ? property : undefined;
         }
         function getReducedType(type) {
-            if (type.flags & 1048576 && type.objectFlags & 268435456) {
+            if (type.flags & 1048576 && type.objectFlags & 33554432) {
                 return type.resolvedReducedType || (type.resolvedReducedType = getReducedUnionType(type));
             }
             else if (type.flags & 2097152) {
-                if (!(type.objectFlags & 268435456)) {
-                    type.objectFlags |= 268435456 |
-                        (ts.some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 536870912 : 0);
+                if (!(type.objectFlags & 33554432)) {
+                    type.objectFlags |= 33554432 |
+                        (ts.some(getPropertiesOfUnionOrIntersectionType(type), isNeverReducedProperty) ? 67108864 : 0);
                 }
-                return type.objectFlags & 536870912 ? neverType : type;
+                return type.objectFlags & 67108864 ? neverType : type;
             }
             return type;
         }
@@ -44599,7 +47669,7 @@ var ts;
             return !prop.valueDeclaration && !!(ts.getCheckFlags(prop) & 1024);
         }
         function elaborateNeverIntersection(errorInfo, type) {
-            if (ts.getObjectFlags(type) & 536870912) {
+            if (type.flags & 2097152 && ts.getObjectFlags(type) & 67108864) {
                 var neverProp = ts.find(getPropertiesOfUnionOrIntersectionType(type), isDiscriminantWithNeverType);
                 if (neverProp) {
                     return ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.The_intersection_0_was_reduced_to_never_because_property_1_has_conflicting_types_in_some_constituents, typeToString(type, undefined, 536870912), symbolToString(neverProp));
@@ -44648,39 +47718,62 @@ var ts;
         function getSignaturesOfType(type, kind) {
             return getSignaturesOfStructuredType(getReducedApparentType(type), kind);
         }
-        function getIndexInfoOfStructuredType(type, kind) {
+        function findIndexInfo(indexInfos, keyType) {
+            return ts.find(indexInfos, function (info) { return info.keyType === keyType; });
+        }
+        function findApplicableIndexInfo(indexInfos, keyType) {
+            var stringIndexInfo;
+            var applicableInfo;
+            var applicableInfos;
+            for (var _i = 0, indexInfos_1 = indexInfos; _i < indexInfos_1.length; _i++) {
+                var info = indexInfos_1[_i];
+                if (info.keyType === stringType) {
+                    stringIndexInfo = info;
+                }
+                else if (isApplicableIndexType(keyType, info.keyType)) {
+                    if (!applicableInfo) {
+                        applicableInfo = info;
+                    }
+                    else {
+                        (applicableInfos || (applicableInfos = [applicableInfo])).push(info);
+                    }
+                }
+            }
+            return applicableInfos ? createIndexInfo(unknownType, getIntersectionType(ts.map(applicableInfos, function (info) { return info.type; })), ts.reduceLeft(applicableInfos, function (isReadonly, info) { return isReadonly && info.isReadonly; }, true)) :
+                applicableInfo ? applicableInfo :
+                    stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo :
+                        undefined;
+        }
+        function isApplicableIndexType(source, target) {
+            return isTypeAssignableTo(source, target) ||
+                target === stringType && isTypeAssignableTo(source, numberType) ||
+                target === numberType && !!(source.flags & 128) && isNumericLiteralName(source.value);
+        }
+        function getIndexInfosOfStructuredType(type) {
             if (type.flags & 3670016) {
                 var resolved = resolveStructuredTypeMembers(type);
-                return kind === 0 ? resolved.stringIndexInfo : resolved.numberIndexInfo;
+                return resolved.indexInfos;
             }
+            return ts.emptyArray;
         }
-        function getIndexTypeOfStructuredType(type, kind) {
-            var info = getIndexInfoOfStructuredType(type, kind);
-            return info && info.type;
+        function getIndexInfosOfType(type) {
+            return getIndexInfosOfStructuredType(getReducedApparentType(type));
         }
-        function getIndexInfoOfType(type, kind) {
-            return getIndexInfoOfStructuredType(getReducedApparentType(type), kind);
+        function getIndexInfoOfType(type, keyType) {
+            return findIndexInfo(getIndexInfosOfType(type), keyType);
         }
-        function getIndexTypeOfType(type, kind) {
-            return getIndexTypeOfStructuredType(getReducedApparentType(type), kind);
+        function getIndexTypeOfType(type, keyType) {
+            var _a;
+            return (_a = getIndexInfoOfType(type, keyType)) === null || _a === void 0 ? void 0 : _a.type;
         }
-        function getImplicitIndexTypeOfType(type, kind) {
-            if (isObjectTypeWithInferableIndex(type)) {
-                var propTypes = [];
-                for (var _i = 0, _a = getPropertiesOfType(type); _i < _a.length; _i++) {
-                    var prop = _a[_i];
-                    if (kind === 0 || isNumericLiteralName(prop.escapedName)) {
-                        propTypes.push(getTypeOfSymbol(prop));
-                    }
-                }
-                if (kind === 0) {
-                    ts.append(propTypes, getIndexTypeOfType(type, 1));
-                }
-                if (propTypes.length) {
-                    return getUnionType(propTypes);
-                }
-            }
-            return undefined;
+        function getApplicableIndexInfos(type, keyType) {
+            return getIndexInfosOfType(type).filter(function (info) { return isApplicableIndexType(keyType, info.keyType); });
+        }
+        function getApplicableIndexInfo(type, keyType) {
+            return findApplicableIndexInfo(getIndexInfosOfType(type), keyType);
+        }
+        function getApplicableIndexInfoForName(type, name) {
+            return getApplicableIndexInfo(type, isLateBoundName(name) ? esSymbolType : getStringLiteralType(ts.unescapeLeadingUnderscores(name)));
         }
         function getTypeParametersFromDeclaration(declaration) {
             var result;
@@ -44700,10 +47793,10 @@ var ts;
             return result;
         }
         function isJSDocOptionalParameter(node) {
-            return ts.isInJSFile(node) && (node.type && node.type.kind === 307
+            return ts.isInJSFile(node) && (node.type && node.type.kind === 314
                 || ts.getJSDocParameterTags(node).some(function (_a) {
                     var isBracketed = _a.isBracketed, typeExpression = _a.typeExpression;
-                    return isBracketed || !!typeExpression && typeExpression.type.kind === 307;
+                    return isBracketed || !!typeExpression && typeExpression.type.kind === 314;
                 }));
         }
         function tryFindAmbientModule(moduleName, withAugmentations) {
@@ -44731,12 +47824,15 @@ var ts;
             }
             return false;
         }
+        function isOptionalPropertyDeclaration(node) {
+            return ts.isPropertyDeclaration(node) && node.questionToken;
+        }
         function isOptionalJSDocPropertyLikeTag(node) {
             if (!ts.isJSDocPropertyLikeTag(node)) {
                 return false;
             }
             var isBracketed = node.isBracketed, typeExpression = node.typeExpression;
-            return isBracketed || !!typeExpression && typeExpression.type.kind === 307;
+            return isBracketed || !!typeExpression && typeExpression.type.kind === 314;
         }
         function createTypePredicate(kind, parameterName, parameterIndex, type) {
             return { kind: kind, parameterName: parameterName, parameterIndex: parameterIndex, type: type };
@@ -44809,27 +47905,27 @@ var ts;
                     else {
                         parameters.push(paramSymbol);
                     }
-                    if (type && type.kind === 191) {
+                    if (type && type.kind === 195) {
                         flags |= 2;
                     }
                     var isOptionalParameter_1 = isOptionalJSDocPropertyLikeTag(param) ||
-                        param.initializer || param.questionToken || param.dotDotDotToken ||
+                        param.initializer || param.questionToken || ts.isRestParameter(param) ||
                         iife && parameters.length > iife.arguments.length && !type ||
                         isJSDocOptionalParameter(param);
                     if (!isOptionalParameter_1) {
                         minArgumentCount = parameters.length;
                     }
                 }
-                if ((declaration.kind === 167 || declaration.kind === 168) &&
+                if ((declaration.kind === 171 || declaration.kind === 172) &&
                     hasBindableName(declaration) &&
                     (!hasThisParameter || !thisParameter)) {
-                    var otherKind = declaration.kind === 167 ? 168 : 167;
+                    var otherKind = declaration.kind === 171 ? 172 : 171;
                     var other = ts.getDeclarationOfKind(getSymbolOfNode(declaration), otherKind);
                     if (other) {
                         thisParameter = getAnnotatedAccessorThisParameter(other);
                     }
                 }
-                var classType = declaration.kind === 166 ?
+                var classType = declaration.kind === 170 ?
                     getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol))
                     : undefined;
                 var typeParameters = classType ? classType.localTypeParameters : getTypeParametersFromDeclaration(declaration);
@@ -44865,8 +47961,7 @@ var ts;
             if (!(ts.isInJSFile(node) && ts.isFunctionLikeDeclaration(node)))
                 return undefined;
             var typeTag = ts.getJSDocTypeTag(node);
-            var signature = typeTag && typeTag.typeExpression && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));
-            return signature && getErasedSignature(signature);
+            return (typeTag === null || typeTag === void 0 ? void 0 : typeTag.typeExpression) && getSingleCallSignature(getTypeFromTypeNode(typeTag.typeExpression));
         }
         function getReturnTypeOfTypeTag(node) {
             var signature = getSignatureOfTypeTag(node);
@@ -44887,16 +47982,16 @@ var ts;
                 if (!node)
                     return false;
                 switch (node.kind) {
-                    case 78:
-                        return node.escapedText === argumentsSymbol.escapedName && getResolvedSymbol(node) === argumentsSymbol;
-                    case 163:
-                    case 165:
-                    case 167:
+                    case 79:
+                        return node.escapedText === argumentsSymbol.escapedName && getReferencedValueSymbol(node) === argumentsSymbol;
+                    case 166:
                     case 168:
-                        return node.name.kind === 158
+                    case 171:
+                    case 172:
+                        return node.name.kind === 161
                             && traverse(node.name);
-                    case 201:
-                    case 202:
+                    case 205:
+                    case 206:
                         return traverse(node.expression);
                     default:
                         return !ts.nodeStartsNewLexicalEnvironment(node) && !ts.isPartOfTypeNode(node) && !!ts.forEachChild(node, traverse);
@@ -44904,7 +47999,7 @@ var ts;
             }
         }
         function getSignaturesOfSymbol(symbol) {
-            if (!symbol)
+            if (!symbol || !symbol.declarations)
                 return ts.emptyArray;
             var result = [];
             for (var i = 0; i < symbol.declarations.length; i++) {
@@ -44942,8 +48037,8 @@ var ts;
                     var targetTypePredicate = getTypePredicateOfSignature(signature.target);
                     signature.resolvedTypePredicate = targetTypePredicate ? instantiateTypePredicate(targetTypePredicate, signature.mapper) : noTypePredicate;
                 }
-                else if (signature.unionSignatures) {
-                    signature.resolvedTypePredicate = getUnionTypePredicate(signature.unionSignatures) || noTypePredicate;
+                else if (signature.compositeSignatures) {
+                    signature.resolvedTypePredicate = getUnionOrIntersectionTypePredicate(signature.compositeSignatures, signature.compositeKind) || noTypePredicate;
                 }
                 else {
                     var type = signature.declaration && ts.getEffectiveReturnTypeNode(signature.declaration);
@@ -44965,17 +48060,20 @@ var ts;
         function createTypePredicateFromTypePredicateNode(node, signature) {
             var parameterName = node.parameterName;
             var type = node.type && getTypeFromTypeNode(node.type);
-            return parameterName.kind === 187 ?
+            return parameterName.kind === 191 ?
                 createTypePredicate(node.assertsModifier ? 2 : 0, undefined, undefined, type) :
                 createTypePredicate(node.assertsModifier ? 3 : 1, parameterName.escapedText, ts.findIndex(signature.parameters, function (p) { return p.escapedName === parameterName.escapedText; }), type);
         }
+        function getUnionOrIntersectionType(types, kind, unionReduction) {
+            return kind !== 2097152 ? getUnionType(types, unionReduction) : getIntersectionType(types);
+        }
         function getReturnTypeOfSignature(signature) {
             if (!signature.resolvedReturnType) {
                 if (!pushTypeResolution(signature, 3)) {
                     return errorType;
                 }
                 var type = signature.target ? instantiateType(getReturnTypeOfSignature(signature.target), signature.mapper) :
-                    signature.unionSignatures ? instantiateType(getUnionType(ts.map(signature.unionSignatures, getReturnTypeOfSignature), 2), signature.mapper) :
+                    signature.compositeSignatures ? instantiateType(getUnionOrIntersectionType(ts.map(signature.compositeSignatures, getReturnTypeOfSignature), signature.compositeKind, 2), signature.mapper) :
                         getReturnTypeFromAnnotation(signature.declaration) ||
                             (ts.nodeIsMissing(signature.declaration.body) ? anyType : getReturnTypeFromBody(signature.declaration));
                 if (signature.flags & 8) {
@@ -45008,7 +48106,7 @@ var ts;
             return signature.resolvedReturnType;
         }
         function getReturnTypeFromAnnotation(declaration) {
-            if (declaration.kind === 166) {
+            if (declaration.kind === 170) {
                 return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol));
             }
             if (ts.isJSDocConstructSignature(declaration)) {
@@ -45018,12 +48116,12 @@ var ts;
             if (typeNode) {
                 return getTypeFromTypeNode(typeNode);
             }
-            if (declaration.kind === 167 && hasBindableName(declaration)) {
+            if (declaration.kind === 171 && hasBindableName(declaration)) {
                 var jsDocType = ts.isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration);
                 if (jsDocType) {
                     return jsDocType;
                 }
-                var setter = ts.getDeclarationOfKind(getSymbolOfNode(declaration), 168);
+                var setter = ts.getDeclarationOfKind(getSymbolOfNode(declaration), 172);
                 var setterType = getAnnotatedAccessorType(setter);
                 if (setterType) {
                     return setterType;
@@ -45041,7 +48139,7 @@ var ts;
             if (signatureHasRestParameter(signature)) {
                 var sigRestType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]);
                 var restType = isTupleType(sigRestType) ? getRestTypeOfTupleType(sigRestType) : sigRestType;
-                return restType && getIndexTypeOfType(restType, 1);
+                return restType && getIndexTypeOfType(restType, numberType);
             }
             return undefined;
         }
@@ -45093,66 +48191,86 @@ var ts;
         function getBaseSignature(signature) {
             var typeParameters = signature.typeParameters;
             if (typeParameters) {
-                var typeEraser_1 = createTypeEraser(typeParameters);
-                var baseConstraints = ts.map(typeParameters, function (tp) { return instantiateType(getBaseConstraintOfType(tp), typeEraser_1) || unknownType; });
-                return instantiateSignature(signature, createTypeMapper(typeParameters, baseConstraints), true);
+                if (signature.baseSignatureCache) {
+                    return signature.baseSignatureCache;
+                }
+                var typeEraser = createTypeEraser(typeParameters);
+                var baseConstraintMapper_1 = createTypeMapper(typeParameters, ts.map(typeParameters, function (tp) { return getConstraintOfTypeParameter(tp) || unknownType; }));
+                var baseConstraints = ts.map(typeParameters, function (tp) { return instantiateType(tp, baseConstraintMapper_1) || unknownType; });
+                for (var i = 0; i < typeParameters.length - 1; i++) {
+                    baseConstraints = instantiateTypes(baseConstraints, baseConstraintMapper_1);
+                }
+                baseConstraints = instantiateTypes(baseConstraints, typeEraser);
+                return signature.baseSignatureCache = instantiateSignature(signature, createTypeMapper(typeParameters, baseConstraints), true);
             }
             return signature;
         }
         function getOrCreateTypeFromSignature(signature) {
             if (!signature.isolatedSignatureType) {
                 var kind = signature.declaration ? signature.declaration.kind : 0;
-                var isConstructor = kind === 166 || kind === 170 || kind === 175;
+                var isConstructor = kind === 170 || kind === 174 || kind === 179;
                 var type = createObjectType(16);
                 type.members = emptySymbols;
                 type.properties = ts.emptyArray;
                 type.callSignatures = !isConstructor ? [signature] : ts.emptyArray;
                 type.constructSignatures = isConstructor ? [signature] : ts.emptyArray;
+                type.indexInfos = ts.emptyArray;
                 signature.isolatedSignatureType = type;
             }
             return signature.isolatedSignatureType;
         }
         function getIndexSymbol(symbol) {
-            return symbol.members.get("__index");
+            return symbol.members ? getIndexSymbolFromSymbolTable(symbol.members) : undefined;
+        }
+        function getIndexSymbolFromSymbolTable(symbolTable) {
+            return symbolTable.get("__index");
+        }
+        function createIndexInfo(keyType, type, isReadonly, declaration) {
+            return { keyType: keyType, type: type, isReadonly: isReadonly, declaration: declaration };
         }
-        function getIndexDeclarationOfSymbol(symbol, kind) {
-            var syntaxKind = kind === 1 ? 144 : 147;
+        function getIndexInfosOfSymbol(symbol) {
             var indexSymbol = getIndexSymbol(symbol);
-            if (indexSymbol) {
-                for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
-                    var decl = _a[_i];
-                    var node = ts.cast(decl, ts.isIndexSignatureDeclaration);
-                    if (node.parameters.length === 1) {
-                        var parameter = node.parameters[0];
-                        if (parameter.type && parameter.type.kind === syntaxKind) {
-                            return node;
+            return indexSymbol ? getIndexInfosOfIndexSymbol(indexSymbol) : ts.emptyArray;
+        }
+        function getIndexInfosOfIndexSymbol(indexSymbol) {
+            if (indexSymbol.declarations) {
+                var indexInfos_2 = [];
+                var _loop_14 = function (declaration) {
+                    if (declaration.parameters.length === 1) {
+                        var parameter = declaration.parameters[0];
+                        if (parameter.type) {
+                            forEachType(getTypeFromTypeNode(parameter.type), function (keyType) {
+                                if (isValidIndexKeyType(keyType) && !findIndexInfo(indexInfos_2, keyType)) {
+                                    indexInfos_2.push(createIndexInfo(keyType, declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, ts.hasEffectiveModifier(declaration, 64), declaration));
+                                }
+                            });
                         }
                     }
+                };
+                for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
+                    var declaration = _a[_i];
+                    _loop_14(declaration);
                 }
+                return indexInfos_2;
             }
-            return undefined;
+            return ts.emptyArray;
         }
-        function createIndexInfo(type, isReadonly, declaration) {
-            return { type: type, isReadonly: isReadonly, declaration: declaration };
-        }
-        function getIndexInfoOfSymbol(symbol, kind) {
-            var declaration = getIndexDeclarationOfSymbol(symbol, kind);
-            if (declaration) {
-                return createIndexInfo(declaration.type ? getTypeFromTypeNode(declaration.type) : anyType, ts.hasEffectiveModifier(declaration, 64), declaration);
-            }
-            return undefined;
+        function isValidIndexKeyType(type) {
+            return !!(type.flags & (4 | 8 | 4096)) || isPatternLiteralType(type) ||
+                !!(type.flags & 2097152) && !isGenericType(type) && ts.some(type.types, isValidIndexKeyType);
         }
         function getConstraintDeclaration(type) {
             return ts.mapDefined(ts.filter(type.symbol && type.symbol.declarations, ts.isTypeParameterDeclaration), ts.getEffectiveConstraintOfTypeParameter)[0];
         }
         function getInferredTypeParameterConstraint(typeParameter) {
+            var _a;
             var inferences;
-            if (typeParameter.symbol) {
-                for (var _i = 0, _a = typeParameter.symbol.declarations; _i < _a.length; _i++) {
-                    var declaration = _a[_i];
-                    if (declaration.parent.kind === 185) {
-                        var _b = ts.walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent), _c = _b[0], childTypeParameter = _c === void 0 ? declaration.parent : _c, grandParent = _b[1];
-                        if (grandParent.kind === 173) {
+            if ((_a = typeParameter.symbol) === null || _a === void 0 ? void 0 : _a.declarations) {
+                for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
+                    var declaration = _b[_i];
+                    if (declaration.parent.kind === 189) {
+                        var _c = ts.walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent), _d = _c[0], childTypeParameter = _d === void 0 ? declaration.parent : _d, grandParent = _c[1];
+                        if (grandParent.kind === 177) {
                             var typeReference = grandParent;
                             var typeParameters = getTypeParametersForTypeReference(typeReference);
                             if (typeParameters) {
@@ -45169,17 +48287,25 @@ var ts;
                                 }
                             }
                         }
-                        else if (grandParent.kind === 160 && grandParent.dotDotDotToken ||
-                            grandParent.kind === 181 ||
-                            grandParent.kind === 192 && grandParent.dotDotDotToken) {
+                        else if (grandParent.kind === 163 && grandParent.dotDotDotToken ||
+                            grandParent.kind === 185 ||
+                            grandParent.kind === 196 && grandParent.dotDotDotToken) {
                             inferences = ts.append(inferences, createArrayType(unknownType));
                         }
-                        else if (grandParent.kind === 194) {
+                        else if (grandParent.kind === 198) {
                             inferences = ts.append(inferences, stringType);
                         }
-                        else if (grandParent.kind === 159 && grandParent.parent.kind === 190) {
+                        else if (grandParent.kind === 162 && grandParent.parent.kind === 194) {
                             inferences = ts.append(inferences, keyofConstraintType);
                         }
+                        else if (grandParent.kind === 194 && grandParent.type &&
+                            ts.skipParentheses(grandParent.type) === declaration.parent && grandParent.parent.kind === 188 &&
+                            grandParent.parent.extendsType === grandParent && grandParent.parent.checkType.kind === 194 &&
+                            grandParent.parent.checkType.type) {
+                            var checkMappedType_1 = grandParent.parent.checkType;
+                            var nodeType = getTypeFromTypeNode(checkMappedType_1.type);
+                            inferences = ts.append(inferences, instantiateType(nodeType, makeUnaryTypeMapper(getDeclaredTypeOfTypeParameter(getSymbolOfNode(checkMappedType_1.typeParameter)), checkMappedType_1.typeParameter.constraint ? getTypeFromTypeNode(checkMappedType_1.typeParameter.constraint) : keyofConstraintType)));
+                        }
                     }
                 }
             }
@@ -45198,8 +48324,8 @@ var ts;
                     }
                     else {
                         var type = getTypeFromTypeNode(constraintDeclaration);
-                        if (type.flags & 1 && type !== errorType) {
-                            type = constraintDeclaration.parent.parent.kind === 190 ? keyofConstraintType : unknownType;
+                        if (type.flags & 1 && !isErrorType(type)) {
+                            type = constraintDeclaration.parent.parent.kind === 194 ? keyofConstraintType : unknownType;
                         }
                         typeParameter.constraint = type;
                     }
@@ -45208,8 +48334,8 @@ var ts;
             return typeParameter.constraint === noConstraintType ? undefined : typeParameter.constraint;
         }
         function getParentSymbolOfTypeParameter(typeParameter) {
-            var tp = ts.getDeclarationOfKind(typeParameter.symbol, 159);
-            var host = ts.isJSDocTemplateTag(tp.parent) ? ts.getHostSignatureFromJSDoc(tp.parent) : tp.parent;
+            var tp = ts.getDeclarationOfKind(typeParameter.symbol, 162);
+            var host = ts.isJSDocTemplateTag(tp.parent) ? ts.getEffectiveContainerForJSDocTemplateTag(tp.parent) : tp.parent;
             return host && getSymbolOfNode(host);
         }
         function getTypeListId(types) {
@@ -45236,17 +48362,17 @@ var ts;
             return result;
         }
         function getAliasId(aliasSymbol, aliasTypeArguments) {
-            return aliasSymbol ? "@" + getSymbolId(aliasSymbol) + (aliasTypeArguments ? ":" + getTypeListId(aliasTypeArguments) : "") : "";
+            return aliasSymbol ? "@".concat(getSymbolId(aliasSymbol)) + (aliasTypeArguments ? ":".concat(getTypeListId(aliasTypeArguments)) : "") : "";
         }
         function getPropagatingFlagsOfTypes(types, excludeKinds) {
             var result = 0;
-            for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
-                var type = types_9[_i];
+            for (var _i = 0, types_8 = types; _i < types_8.length; _i++) {
+                var type = types_8[_i];
                 if (!(type.flags & excludeKinds)) {
                     result |= ts.getObjectFlags(type);
                 }
             }
-            return result & 3670016;
+            return result & 917504;
         }
         function createTypeReference(target, typeArguments) {
             var id = getTypeListId(typeArguments);
@@ -45290,8 +48416,8 @@ var ts;
                 }
                 var node = type.node;
                 var typeArguments = !node ? ts.emptyArray :
-                    node.kind === 173 ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) :
-                        node.kind === 178 ? [getTypeFromTypeNode(node.elementType)] :
+                    node.kind === 177 ? ts.concatenate(type.target.outerTypeParameters, getEffectiveTypeArguments(node, type.target.localTypeParameters)) :
+                        node.kind === 182 ? [getTypeFromTypeNode(node.elementType)] :
                             ts.map(node.elements, getTypeFromTypeNode);
                 if (popTypeResolution()) {
                     type.resolvedTypeArguments = type.mapper ? instantiateTypes(typeArguments, type.mapper) : typeArguments;
@@ -45329,7 +48455,7 @@ var ts;
                         return errorType;
                     }
                 }
-                if (node.kind === 173 && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) {
+                if (node.kind === 177 && isDeferredTypeReferenceNode(node, ts.length(node.typeArguments) !== typeParameters.length)) {
                     return createDeferredTypeReference(type, node, undefined);
                 }
                 var typeArguments = ts.concatenate(type.outerTypeParameters, fillMissingTypeArguments(typeArgumentsFromTypeReferenceNode(node), typeParameters, minTypeArgumentCount, isJs));
@@ -45352,6 +48478,18 @@ var ts;
             return instantiation;
         }
         function getTypeFromTypeAliasReference(node, symbol) {
+            if (ts.getCheckFlags(symbol) & 1048576) {
+                var typeArguments = typeArgumentsFromTypeReferenceNode(node);
+                var id = getAliasId(symbol, typeArguments);
+                var errorType_1 = errorTypes.get(id);
+                if (!errorType_1) {
+                    errorType_1 = createIntrinsicType(1, "error");
+                    errorType_1.aliasSymbol = symbol;
+                    errorType_1.aliasTypeArguments = typeArguments;
+                    errorTypes.set(id, errorType_1);
+                }
+                return errorType_1;
+            }
             var type = getDeclaredTypeOfSymbol(symbol);
             var typeParameters = getSymbolLinks(symbol).typeParameters;
             if (typeParameters) {
@@ -45364,15 +48502,21 @@ var ts;
                     return errorType;
                 }
                 var aliasSymbol = getAliasSymbolForTypeNode(node);
-                return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol));
+                var newAliasSymbol = aliasSymbol && (isLocalTypeAlias(symbol) || !isLocalTypeAlias(aliasSymbol)) ? aliasSymbol : undefined;
+                return getTypeAliasInstantiation(symbol, typeArgumentsFromTypeReferenceNode(node), newAliasSymbol, getTypeArgumentsForAliasSymbol(newAliasSymbol));
             }
             return checkNoTypeArguments(node, symbol) ? type : errorType;
         }
+        function isLocalTypeAlias(symbol) {
+            var _a;
+            var declaration = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isTypeAlias);
+            return !!(declaration && ts.getContainingFunction(declaration));
+        }
         function getTypeReferenceName(node) {
             switch (node.kind) {
-                case 173:
+                case 177:
                     return node.typeName;
-                case 223:
+                case 227:
                     var expr = node.expression;
                     if (ts.isEntityNameExpression(expr)) {
                         return expr;
@@ -45380,11 +48524,37 @@ var ts;
             }
             return undefined;
         }
-        function resolveTypeReferenceName(typeReferenceName, meaning, ignoreErrors) {
-            if (!typeReferenceName) {
+        function getSymbolPath(symbol) {
+            return symbol.parent ? "".concat(getSymbolPath(symbol.parent), ".").concat(symbol.escapedName) : symbol.escapedName;
+        }
+        function getUnresolvedSymbolForEntityName(name) {
+            var identifier = name.kind === 160 ? name.right :
+                name.kind === 205 ? name.name :
+                    name;
+            var text = identifier.escapedText;
+            if (text) {
+                var parentSymbol = name.kind === 160 ? getUnresolvedSymbolForEntityName(name.left) :
+                    name.kind === 205 ? getUnresolvedSymbolForEntityName(name.expression) :
+                        undefined;
+                var path = parentSymbol ? "".concat(getSymbolPath(parentSymbol), ".").concat(text) : text;
+                var result = unresolvedSymbols.get(path);
+                if (!result) {
+                    unresolvedSymbols.set(path, result = createSymbol(524288, text, 1048576));
+                    result.parent = parentSymbol;
+                    result.declaredType = unresolvedType;
+                }
+                return result;
+            }
+            return unknownSymbol;
+        }
+        function resolveTypeReferenceName(typeReference, meaning, ignoreErrors) {
+            var name = getTypeReferenceName(typeReference);
+            if (!name) {
                 return unknownSymbol;
             }
-            return resolveEntityName(typeReferenceName, meaning, ignoreErrors) || unknownSymbol;
+            var symbol = resolveEntityName(name, meaning, ignoreErrors);
+            return symbol && symbol !== unknownSymbol ? symbol :
+                ignoreErrors ? unknownSymbol : getUnresolvedSymbolForEntityName(name);
         }
         function getTypeReferenceType(node, symbol) {
             if (symbol === unknownSymbol) {
@@ -45407,7 +48577,7 @@ var ts;
                     return jsdocType;
                 }
                 else {
-                    resolveTypeReferenceName(getTypeReferenceName(node), 788968);
+                    resolveTypeReferenceName(node, 788968);
                     return getTypeOfSymbol(symbol);
                 }
             }
@@ -45419,7 +48589,7 @@ var ts;
                 var valueType = getTypeOfSymbol(symbol);
                 var typeType = valueType;
                 if (symbol.valueDeclaration) {
-                    var isImportTypeWithQualifier = node.kind === 195 && node.qualifier;
+                    var isImportTypeWithQualifier = node.kind === 199 && node.qualifier;
                     if (valueType.symbol && valueType.symbol !== symbol && isImportTypeWithQualifier) {
                         typeType = getTypeReferenceType(node, valueType.symbol);
                     }
@@ -45432,7 +48602,7 @@ var ts;
             if (substitute.flags & 3 || substitute === baseType) {
                 return baseType;
             }
-            var id = getTypeId(baseType) + ">" + getTypeId(substitute);
+            var id = "".concat(getTypeId(baseType), ">").concat(getTypeId(substitute));
             var cached = substitutionTypes.get(id);
             if (cached) {
                 return cached;
@@ -45444,7 +48614,7 @@ var ts;
             return result;
         }
         function isUnaryTupleTypeNode(node) {
-            return node.kind === 179 && node.elements.length === 1;
+            return node.kind === 183 && node.elements.length === 1;
         }
         function getImpliedConstraint(type, checkNode, extendsNode) {
             return isUnaryTupleTypeNode(checkNode) && isUnaryTupleTypeNode(extendsNode) ? getImpliedConstraint(type, checkNode.elements[0], extendsNode.elements[0]) :
@@ -45453,9 +48623,13 @@ var ts;
         }
         function getConditionalFlowTypeOfType(type, node) {
             var constraints;
-            while (node && !ts.isStatement(node) && node.kind !== 311) {
+            var covariant = true;
+            while (node && !ts.isStatement(node) && node.kind !== 318) {
                 var parent = node.parent;
-                if (parent.kind === 184 && node === parent.trueType) {
+                if (parent.kind === 163) {
+                    covariant = !covariant;
+                }
+                if ((covariant || type.flags & 8650752) && parent.kind === 188 && node === parent.trueType) {
                     var constraint = getImpliedConstraint(type, parent.checkType, parent.extendsType);
                     if (constraint) {
                         constraints = ts.append(constraints, constraint);
@@ -45466,7 +48640,7 @@ var ts;
             return constraints ? getSubstitutionType(type, getIntersectionType(ts.append(constraints, type))) : type;
         }
         function isJSDocTypeReference(node) {
-            return !!(node.flags & 4194304) && (node.kind === 173 || node.kind === 195);
+            return !!(node.flags & 4194304) && (node.kind === 177 || node.kind === 199);
         }
         function checkNoTypeArguments(node, symbol) {
             if (node.typeArguments) {
@@ -45510,8 +48684,8 @@ var ts;
                             if (ts.isJSDocIndexSignature(node)) {
                                 var indexed = getTypeFromTypeNode(typeArgs[0]);
                                 var target = getTypeFromTypeNode(typeArgs[1]);
-                                var index = createIndexInfo(target, false);
-                                return createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, indexed === stringType ? index : undefined, indexed === numberType ? index : undefined);
+                                var indexInfo = indexed === stringType || indexed === numberType ? [createIndexInfo(indexed, target, false)] : ts.emptyArray;
+                                return createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, indexInfo);
                             }
                             return anyType;
                         }
@@ -45537,18 +48711,18 @@ var ts;
                 if (isJSDocTypeReference(node)) {
                     type = getIntendedTypeFromJSDocTypeReference(node);
                     if (!type) {
-                        symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning, true);
+                        symbol = resolveTypeReferenceName(node, meaning, true);
                         if (symbol === unknownSymbol) {
-                            symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning | 111551);
+                            symbol = resolveTypeReferenceName(node, meaning | 111551);
                         }
                         else {
-                            resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+                            resolveTypeReferenceName(node, meaning);
                         }
                         type = getTypeReferenceType(node, symbol);
                     }
                 }
                 if (!type) {
-                    symbol = resolveTypeReferenceName(getTypeReferenceName(node), meaning);
+                    symbol = resolveTypeReferenceName(node, meaning);
                     type = getTypeReferenceType(node, symbol);
                 }
                 links.resolvedSymbol = symbol;
@@ -45562,20 +48736,23 @@ var ts;
         function getTypeFromTypeQueryNode(node) {
             var links = getNodeLinks(node);
             if (!links.resolvedType) {
-                links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(checkExpression(node.exprName)));
+                var type = ts.isThisIdentifier(node.exprName) ? checkThisExpression(node.exprName) : checkExpression(node.exprName);
+                links.resolvedType = getRegularTypeOfLiteralType(getWidenedType(type));
             }
             return links.resolvedType;
         }
         function getTypeOfGlobalSymbol(symbol, arity) {
             function getTypeDeclaration(symbol) {
                 var declarations = symbol.declarations;
-                for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
-                    var declaration = declarations_3[_i];
-                    switch (declaration.kind) {
-                        case 252:
-                        case 253:
-                        case 255:
-                            return declaration;
+                if (declarations) {
+                    for (var _i = 0, declarations_3 = declarations; _i < declarations_3.length; _i++) {
+                        var declaration = declarations_3[_i];
+                        switch (declaration.kind) {
+                            case 256:
+                            case 257:
+                            case 259:
+                                return declaration;
+                        }
                     }
                 }
             }
@@ -45599,6 +48776,18 @@ var ts;
         function getGlobalTypeSymbol(name, reportErrors) {
             return getGlobalSymbol(name, 788968, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
         }
+        function getGlobalTypeAliasSymbol(name, arity, reportErrors) {
+            var symbol = getGlobalSymbol(name, 788968, reportErrors ? ts.Diagnostics.Cannot_find_global_type_0 : undefined);
+            if (symbol) {
+                getDeclaredTypeOfSymbol(symbol);
+                if (ts.length(getSymbolLinks(symbol).typeParameters) !== arity) {
+                    var decl = symbol.declarations && ts.find(symbol.declarations, ts.isTypeAliasDeclaration);
+                    error(decl, ts.Diagnostics.Global_type_0_must_have_1_type_parameter_s, ts.symbolName(symbol), arity);
+                    return undefined;
+                }
+            }
+            return symbol;
+        }
         function getGlobalSymbol(name, meaning, diagnostic) {
             return resolveName(undefined, name, meaning, diagnostic, name, false);
         }
@@ -45607,61 +48796,80 @@ var ts;
             return symbol || reportErrors ? getTypeOfGlobalSymbol(symbol, arity) : undefined;
         }
         function getGlobalTypedPropertyDescriptorType() {
-            return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", 1, true)) || emptyGenericType;
+            return deferredGlobalTypedPropertyDescriptorType || (deferredGlobalTypedPropertyDescriptorType = getGlobalType("TypedPropertyDescriptor", 1, true) || emptyGenericType);
         }
         function getGlobalTemplateStringsArrayType() {
-            return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", 0, true)) || emptyObjectType;
+            return deferredGlobalTemplateStringsArrayType || (deferredGlobalTemplateStringsArrayType = getGlobalType("TemplateStringsArray", 0, true) || emptyObjectType);
         }
         function getGlobalImportMetaType() {
-            return deferredGlobalImportMetaType || (deferredGlobalImportMetaType = getGlobalType("ImportMeta", 0, true)) || emptyObjectType;
+            return deferredGlobalImportMetaType || (deferredGlobalImportMetaType = getGlobalType("ImportMeta", 0, true) || emptyObjectType);
+        }
+        function getGlobalImportMetaExpressionType() {
+            if (!deferredGlobalImportMetaExpressionType) {
+                var symbol = createSymbol(0, "ImportMetaExpression");
+                var importMetaType = getGlobalImportMetaType();
+                var metaPropertySymbol = createSymbol(4, "meta", 8);
+                metaPropertySymbol.parent = symbol;
+                metaPropertySymbol.type = importMetaType;
+                var members = ts.createSymbolTable([metaPropertySymbol]);
+                symbol.members = members;
+                deferredGlobalImportMetaExpressionType = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+            }
+            return deferredGlobalImportMetaExpressionType;
+        }
+        function getGlobalImportCallOptionsType(reportErrors) {
+            return (deferredGlobalImportCallOptionsType || (deferredGlobalImportCallOptionsType = getGlobalType("ImportCallOptions", 0, reportErrors))) || emptyObjectType;
         }
         function getGlobalESSymbolConstructorSymbol(reportErrors) {
             return deferredGlobalESSymbolConstructorSymbol || (deferredGlobalESSymbolConstructorSymbol = getGlobalValueSymbol("Symbol", reportErrors));
         }
+        function getGlobalESSymbolConstructorTypeSymbol(reportErrors) {
+            return deferredGlobalESSymbolConstructorTypeSymbol || (deferredGlobalESSymbolConstructorTypeSymbol = getGlobalTypeSymbol("SymbolConstructor", reportErrors));
+        }
         function getGlobalESSymbolType(reportErrors) {
-            return deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, reportErrors)) || emptyObjectType;
+            return (deferredGlobalESSymbolType || (deferredGlobalESSymbolType = getGlobalType("Symbol", 0, reportErrors))) || emptyObjectType;
         }
         function getGlobalPromiseType(reportErrors) {
-            return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalPromiseLikeType(reportErrors) {
-            return deferredGlobalPromiseLikeType || (deferredGlobalPromiseLikeType = getGlobalType("PromiseLike", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalPromiseLikeType || (deferredGlobalPromiseLikeType = getGlobalType("PromiseLike", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalPromiseConstructorSymbol(reportErrors) {
             return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise", reportErrors));
         }
         function getGlobalPromiseConstructorLikeType(reportErrors) {
-            return deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", 0, reportErrors)) || emptyObjectType;
+            return (deferredGlobalPromiseConstructorLikeType || (deferredGlobalPromiseConstructorLikeType = getGlobalType("PromiseConstructorLike", 0, reportErrors))) || emptyObjectType;
         }
         function getGlobalAsyncIterableType(reportErrors) {
-            return deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalAsyncIterableType || (deferredGlobalAsyncIterableType = getGlobalType("AsyncIterable", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalAsyncIteratorType(reportErrors) {
-            return deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", 3, reportErrors)) || emptyGenericType;
+            return (deferredGlobalAsyncIteratorType || (deferredGlobalAsyncIteratorType = getGlobalType("AsyncIterator", 3, reportErrors))) || emptyGenericType;
         }
         function getGlobalAsyncIterableIteratorType(reportErrors) {
-            return deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalAsyncIterableIteratorType || (deferredGlobalAsyncIterableIteratorType = getGlobalType("AsyncIterableIterator", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalAsyncGeneratorType(reportErrors) {
-            return deferredGlobalAsyncGeneratorType || (deferredGlobalAsyncGeneratorType = getGlobalType("AsyncGenerator", 3, reportErrors)) || emptyGenericType;
+            return (deferredGlobalAsyncGeneratorType || (deferredGlobalAsyncGeneratorType = getGlobalType("AsyncGenerator", 3, reportErrors))) || emptyGenericType;
         }
         function getGlobalIterableType(reportErrors) {
-            return deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalIterableType || (deferredGlobalIterableType = getGlobalType("Iterable", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalIteratorType(reportErrors) {
-            return deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", 3, reportErrors)) || emptyGenericType;
+            return (deferredGlobalIteratorType || (deferredGlobalIteratorType = getGlobalType("Iterator", 3, reportErrors))) || emptyGenericType;
         }
         function getGlobalIterableIteratorType(reportErrors) {
-            return deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalIterableIteratorType || (deferredGlobalIterableIteratorType = getGlobalType("IterableIterator", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalGeneratorType(reportErrors) {
-            return deferredGlobalGeneratorType || (deferredGlobalGeneratorType = getGlobalType("Generator", 3, reportErrors)) || emptyGenericType;
+            return (deferredGlobalGeneratorType || (deferredGlobalGeneratorType = getGlobalType("Generator", 3, reportErrors))) || emptyGenericType;
         }
         function getGlobalIteratorYieldResultType(reportErrors) {
-            return deferredGlobalIteratorYieldResultType || (deferredGlobalIteratorYieldResultType = getGlobalType("IteratorYieldResult", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalIteratorYieldResultType || (deferredGlobalIteratorYieldResultType = getGlobalType("IteratorYieldResult", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalIteratorReturnResultType(reportErrors) {
-            return deferredGlobalIteratorReturnResultType || (deferredGlobalIteratorReturnResultType = getGlobalType("IteratorReturnResult", 1, reportErrors)) || emptyGenericType;
+            return (deferredGlobalIteratorReturnResultType || (deferredGlobalIteratorReturnResultType = getGlobalType("IteratorReturnResult", 1, reportErrors))) || emptyGenericType;
         }
         function getGlobalTypeOrUndefined(name, arity) {
             if (arity === void 0) { arity = 0; }
@@ -45669,13 +48877,19 @@ var ts;
             return symbol && getTypeOfGlobalSymbol(symbol, arity);
         }
         function getGlobalExtractSymbol() {
-            return deferredGlobalExtractSymbol || (deferredGlobalExtractSymbol = getGlobalSymbol("Extract", 524288, ts.Diagnostics.Cannot_find_global_type_0));
+            deferredGlobalExtractSymbol || (deferredGlobalExtractSymbol = getGlobalTypeAliasSymbol("Extract", 2, true) || unknownSymbol);
+            return deferredGlobalExtractSymbol === unknownSymbol ? undefined : deferredGlobalExtractSymbol;
         }
         function getGlobalOmitSymbol() {
-            return deferredGlobalOmitSymbol || (deferredGlobalOmitSymbol = getGlobalSymbol("Omit", 524288, ts.Diagnostics.Cannot_find_global_type_0));
+            deferredGlobalOmitSymbol || (deferredGlobalOmitSymbol = getGlobalTypeAliasSymbol("Omit", 2, true) || unknownSymbol);
+            return deferredGlobalOmitSymbol === unknownSymbol ? undefined : deferredGlobalOmitSymbol;
+        }
+        function getGlobalAwaitedSymbol(reportErrors) {
+            deferredGlobalAwaitedSymbol || (deferredGlobalAwaitedSymbol = getGlobalTypeAliasSymbol("Awaited", 1, reportErrors) || (reportErrors ? unknownSymbol : undefined));
+            return deferredGlobalAwaitedSymbol === unknownSymbol ? undefined : deferredGlobalAwaitedSymbol;
         }
         function getGlobalBigIntType(reportErrors) {
-            return deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, reportErrors)) || emptyObjectType;
+            return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, reportErrors))) || emptyObjectType;
         }
         function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
             return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
@@ -45691,11 +48905,11 @@ var ts;
         }
         function getTupleElementFlags(node) {
             switch (node.kind) {
-                case 180:
+                case 184:
                     return 2;
-                case 181:
+                case 185:
                     return getRestTypeElementFlags(node);
-                case 192:
+                case 196:
                     return node.questionToken ? 2 :
                         node.dotDotDotToken ? getRestTypeElementFlags(node) :
                             1;
@@ -45713,57 +48927,57 @@ var ts;
                 return readonly ? globalReadonlyArrayType : globalArrayType;
             }
             var elementFlags = ts.map(node.elements, getTupleElementFlags);
-            var missingName = ts.some(node.elements, function (e) { return e.kind !== 192; });
+            var missingName = ts.some(node.elements, function (e) { return e.kind !== 196; });
             return getTupleTargetType(elementFlags, readonly, missingName ? undefined : node.elements);
         }
         function isDeferredTypeReferenceNode(node, hasDefaultTypeArguments) {
-            return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 178 ? mayResolveTypeAlias(node.elementType) :
-                node.kind === 179 ? ts.some(node.elements, mayResolveTypeAlias) :
+            return !!getAliasSymbolForTypeNode(node) || isResolvedByTypeAlias(node) && (node.kind === 182 ? mayResolveTypeAlias(node.elementType) :
+                node.kind === 183 ? ts.some(node.elements, mayResolveTypeAlias) :
                     hasDefaultTypeArguments || ts.some(node.typeArguments, mayResolveTypeAlias));
         }
         function isResolvedByTypeAlias(node) {
             var parent = node.parent;
             switch (parent.kind) {
+                case 190:
+                case 196:
+                case 177:
                 case 186:
+                case 187:
+                case 193:
+                case 188:
                 case 192:
-                case 173:
                 case 182:
                 case 183:
-                case 189:
-                case 184:
-                case 188:
-                case 178:
-                case 179:
                     return isResolvedByTypeAlias(parent);
-                case 254:
+                case 258:
                     return true;
             }
             return false;
         }
         function mayResolveTypeAlias(node) {
             switch (node.kind) {
-                case 173:
-                    return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node.typeName, 788968).flags & 524288);
-                case 176:
-                    return true;
-                case 188:
-                    return node.operator !== 151 && mayResolveTypeAlias(node.type);
-                case 186:
+                case 177:
+                    return isJSDocTypeReference(node) || !!(resolveTypeReferenceName(node, 788968).flags & 524288);
                 case 180:
+                    return true;
                 case 192:
+                    return node.operator !== 153 && mayResolveTypeAlias(node.type);
+                case 190:
+                case 184:
+                case 196:
+                case 314:
+                case 312:
+                case 313:
                 case 307:
-                case 305:
-                case 306:
-                case 301:
                     return mayResolveTypeAlias(node.type);
-                case 181:
-                    return node.type.kind !== 178 || mayResolveTypeAlias(node.type.elementType);
-                case 182:
-                case 183:
+                case 185:
+                    return node.type.kind !== 182 || mayResolveTypeAlias(node.type.elementType);
+                case 186:
+                case 187:
                     return ts.some(node.types, mayResolveTypeAlias);
-                case 189:
+                case 193:
                     return mayResolveTypeAlias(node.objectType) || mayResolveTypeAlias(node.indexType);
-                case 184:
+                case 188:
                     return mayResolveTypeAlias(node.checkType) || mayResolveTypeAlias(node.extendsType) ||
                         mayResolveTypeAlias(node.trueType) || mayResolveTypeAlias(node.falseType);
             }
@@ -45776,19 +48990,19 @@ var ts;
                 if (target === emptyGenericType) {
                     links.resolvedType = emptyObjectType;
                 }
-                else if (!(node.kind === 179 && ts.some(node.elements, function (e) { return !!(getTupleElementFlags(e) & 8); })) && isDeferredTypeReferenceNode(node)) {
-                    links.resolvedType = node.kind === 179 && node.elements.length === 0 ? target :
+                else if (!(node.kind === 183 && ts.some(node.elements, function (e) { return !!(getTupleElementFlags(e) & 8); })) && isDeferredTypeReferenceNode(node)) {
+                    links.resolvedType = node.kind === 183 && node.elements.length === 0 ? target :
                         createDeferredTypeReference(target, node, undefined);
                 }
                 else {
-                    var elementTypes = node.kind === 178 ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elements, getTypeFromTypeNode);
+                    var elementTypes = node.kind === 182 ? [getTypeFromTypeNode(node.elementType)] : ts.map(node.elements, getTypeFromTypeNode);
                     links.resolvedType = createNormalizedTypeReference(target, elementTypes);
                 }
             }
             return links.resolvedType;
         }
         function isReadonlyTypeOperator(node) {
-            return ts.isTypeOperatorNode(node) && node.operator === 142;
+            return ts.isTypeOperatorNode(node) && node.operator === 144;
         }
         function createTupleType(elementTypes, elementFlags, readonly, namedMemberDeclarations) {
             if (readonly === void 0) { readonly = false; }
@@ -45836,10 +49050,10 @@ var ts;
                 lengthSymbol.type = numberType;
             }
             else {
-                var literalTypes_1 = [];
+                var literalTypes = [];
                 for (var i = minLength; i <= arity; i++)
-                    literalTypes_1.push(getLiteralType(i));
-                lengthSymbol.type = getUnionType(literalTypes_1);
+                    literalTypes.push(getNumberLiteralType(i));
+                lengthSymbol.type = getUnionType(literalTypes);
             }
             properties.push(lengthSymbol);
             var type = createObjectType(8 | 4);
@@ -45856,8 +49070,7 @@ var ts;
             type.declaredProperties = properties;
             type.declaredCallSignatures = ts.emptyArray;
             type.declaredConstructSignatures = ts.emptyArray;
-            type.declaredStringIndexInfo = undefined;
-            type.declaredNumberIndexInfo = undefined;
+            type.declaredIndexInfos = ts.emptyArray;
             type.elementFlags = elementFlags;
             type.minLength = minLength;
             type.fixedLength = fixedLength;
@@ -45889,7 +49102,7 @@ var ts;
             var lastRequiredIndex = -1;
             var firstRestIndex = -1;
             var lastOptionalOrRestIndex = -1;
-            var _loop_13 = function (i) {
+            var _loop_15 = function (i) {
                 var type = elementTypes[i];
                 var flags = target.elementFlags[i];
                 if (flags & 8) {
@@ -45907,7 +49120,7 @@ var ts;
                         ts.forEach(elements, function (t, n) { var _a; return addElement(t, type.target.elementFlags[n], (_a = type.target.labeledElementDeclarations) === null || _a === void 0 ? void 0 : _a[n]); });
                     }
                     else {
-                        addElement(isArrayLikeType(type) && getIndexTypeOfType(type, 1) || errorType, 4, (_b = target.labeledElementDeclarations) === null || _b === void 0 ? void 0 : _b[i]);
+                        addElement(isArrayLikeType(type) && getIndexTypeOfType(type, numberType) || errorType, 4, (_b = target.labeledElementDeclarations) === null || _b === void 0 ? void 0 : _b[i]);
                     }
                 }
                 else {
@@ -45915,7 +49128,7 @@ var ts;
                 }
             };
             for (var i = 0; i < elementTypes.length; i++) {
-                var state_4 = _loop_13(i);
+                var state_4 = _loop_15(i);
                 if (typeof state_4 === "object")
                     return state_4.value;
             }
@@ -45961,7 +49174,7 @@ var ts;
                 createTupleType(getTypeArguments(type).slice(index, endIndex), target.elementFlags.slice(index, endIndex), false, target.labeledElementDeclarations && target.labeledElementDeclarations.slice(index, endIndex));
         }
         function getKnownKeysOfTupleType(type) {
-            return getUnionType(ts.append(ts.arrayOf(type.target.fixedLength, function (i) { return getLiteralType("" + i); }), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType)));
+            return getUnionType(ts.append(ts.arrayOf(type.target.fixedLength, function (i) { return getStringLiteralType("" + i); }), getIndexType(type.target.readonly ? globalReadonlyArrayType : globalArrayType)));
         }
         function getStartElementCount(type, flags) {
             var index = ts.findIndex(type.elementFlags, function (f) { return !(f & flags); });
@@ -45971,8 +49184,7 @@ var ts;
             return type.elementFlags.length - ts.findLastIndex(type.elementFlags, function (f) { return !(f & flags); }) - 1;
         }
         function getTypeFromOptionalTypeNode(node) {
-            var type = getTypeFromTypeNode(node.type);
-            return strictNullChecks ? getOptionalType(type) : type;
+            return addOptionality(getTypeFromTypeNode(node.type), true);
         }
         function getTypeId(type) {
             return type.id;
@@ -45995,12 +49207,12 @@ var ts;
             }
             if (!(flags & 131072)) {
                 includes |= flags & 205258751;
-                if (flags & 469499904)
-                    includes |= 262144;
+                if (flags & 465829888)
+                    includes |= 33554432;
                 if (type === wildcardType)
                     includes |= 8388608;
                 if (!strictNullChecks && flags & 98304) {
-                    if (!(ts.getObjectFlags(type) & 524288))
+                    if (!(ts.getObjectFlags(type) & 131072))
                         includes |= 4194304;
                 }
                 else {
@@ -46014,13 +49226,18 @@ var ts;
             return includes;
         }
         function addTypesToUnion(typeSet, includes, types) {
-            for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
-                var type = types_10[_i];
+            for (var _i = 0, types_9 = types; _i < types_9.length; _i++) {
+                var type = types_9[_i];
                 includes = addTypeToUnion(typeSet, includes, type);
             }
             return includes;
         }
         function removeSubtypes(types, hasObjectTypes) {
+            var id = getTypeListId(types);
+            var match = subtypeReductionCache.get(id);
+            if (match) {
+                return match;
+            }
             var hasEmptyObject = hasObjectTypes && ts.some(types, function (t) { return !!(t.flags & 524288) && !isGenericMappedType(t) && isEmptyResolvedType(resolveStructuredTypeMembers(t)); });
             var len = types.length;
             var i = len;
@@ -46029,18 +49246,28 @@ var ts;
                 i--;
                 var source = types[i];
                 if (hasEmptyObject || source.flags & 469499904) {
-                    for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
-                        var target = types_11[_i];
+                    var keyProperty = source.flags & (524288 | 2097152 | 58982400) ?
+                        ts.find(getPropertiesOfType(source), function (p) { return isUnitType(getTypeOfSymbol(p)); }) :
+                        undefined;
+                    var keyPropertyType = keyProperty && getRegularTypeOfLiteralType(getTypeOfSymbol(keyProperty));
+                    for (var _i = 0, types_10 = types; _i < types_10.length; _i++) {
+                        var target = types_10[_i];
                         if (source !== target) {
                             if (count === 100000) {
                                 var estimatedCount = (count / (len - i)) * len;
                                 if (estimatedCount > 1000000) {
                                     ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("checkTypes", "removeSubtypes_DepthLimit", { typeIds: types.map(function (t) { return t.id; }) });
                                     error(currentNode, ts.Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent);
-                                    return false;
+                                    return undefined;
                                 }
                             }
                             count++;
+                            if (keyProperty && target.flags & (524288 | 2097152 | 58982400)) {
+                                var t = getTypeOfPropertyOfType(target, keyProperty.escapedName);
+                                if (t && isUnitType(t) && getRegularTypeOfLiteralType(t) !== keyPropertyType) {
+                                    continue;
+                                }
+                            }
                             if (isTypeRelatedTo(source, target, strictSubtypeRelation) && (!(ts.getObjectFlags(getTargetType(source)) & 1) ||
                                 !(ts.getObjectFlags(getTargetType(target)) & 1) ||
                                 isTypeDerivedFrom(source, target))) {
@@ -46051,7 +49278,8 @@ var ts;
                     }
                 }
             }
-            return true;
+            subtypeReductionCache.set(id, types);
+            return types;
         }
         function removeRedundantLiteralTypes(types, includes, reduceVoidUndefined) {
             var i = types.length;
@@ -46059,7 +49287,7 @@ var ts;
                 i--;
                 var t = types[i];
                 var flags = t.flags;
-                var remove = flags & 128 && includes & 4 ||
+                var remove = flags & (128 | 134217728 | 268435456) && includes & 4 ||
                     flags & 256 && includes & 8 ||
                     flags & 2048 && includes & 64 ||
                     flags & 8192 && includes & 4096 ||
@@ -46074,15 +49302,15 @@ var ts;
             var templates = ts.filter(types, isPatternLiteralType);
             if (templates.length) {
                 var i = types.length;
-                var _loop_14 = function () {
+                var _loop_16 = function () {
                     i--;
                     var t = types[i];
-                    if (t.flags & 128 && ts.some(templates, function (template) { return isTypeSubtypeOf(t, template); })) {
+                    if (t.flags & 128 && ts.some(templates, function (template) { return isTypeMatchedByTemplateLiteralType(t, template); })) {
                         ts.orderedRemoveItemAt(types, i);
                     }
                 };
                 while (i > 0) {
-                    _loop_14();
+                    _loop_16();
                 }
             }
         }
@@ -46090,8 +49318,8 @@ var ts;
             return !!(type.flags & 1048576 && (type.aliasSymbol || type.origin));
         }
         function addNamedUnions(namedUnions, types) {
-            for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
-                var t = types_12[_i];
+            for (var _i = 0, types_11 = types; _i < types_11.length; _i++) {
+                var t = types_11[_i];
                 if (t.flags & 1048576) {
                     var origin = t.origin;
                     if (t.aliasSymbol || origin && !(origin.flags & 1048576)) {
@@ -46120,18 +49348,25 @@ var ts;
             var includes = addTypesToUnion(typeSet, 0, types);
             if (unionReduction !== 0) {
                 if (includes & 3) {
-                    return includes & 1 ? includes & 8388608 ? wildcardType : anyType : unknownType;
+                    return includes & 1 ?
+                        includes & 8388608 ? wildcardType : anyType :
+                        includes & 65536 || containsType(typeSet, unknownType) ? unknownType : nonNullUnknownType;
                 }
-                if (unionReduction & (1 | 2)) {
-                    if (includes & (2944 | 8192) || includes & 16384 && includes & 32768) {
-                        removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2));
-                    }
-                    if (includes & 128 && includes & 134217728) {
-                        removeStringLiteralsMatchedByTemplateLiterals(typeSet);
+                if (exactOptionalPropertyTypes && includes & 32768) {
+                    var missingIndex = ts.binarySearch(typeSet, missingType, getTypeId, ts.compareValues);
+                    if (missingIndex >= 0 && containsType(typeSet, undefinedType)) {
+                        ts.orderedRemoveItemAt(typeSet, missingIndex);
                     }
                 }
-                if (unionReduction & 2) {
-                    if (!removeSubtypes(typeSet, !!(includes & 524288))) {
+                if (includes & (2944 | 8192 | 134217728 | 268435456) || includes & 16384 && includes & 32768) {
+                    removeRedundantLiteralTypes(typeSet, includes, !!(unionReduction & 2));
+                }
+                if (includes & 128 && includes & 134217728) {
+                    removeStringLiteralsMatchedByTemplateLiterals(typeSet);
+                }
+                if (unionReduction === 2) {
+                    typeSet = removeSubtypes(typeSet, !!(includes & 524288));
+                    if (!typeSet) {
                         return errorType;
                     }
                 }
@@ -46145,14 +49380,14 @@ var ts;
                 var namedUnions = [];
                 addNamedUnions(namedUnions, types);
                 var reducedTypes = [];
-                var _loop_15 = function (t) {
+                var _loop_17 = function (t) {
                     if (!ts.some(namedUnions, function (union) { return containsType(union.types, t); })) {
                         reducedTypes.push(t);
                     }
                 };
                 for (var _i = 0, typeSet_1 = typeSet; _i < typeSet_1.length; _i++) {
                     var t = typeSet_1[_i];
-                    _loop_15(t);
+                    _loop_17(t);
                 }
                 if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
                     return namedUnions[0];
@@ -46166,18 +49401,23 @@ var ts;
                     origin = createOriginUnionOrIntersectionType(1048576, reducedTypes);
                 }
             }
-            var objectFlags = (includes & 468598819 ? 0 : 262144) |
-                (includes & 2097152 ? 268435456 : 0);
+            var objectFlags = (includes & 36323363 ? 0 : 65536) |
+                (includes & 2097152 ? 33554432 : 0);
             return getUnionTypeFromSortedList(typeSet, objectFlags, aliasSymbol, aliasTypeArguments, origin);
         }
-        function getUnionTypePredicate(signatures) {
+        function getUnionOrIntersectionTypePredicate(signatures, kind) {
             var first;
             var types = [];
             for (var _i = 0, signatures_6 = signatures; _i < signatures_6.length; _i++) {
                 var sig = signatures_6[_i];
                 var pred = getTypePredicateOfSignature(sig);
                 if (!pred || pred.kind === 2 || pred.kind === 3) {
-                    continue;
+                    if (kind !== 2097152) {
+                        continue;
+                    }
+                    else {
+                        return;
+                    }
                 }
                 if (first) {
                     if (!typePredicateKindsMatch(first, pred)) {
@@ -46192,21 +49432,12 @@ var ts;
             if (!first) {
                 return undefined;
             }
-            var unionType = getUnionType(types);
-            return createTypePredicate(first.kind, first.parameterName, first.parameterIndex, unionType);
+            var compositeType = getUnionOrIntersectionType(types, kind);
+            return createTypePredicate(first.kind, first.parameterName, first.parameterIndex, compositeType);
         }
         function typePredicateKindsMatch(a, b) {
             return a.kind === b.kind && a.parameterIndex === b.parameterIndex;
         }
-        function createUnionType(types, aliasSymbol, aliasTypeArguments, origin) {
-            var result = createType(1048576);
-            result.objectFlags = getPropagatingFlagsOfTypes(types, 98304);
-            result.types = types;
-            result.origin = origin;
-            result.aliasSymbol = aliasSymbol;
-            result.aliasTypeArguments = aliasTypeArguments;
-            return result;
-        }
         function getUnionTypeFromSortedList(types, objectFlags, aliasSymbol, aliasTypeArguments, origin) {
             if (types.length === 0) {
                 return neverType;
@@ -46215,14 +49446,22 @@ var ts;
                 return types[0];
             }
             var typeKey = !origin ? getTypeListId(types) :
-                origin.flags & 1048576 ? "|" + getTypeListId(origin.types) :
-                    origin.flags & 2097152 ? "&" + getTypeListId(origin.types) :
-                        "#" + origin.type.id;
+                origin.flags & 1048576 ? "|".concat(getTypeListId(origin.types)) :
+                    origin.flags & 2097152 ? "&".concat(getTypeListId(origin.types)) :
+                        "#".concat(origin.type.id, "|").concat(getTypeListId(types));
             var id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments);
             var type = unionTypes.get(id);
             if (!type) {
-                type = createUnionType(types, aliasSymbol, aliasTypeArguments, origin);
-                type.objectFlags |= objectFlags;
+                type = createType(1048576);
+                type.objectFlags = objectFlags | getPropagatingFlagsOfTypes(types, 98304);
+                type.types = types;
+                type.origin = origin;
+                type.aliasSymbol = aliasSymbol;
+                type.aliasTypeArguments = aliasTypeArguments;
+                if (types.length === 2 && types[0].flags & 512 && types[1].flags & 512) {
+                    type.flags |= 16;
+                    type.intrinsicName = "boolean";
+                }
                 unionTypes.set(id, type);
             }
             return type;
@@ -46251,19 +49490,25 @@ var ts;
                     if (type === wildcardType)
                         includes |= 8388608;
                 }
-                else if ((strictNullChecks || !(flags & 98304)) && !typeSet.has(type.id.toString())) {
-                    if (type.flags & 109440 && includes & 109440) {
-                        includes |= 67108864;
+                else if (strictNullChecks || !(flags & 98304)) {
+                    if (exactOptionalPropertyTypes && type === missingType) {
+                        includes |= 262144;
+                        type = undefinedType;
+                    }
+                    if (!typeSet.has(type.id.toString())) {
+                        if (type.flags & 109440 && includes & 109440) {
+                            includes |= 67108864;
+                        }
+                        typeSet.set(type.id.toString(), type);
                     }
-                    typeSet.set(type.id.toString(), type);
                 }
                 includes |= flags & 205258751;
             }
             return includes;
         }
         function addTypesToIntersection(typeSet, includes, types) {
-            for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
-                var type = types_13[_i];
+            for (var _i = 0, types_12 = types; _i < types_12.length; _i++) {
+                var type = types_12[_i];
                 includes = addTypeToIntersection(typeSet, includes, getRegularTypeOfLiteralType(type));
             }
             return includes;
@@ -46319,25 +49564,24 @@ var ts;
             }
             return false;
         }
-        function extractIrreducible(types, flag) {
-            if (ts.every(types, function (t) { return !!(t.flags & 1048576) && ts.some(t.types, function (tt) { return !!(tt.flags & flag); }); })) {
-                for (var i = 0; i < types.length; i++) {
-                    types[i] = filterType(types[i], function (t) { return !(t.flags & flag); });
-                }
-                return true;
+        function eachIsUnionContaining(types, flag) {
+            return ts.every(types, function (t) { return !!(t.flags & 1048576) && ts.some(t.types, function (tt) { return !!(tt.flags & flag); }); });
+        }
+        function removeFromEach(types, flag) {
+            for (var i = 0; i < types.length; i++) {
+                types[i] = filterType(types[i], function (t) { return !(t.flags & flag); });
             }
-            return false;
         }
         function intersectUnionsOfPrimitiveTypes(types) {
             var unionTypes;
-            var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 262144); });
+            var index = ts.findIndex(types, function (t) { return !!(ts.getObjectFlags(t) & 65536); });
             if (index < 0) {
                 return false;
             }
             var i = index + 1;
             while (i < types.length) {
                 var t = types[i];
-                if (ts.getObjectFlags(t) & 262144) {
+                if (ts.getObjectFlags(t) & 65536) {
                     (unionTypes || (unionTypes = [types[index]])).push(t);
                     ts.orderedRemoveItemAt(types, i);
                 }
@@ -46361,7 +49605,7 @@ var ts;
                     }
                 }
             }
-            types[index] = getUnionTypeFromSortedList(result, 262144);
+            types[index] = getUnionTypeFromSortedList(result, 65536);
             return true;
         }
         function createIntersectionType(types, aliasSymbol, aliasTypeArguments) {
@@ -46376,8 +49620,10 @@ var ts;
             var typeMembershipMap = new ts.Map();
             var includes = addTypesToIntersection(typeMembershipMap, 0, types);
             var typeSet = ts.arrayFrom(typeMembershipMap.values());
-            if (includes & 131072 ||
-                strictNullChecks && includes & 98304 && includes & (524288 | 67108864 | 16777216) ||
+            if (includes & 131072) {
+                return ts.contains(typeSet, silentNeverType) ? silentNeverType : neverType;
+            }
+            if (strictNullChecks && includes & 98304 && includes & (524288 | 67108864 | 16777216) ||
                 includes & 67108864 && includes & (469892092 & ~67108864) ||
                 includes & 402653316 && includes & (469892092 & ~402653316) ||
                 includes & 296 && includes & (469892092 & ~296) ||
@@ -46404,6 +49650,9 @@ var ts;
             if (includes & 16777216 && includes & 524288) {
                 ts.orderedRemoveItemAt(typeSet, ts.findIndex(typeSet, isEmptyAnonymousObjectType));
             }
+            if (includes & 262144) {
+                typeSet[typeSet.indexOf(undefinedType)] = missingType;
+            }
             if (typeSet.length === 0) {
                 return unknownType;
             }
@@ -46417,10 +49666,13 @@ var ts;
                     if (intersectUnionsOfPrimitiveTypes(typeSet)) {
                         result = getIntersectionType(typeSet, aliasSymbol, aliasTypeArguments);
                     }
-                    else if (extractIrreducible(typeSet, 32768)) {
-                        result = getUnionType([getIntersectionType(typeSet), undefinedType], 1, aliasSymbol, aliasTypeArguments);
+                    else if (eachIsUnionContaining(typeSet, 32768)) {
+                        var undefinedOrMissingType = exactOptionalPropertyTypes && ts.some(typeSet, function (t) { return containsType(t.types, missingType); }) ? missingType : undefinedType;
+                        removeFromEach(typeSet, 32768);
+                        result = getUnionType([getIntersectionType(typeSet), undefinedOrMissingType], 1, aliasSymbol, aliasTypeArguments);
                     }
-                    else if (extractIrreducible(typeSet, 65536)) {
+                    else if (eachIsUnionContaining(typeSet, 65536)) {
+                        removeFromEach(typeSet, 65536);
                         result = getUnionType([getIntersectionType(typeSet), nullType], 1, aliasSymbol, aliasTypeArguments);
                     }
                     else {
@@ -46495,48 +49747,66 @@ var ts;
                 type.resolvedStringIndexType || (type.resolvedStringIndexType = createIndexType(type, true)) :
                 type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, false));
         }
-        function instantiateTypeAsMappedNameType(nameType, type, t) {
-            return instantiateType(nameType, appendTypeMapping(type.mapper, getTypeParameterFromMappedType(type), t));
-        }
-        function getIndexTypeForMappedType(type, noIndexSignatures) {
-            var constraint = filterType(getConstraintTypeFromMappedType(type), function (t) { return !(noIndexSignatures && t.flags & (1 | 4)); });
-            var nameType = type.declaration.nameType && getTypeFromTypeNode(type.declaration.nameType);
-            var properties = nameType && everyType(constraint, function (t) { return !!(t.flags & (4 | 8 | 131072)); }) && getPropertiesOfType(getApparentType(getModifiersTypeFromMappedType(type)));
-            return nameType ?
-                getUnionType([mapType(constraint, function (t) { return instantiateTypeAsMappedNameType(nameType, type, t); }), mapType(getUnionType(ts.map(properties || ts.emptyArray, function (p) { return getLiteralTypeFromProperty(p, 8576); })), function (t) { return instantiateTypeAsMappedNameType(nameType, type, t); })]) :
-                constraint;
+        function getIndexTypeForMappedType(type, stringsOnly, noIndexSignatures) {
+            var typeParameter = getTypeParameterFromMappedType(type);
+            var constraintType = getConstraintTypeFromMappedType(type);
+            var nameType = getNameTypeFromMappedType(type.target || type);
+            if (!nameType && !noIndexSignatures) {
+                return constraintType;
+            }
+            var keyTypes = [];
+            if (isMappedTypeWithKeyofConstraintDeclaration(type)) {
+                if (!isGenericIndexType(constraintType)) {
+                    var modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
+                    forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576, stringsOnly, addMemberForKeyType);
+                }
+                else {
+                    return getIndexTypeForGenericType(type, stringsOnly);
+                }
+            }
+            else {
+                forEachType(getLowerBoundOfKeyType(constraintType), addMemberForKeyType);
+            }
+            if (isGenericIndexType(constraintType)) {
+                forEachType(constraintType, addMemberForKeyType);
+            }
+            var result = noIndexSignatures ? filterType(getUnionType(keyTypes), function (t) { return !(t.flags & (1 | 4)); }) : getUnionType(keyTypes);
+            if (result.flags & 1048576 && constraintType.flags & 1048576 && getTypeListId(result.types) === getTypeListId(constraintType.types)) {
+                return constraintType;
+            }
+            return result;
+            function addMemberForKeyType(keyType) {
+                var propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType;
+                keyTypes.push(propNameType === stringType ? stringOrNumberType : propNameType);
+            }
         }
-        function maybeNonDistributiveNameType(type) {
-            return !!(type && (type.flags & 16777216 && (!type.root.isDistributive || maybeNonDistributiveNameType(type.checkType)) ||
-                type.flags & (3145728 | 134217728) && ts.some(type.types, maybeNonDistributiveNameType) ||
-                type.flags & (4194304 | 268435456) && maybeNonDistributiveNameType(type.type) ||
-                type.flags & 8388608 && maybeNonDistributiveNameType(type.indexType) ||
-                type.flags & 33554432 && maybeNonDistributiveNameType(type.substitute)));
+        function hasDistributiveNameType(mappedType) {
+            var typeVariable = getTypeParameterFromMappedType(mappedType);
+            return isDistributive(getNameTypeFromMappedType(mappedType) || typeVariable);
+            function isDistributive(type) {
+                return type.flags & (3 | 131068 | 131072 | 262144 | 524288 | 67108864) ? true :
+                    type.flags & 16777216 ? type.root.isDistributive && type.checkType === typeVariable :
+                        type.flags & (3145728 | 134217728) ? ts.every(type.types, isDistributive) :
+                            type.flags & 8388608 ? isDistributive(type.objectType) && isDistributive(type.indexType) :
+                                type.flags & 33554432 ? isDistributive(type.substitute) :
+                                    type.flags & 268435456 ? isDistributive(type.type) :
+                                        false;
+            }
         }
         function getLiteralTypeFromPropertyName(name) {
             if (ts.isPrivateIdentifier(name)) {
                 return neverType;
             }
-            return ts.isIdentifier(name) ? getLiteralType(ts.unescapeLeadingUnderscores(name.escapedText)) :
+            return ts.isIdentifier(name) ? getStringLiteralType(ts.unescapeLeadingUnderscores(name.escapedText)) :
                 getRegularTypeOfLiteralType(ts.isComputedPropertyName(name) ? checkComputedPropertyName(name) : checkExpression(name));
         }
-        function getBigIntLiteralType(node) {
-            return getLiteralType({
-                negative: false,
-                base10Value: ts.parsePseudoBigInt(node.text)
-            });
-        }
-        function getLiteralTypeFromProperty(prop, include) {
-            if (!(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24)) {
+        function getLiteralTypeFromProperty(prop, include, includeNonPublic) {
+            if (includeNonPublic || !(ts.getDeclarationModifierFlagsFromSymbol(prop) & 24)) {
                 var type = getSymbolLinks(getLateBoundSymbol(prop)).nameType;
-                if (!type && !ts.isKnownSymbol(prop)) {
-                    if (prop.escapedName === "default") {
-                        type = getLiteralType("default");
-                    }
-                    else {
-                        var name = prop.valueDeclaration && ts.getNameOfDeclaration(prop.valueDeclaration);
-                        type = name && getLiteralTypeFromPropertyName(name) || getLiteralType(ts.symbolName(prop));
-                    }
+                if (!type) {
+                    var name = ts.getNameOfDeclaration(prop.valueDeclaration);
+                    type = prop.escapedName === "default" ? getStringLiteralType("default") :
+                        name && getLiteralTypeFromPropertyName(name) || (!ts.isKnownSymbol(prop) ? getStringLiteralType(ts.symbolName(prop)) : undefined);
                 }
                 if (type && type.flags & include) {
                     return type;
@@ -46544,29 +49814,27 @@ var ts;
             }
             return neverType;
         }
+        function isKeyTypeIncluded(keyType, include) {
+            return !!(keyType.flags & include || keyType.flags & 2097152 && ts.some(keyType.types, function (t) { return isKeyTypeIncluded(t, include); }));
+        }
         function getLiteralTypeFromProperties(type, include, includeOrigin) {
             var origin = includeOrigin && (ts.getObjectFlags(type) & (3 | 4) || type.aliasSymbol) ? createOriginIndexType(type) : undefined;
-            return getUnionType(ts.map(getPropertiesOfType(type), function (p) { return getLiteralTypeFromProperty(p, include); }), 1, undefined, undefined, origin);
-        }
-        function getNonEnumNumberIndexInfo(type) {
-            var numberIndexInfo = getIndexInfoOfType(type, 1);
-            return numberIndexInfo !== enumNumberIndexInfo ? numberIndexInfo : undefined;
+            var propertyTypes = ts.map(getPropertiesOfType(type), function (prop) { return getLiteralTypeFromProperty(prop, include); });
+            var indexKeyTypes = ts.map(getIndexInfosOfType(type), function (info) { return info !== enumNumberIndexInfo && isKeyTypeIncluded(info.keyType, include) ?
+                info.keyType === stringType && include & 8 ? stringOrNumberType : info.keyType : neverType; });
+            return getUnionType(ts.concatenate(propertyTypes, indexKeyTypes), 1, undefined, undefined, origin);
         }
         function getIndexType(type, stringsOnly, noIndexSignatures) {
             if (stringsOnly === void 0) { stringsOnly = keyofStringsOnly; }
-            var includeOrigin = stringsOnly === keyofStringsOnly && !noIndexSignatures;
             type = getReducedType(type);
             return type.flags & 1048576 ? getIntersectionType(ts.map(type.types, function (t) { return getIndexType(t, stringsOnly, noIndexSignatures); })) :
                 type.flags & 2097152 ? getUnionType(ts.map(type.types, function (t) { return getIndexType(t, stringsOnly, noIndexSignatures); })) :
-                    type.flags & 58982400 || isGenericTupleType(type) || isGenericMappedType(type) && maybeNonDistributiveNameType(getNameTypeFromMappedType(type)) ? getIndexTypeForGenericType(type, stringsOnly) :
-                        ts.getObjectFlags(type) & 32 ? getIndexTypeForMappedType(type, noIndexSignatures) :
+                    type.flags & 58982400 || isGenericTupleType(type) || isGenericMappedType(type) && !hasDistributiveNameType(type) ? getIndexTypeForGenericType(type, stringsOnly) :
+                        ts.getObjectFlags(type) & 32 ? getIndexTypeForMappedType(type, stringsOnly, noIndexSignatures) :
                             type === wildcardType ? wildcardType :
                                 type.flags & 2 ? neverType :
                                     type.flags & (1 | 131072) ? keyofConstraintType :
-                                        stringsOnly ? !noIndexSignatures && getIndexInfoOfType(type, 0) ? stringType : getLiteralTypeFromProperties(type, 128, includeOrigin) :
-                                            !noIndexSignatures && getIndexInfoOfType(type, 0) ? getUnionType([stringType, numberType, getLiteralTypeFromProperties(type, 8192, includeOrigin)]) :
-                                                getNonEnumNumberIndexInfo(type) ? getUnionType([numberType, getLiteralTypeFromProperties(type, 128 | 8192, includeOrigin)]) :
-                                                    getLiteralTypeFromProperties(type, 8576, includeOrigin);
+                                        getLiteralTypeFromProperties(type, (noIndexSignatures ? 128 : 402653316) | (stringsOnly ? 0 : 296 | 12288), stringsOnly === keyofStringsOnly && !noIndexSignatures);
         }
         function getExtractStringType(type) {
             if (keyofStringsOnly) {
@@ -46583,15 +49851,15 @@ var ts;
             var links = getNodeLinks(node);
             if (!links.resolvedType) {
                 switch (node.operator) {
-                    case 138:
+                    case 140:
                         links.resolvedType = getIndexType(getTypeFromTypeNode(node.type));
                         break;
-                    case 151:
-                        links.resolvedType = node.type.kind === 148
+                    case 153:
+                        links.resolvedType = node.type.kind === 150
                             ? getESSymbolLikeTypeForNode(ts.walkUpParenthesizedTypes(node.parent))
                             : errorType;
                         break;
-                    case 142:
+                    case 144:
                         links.resolvedType = getTypeFromTypeNode(node.type);
                         break;
                     default:
@@ -46603,7 +49871,7 @@ var ts;
         function getTypeFromTemplateTypeNode(node) {
             var links = getNodeLinks(node);
             if (!links.resolvedType) {
-                links.resolvedType = getTemplateLiteralType(__spreadArray([node.head.text], ts.map(node.templateSpans, function (span) { return span.literal.text; })), ts.map(node.templateSpans, function (span) { return getTypeFromTypeNode(span.type); }));
+                links.resolvedType = getTemplateLiteralType(__spreadArray([node.head.text], ts.map(node.templateSpans, function (span) { return span.literal.text; }), true), ts.map(node.templateSpans, function (span) { return getTypeFromTypeNode(span.type); }));
             }
             return links.resolvedType;
         }
@@ -46624,13 +49892,13 @@ var ts;
                 return stringType;
             }
             if (newTypes.length === 0) {
-                return getLiteralType(text);
+                return getStringLiteralType(text);
             }
             newTexts.push(text);
             if (ts.every(newTexts, function (t) { return t === ""; }) && ts.every(newTypes, function (t) { return !!(t.flags & 4); })) {
                 return stringType;
             }
-            var id = getTypeListId(newTypes) + "|" + ts.map(newTexts, function (t) { return t.length; }).join(",") + "|" + newTexts.join("");
+            var id = "".concat(getTypeListId(newTypes), "|").concat(ts.map(newTexts, function (t) { return t.length; }).join(","), "|").concat(newTexts.join(""));
             var type = templateLiteralTypes.get(id);
             if (!type) {
                 templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes));
@@ -46665,10 +49933,8 @@ var ts;
             return type.flags & 128 ? type.value :
                 type.flags & 256 ? "" + type.value :
                     type.flags & 2048 ? ts.pseudoBigIntToString(type.value) :
-                        type.flags & 512 ? type.intrinsicName :
-                            type.flags & 65536 ? "null" :
-                                type.flags & 32768 ? "undefined" :
-                                    undefined;
+                        type.flags & (512 | 98304) ? type.intrinsicName :
+                            undefined;
         }
         function createTemplateLiteralType(texts, types) {
             var type = createType(134217728);
@@ -46679,7 +49945,7 @@ var ts;
         function getStringMappingType(symbol, type) {
             return type.flags & (1048576 | 131072) ? mapType(type, function (t) { return getStringMappingType(symbol, t); }) :
                 isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) :
-                    type.flags & 128 ? getLiteralType(applyStringMapping(symbol, type.value)) :
+                    type.flags & 128 ? getStringLiteralType(applyStringMapping(symbol, type.value)) :
                         type;
         }
         function applyStringMapping(symbol, str) {
@@ -46692,7 +49958,7 @@ var ts;
             return str;
         }
         function getStringMappingTypeForGenericType(symbol, type) {
-            var id = getSymbolId(symbol) + "," + getTypeId(type);
+            var id = "".concat(getSymbolId(symbol), ",").concat(getTypeId(type));
             var result = stringMappingTypes.get(id);
             if (!result) {
                 stringMappingTypes.set(id, result = createStringMappingType(symbol, type));
@@ -46705,20 +49971,20 @@ var ts;
             result.type = type;
             return result;
         }
-        function createIndexedAccessType(objectType, indexType, aliasSymbol, aliasTypeArguments, shouldIncludeUndefined) {
+        function createIndexedAccessType(objectType, indexType, accessFlags, aliasSymbol, aliasTypeArguments) {
             var type = createType(8388608);
             type.objectType = objectType;
             type.indexType = indexType;
+            type.accessFlags = accessFlags;
             type.aliasSymbol = aliasSymbol;
             type.aliasTypeArguments = aliasTypeArguments;
-            type.noUncheckedIndexedAccessCandidate = shouldIncludeUndefined;
             return type;
         }
         function isJSLiteralType(type) {
             if (noImplicitAny) {
                 return false;
             }
-            if (ts.getObjectFlags(type) & 16384) {
+            if (ts.getObjectFlags(type) & 8192) {
                 return true;
             }
             if (type.flags & 1048576) {
@@ -46734,14 +50000,11 @@ var ts;
             return false;
         }
         function getPropertyNameFromIndex(indexType, accessNode) {
-            var accessExpression = accessNode && accessNode.kind === 202 ? accessNode : undefined;
             return isTypeUsableAsPropertyName(indexType) ?
                 getPropertyNameFromType(indexType) :
-                accessExpression && checkThatExpressionIsProperSymbolReference(accessExpression.argumentExpression, indexType, false) ?
-                    ts.getPropertyNameForKnownSymbolName(ts.idText(accessExpression.argumentExpression.name)) :
-                    accessNode && ts.isPropertyName(accessNode) ?
-                        ts.getPropertyNameForPropertyNameNode(accessNode) :
-                        undefined;
+                accessNode && ts.isPropertyName(accessNode) ?
+                    ts.getPropertyNameForPropertyNameNode(accessNode) :
+                    undefined;
         }
         function isUncalledFunctionReference(node, symbol) {
             if (symbol.flags & (16 | 8192)) {
@@ -46753,24 +50016,27 @@ var ts;
             }
             return true;
         }
-        function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, suppressNoImplicitAnyError, accessNode, accessFlags, noUncheckedIndexedAccessCandidate, reportDeprecated) {
+        function getPropertyTypeForIndexType(originalObjectType, objectType, indexType, fullIndexType, accessNode, accessFlags) {
             var _a;
-            var accessExpression = accessNode && accessNode.kind === 202 ? accessNode : undefined;
+            var accessExpression = accessNode && accessNode.kind === 206 ? accessNode : undefined;
             var propName = accessNode && ts.isPrivateIdentifier(accessNode) ? undefined : getPropertyNameFromIndex(indexType, accessNode);
             if (propName !== undefined) {
+                if (accessFlags & 256) {
+                    return getTypeOfPropertyOfContextualType(objectType, propName) || anyType;
+                }
                 var prop = getPropertyOfType(objectType, propName);
                 if (prop) {
-                    if (reportDeprecated && accessNode && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 && isUncalledFunctionReference(accessNode, prop)) {
+                    if (accessFlags & 64 && accessNode && prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 && isUncalledFunctionReference(accessNode, prop)) {
                         var deprecatedNode = (_a = accessExpression === null || accessExpression === void 0 ? void 0 : accessExpression.argumentExpression) !== null && _a !== void 0 ? _a : (ts.isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode);
                         addDeprecatedSuggestion(deprecatedNode, prop.declarations, propName);
                     }
                     if (accessExpression) {
-                        markPropertyAsReferenced(prop, accessExpression, accessExpression.expression.kind === 107);
+                        markPropertyAsReferenced(prop, accessExpression, isSelfTypeAccess(accessExpression.expression, objectType.symbol));
                         if (isAssignmentToReadonlyEntity(accessExpression, prop, ts.getAssignmentTargetKind(accessExpression))) {
                             error(accessExpression.argumentExpression, ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, symbolToString(prop));
                             return undefined;
                         }
-                        if (accessFlags & 4) {
+                        if (accessFlags & 8) {
                             getNodeLinks(accessNode).resolvedSymbol = prop;
                         }
                         if (isThisPropertyAccessInConstructor(accessExpression, prop)) {
@@ -46783,7 +50049,7 @@ var ts;
                         propType;
                 }
                 if (everyType(objectType, isTupleType) && isNumericLiteralName(propName) && +propName >= 0) {
-                    if (accessNode && everyType(objectType, function (t) { return !t.target.hasRestElement; }) && !(accessFlags & 8)) {
+                    if (accessNode && everyType(objectType, function (t) { return !t.target.hasRestElement; }) && !(accessFlags & 16)) {
                         var indexNode = getIndexNodeForAccessExpression(accessNode);
                         if (isTupleType(objectType)) {
                             error(indexNode, ts.Diagnostics.Tuple_type_0_of_length_1_has_no_element_at_index_2, typeToString(objectType), getTypeReferenceArity(objectType), ts.unescapeLeadingUnderscores(propName));
@@ -46792,10 +50058,10 @@ var ts;
                             error(indexNode, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.unescapeLeadingUnderscores(propName), typeToString(objectType));
                         }
                     }
-                    errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, 1));
+                    errorIfWritingToReadonlyIndex(getIndexInfoOfType(objectType, numberType));
                     return mapType(objectType, function (t) {
                         var restType = getRestTypeOfTupleType(t) || undefinedType;
-                        return noUncheckedIndexedAccessCandidate ? getUnionType([restType, undefinedType]) : restType;
+                        return accessFlags & 1 ? getUnionType([restType, undefinedType]) : restType;
                     });
                 }
             }
@@ -46803,22 +50069,21 @@ var ts;
                 if (objectType.flags & (1 | 131072)) {
                     return objectType;
                 }
-                var stringIndexInfo = getIndexInfoOfType(objectType, 0);
-                var indexInfo = isTypeAssignableToKind(indexType, 296) && getIndexInfoOfType(objectType, 1) || stringIndexInfo;
+                var indexInfo = getApplicableIndexInfo(objectType, indexType) || getIndexInfoOfType(objectType, stringType);
                 if (indexInfo) {
-                    if (accessFlags & 1 && indexInfo === stringIndexInfo) {
+                    if (accessFlags & 2 && indexInfo.keyType !== numberType) {
                         if (accessExpression) {
                             error(accessExpression, ts.Diagnostics.Type_0_cannot_be_used_to_index_type_1, typeToString(indexType), typeToString(originalObjectType));
                         }
                         return undefined;
                     }
-                    if (accessNode && !isTypeAssignableToKind(indexType, 4 | 8)) {
+                    if (accessNode && indexInfo.keyType === stringType && !isTypeAssignableToKind(indexType, 4 | 8)) {
                         var indexNode = getIndexNodeForAccessExpression(accessNode);
                         error(indexNode, ts.Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType));
-                        return noUncheckedIndexedAccessCandidate ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type;
+                        return accessFlags & 1 ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type;
                     }
                     errorIfWritingToReadonlyIndex(indexInfo);
-                    return noUncheckedIndexedAccessCandidate ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type;
+                    return accessFlags & 1 ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type;
                 }
                 if (indexType.flags & 131072) {
                     return neverType;
@@ -46842,12 +50107,12 @@ var ts;
                     if (objectType.symbol === globalThisSymbol && propName !== undefined && globalThisSymbol.exports.has(propName) && (globalThisSymbol.exports.get(propName).flags & 418)) {
                         error(accessExpression, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.unescapeLeadingUnderscores(propName), typeToString(objectType));
                     }
-                    else if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !suppressNoImplicitAnyError) {
+                    else if (noImplicitAny && !compilerOptions.suppressImplicitAnyIndexErrors && !(accessFlags & 128)) {
                         if (propName !== undefined && typeHasStaticProperty(propName, objectType)) {
                             var typeName = typeToString(objectType);
                             error(accessExpression, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_to_access_the_static_member_2_instead, propName, typeName, typeName + "[" + ts.getTextOfNode(accessExpression.argumentExpression) + "]");
                         }
-                        else if (getIndexTypeOfType(objectType, 1)) {
+                        else if (getIndexTypeOfType(objectType, numberType)) {
                             error(accessExpression.argumentExpression, ts.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number);
                         }
                         else {
@@ -46915,36 +50180,43 @@ var ts;
             }
         }
         function getIndexNodeForAccessExpression(accessNode) {
-            return accessNode.kind === 202 ? accessNode.argumentExpression :
-                accessNode.kind === 189 ? accessNode.indexType :
-                    accessNode.kind === 158 ? accessNode.expression :
+            return accessNode.kind === 206 ? accessNode.argumentExpression :
+                accessNode.kind === 193 ? accessNode.indexType :
+                    accessNode.kind === 161 ? accessNode.expression :
                         accessNode;
         }
         function isPatternLiteralPlaceholderType(type) {
-            return templateConstraintType.types.indexOf(type) !== -1 || !!(type.flags & 1);
+            return !!(type.flags & (1 | 4 | 8 | 64));
         }
         function isPatternLiteralType(type) {
             return !!(type.flags & 134217728) && ts.every(type.types, isPatternLiteralPlaceholderType);
         }
+        function isGenericType(type) {
+            return !!getGenericObjectFlags(type);
+        }
         function isGenericObjectType(type) {
+            return !!(getGenericObjectFlags(type) & 8388608);
+        }
+        function isGenericIndexType(type) {
+            return !!(getGenericObjectFlags(type) & 16777216);
+        }
+        function getGenericObjectFlags(type) {
             if (type.flags & 3145728) {
                 if (!(type.objectFlags & 4194304)) {
                     type.objectFlags |= 4194304 |
-                        (ts.some(type.types, isGenericObjectType) ? 8388608 : 0);
+                        ts.reduceLeft(type.types, function (flags, t) { return flags | getGenericObjectFlags(t); }, 0);
                 }
-                return !!(type.objectFlags & 8388608);
+                return type.objectFlags & 25165824;
             }
-            return !!(type.flags & 58982400) || isGenericMappedType(type) || isGenericTupleType(type);
-        }
-        function isGenericIndexType(type) {
-            if (type.flags & 3145728) {
-                if (!(type.objectFlags & 16777216)) {
-                    type.objectFlags |= 16777216 |
-                        (ts.some(type.types, isGenericIndexType) ? 33554432 : 0);
+            if (type.flags & 33554432) {
+                if (!(type.objectFlags & 4194304)) {
+                    type.objectFlags |= 4194304 |
+                        getGenericObjectFlags(type.substitute) | getGenericObjectFlags(type.baseType);
                 }
-                return !!(type.objectFlags & 33554432);
+                return type.objectFlags & 25165824;
             }
-            return !!(type.flags & (58982400 | 4194304 | 134217728 | 268435456)) && !isPatternLiteralType(type);
+            return (type.flags & 58982400 || isGenericMappedType(type) || isGenericTupleType(type) ? 8388608 : 0) |
+                (type.flags & (58982400 | 4194304 | 134217728 | 268435456) && !isPatternLiteralType(type) ? 16777216 : 0);
         }
         function isThisTypeParameter(type) {
             return !!(type.flags & 262144 && type.isThisType);
@@ -47026,9 +50298,9 @@ var ts;
             var templateMapper = combineTypeMappers(objectType.mapper, mapper);
             return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper);
         }
-        function getIndexedAccessType(objectType, indexType, noUncheckedIndexedAccessCandidate, accessNode, aliasSymbol, aliasTypeArguments, accessFlags) {
+        function getIndexedAccessType(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
             if (accessFlags === void 0) { accessFlags = 0; }
-            return getIndexedAccessTypeOrUndefined(objectType, indexType, noUncheckedIndexedAccessCandidate, accessNode, accessFlags, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType);
+            return getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType);
         }
         function indexTypeLessThan(indexType, limit) {
             return everyType(indexType, function (t) {
@@ -47042,27 +50314,27 @@ var ts;
                 return false;
             });
         }
-        function getIndexedAccessTypeOrUndefined(objectType, indexType, noUncheckedIndexedAccessCandidate, accessNode, accessFlags, aliasSymbol, aliasTypeArguments) {
+        function getIndexedAccessTypeOrUndefined(objectType, indexType, accessFlags, accessNode, aliasSymbol, aliasTypeArguments) {
             if (accessFlags === void 0) { accessFlags = 0; }
             if (objectType === wildcardType || indexType === wildcardType) {
                 return wildcardType;
             }
-            var shouldIncludeUndefined = noUncheckedIndexedAccessCandidate ||
-                (!!compilerOptions.noUncheckedIndexedAccess &&
-                    (accessFlags & (2 | 16)) === 16);
             if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & 98304) && isTypeAssignableToKind(indexType, 4 | 8)) {
                 indexType = stringType;
             }
-            if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 189 ?
+            if (compilerOptions.noUncheckedIndexedAccess && accessFlags & 32)
+                accessFlags |= 1;
+            if (isGenericIndexType(indexType) || (accessNode && accessNode.kind !== 193 ?
                 isGenericTupleType(objectType) && !indexTypeLessThan(indexType, objectType.target.fixedLength) :
                 isGenericObjectType(objectType) && !(isTupleType(objectType) && indexTypeLessThan(indexType, objectType.target.fixedLength)))) {
                 if (objectType.flags & 3) {
                     return objectType;
                 }
-                var id = objectType.id + "," + indexType.id + (shouldIncludeUndefined ? "?" : "") + getAliasId(aliasSymbol, aliasTypeArguments);
+                var persistentAccessFlags = accessFlags & 1;
+                var id = objectType.id + "," + indexType.id + "," + persistentAccessFlags + getAliasId(aliasSymbol, aliasTypeArguments);
                 var type = indexedAccessTypes.get(id);
                 if (!type) {
-                    indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, aliasSymbol, aliasTypeArguments, shouldIncludeUndefined));
+                    indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, persistentAccessFlags, aliasSymbol, aliasTypeArguments));
                 }
                 return type;
             }
@@ -47072,7 +50344,7 @@ var ts;
                 var wasMissingProp = false;
                 for (var _i = 0, _a = indexType.types; _i < _a.length; _i++) {
                     var t = _a[_i];
-                    var propType = getPropertyTypeForIndexType(objectType, apparentObjectType, t, indexType, wasMissingProp, accessNode, accessFlags, shouldIncludeUndefined);
+                    var propType = getPropertyTypeForIndexType(objectType, apparentObjectType, t, indexType, accessNode, accessFlags | (wasMissingProp ? 128 : 0));
                     if (propType) {
                         propTypes.push(propType);
                     }
@@ -47086,11 +50358,11 @@ var ts;
                 if (wasMissingProp) {
                     return undefined;
                 }
-                return accessFlags & 2
+                return accessFlags & 4
                     ? getIntersectionType(propTypes, aliasSymbol, aliasTypeArguments)
                     : getUnionType(propTypes, 1, aliasSymbol, aliasTypeArguments);
             }
-            return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, false, accessNode, accessFlags | 4, shouldIncludeUndefined, true);
+            return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, accessNode, accessFlags | 8 | 64);
         }
         function getTypeFromIndexedAccessTypeNode(node) {
             var links = getNodeLinks(node);
@@ -47098,7 +50370,7 @@ var ts;
                 var objectType = getTypeFromTypeNode(node.objectType);
                 var indexType = getTypeFromTypeNode(node.indexType);
                 var potentialAlias = getAliasSymbolForTypeNode(node);
-                var resolved = getIndexedAccessType(objectType, indexType, undefined, node, potentialAlias, getTypeArgumentsForAliasSymbol(potentialAlias));
+                var resolved = getIndexedAccessType(objectType, indexType, 0, node, potentialAlias, getTypeArgumentsForAliasSymbol(potentialAlias));
                 links.resolvedType = resolved.flags & 8388608 &&
                     resolved.objectType === objectType &&
                     resolved.indexType === indexType ?
@@ -47129,11 +50401,10 @@ var ts;
             return type;
         }
         function isTypicalNondistributiveConditional(root) {
-            return !root.isDistributive
-                && root.node.checkType.kind === 179
-                && ts.length(root.node.checkType.elements) === 1
-                && root.node.extendsType.kind === 179
-                && ts.length(root.node.extendsType.elements) === 1;
+            return !root.isDistributive && isSingletonTupleType(root.node.checkType) && isSingletonTupleType(root.node.extendsType);
+        }
+        function isSingletonTupleType(node) {
+            return ts.isTupleTypeNode(node) && ts.length(node.elements) === 1 && !ts.isOptionalTypeNode(node.elements[0]) && !ts.isRestTypeNode(node.elements[0]);
         }
         function unwrapNondistributiveConditionalTuple(root, type) {
             return isTypicalNondistributiveConditional(root) && isTupleType(type) ? getTypeArguments(type)[0] : type;
@@ -47141,10 +50412,16 @@ var ts;
         function getConditionalType(root, mapper, aliasSymbol, aliasTypeArguments) {
             var result;
             var extraTypes;
+            var tailCount = 0;
             while (true) {
+                if (tailCount === 1000) {
+                    error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
+                    result = errorType;
+                    break;
+                }
                 var isUnwrapped = isTypicalNondistributiveConditional(root);
-                var checkType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.checkType), mapper);
-                var checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType);
+                var checkType = instantiateType(unwrapNondistributiveConditionalTuple(root, getActualTypeVariable(root.checkType)), mapper);
+                var checkTypeInstantiable = isGenericType(checkType);
                 var extendsType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), mapper);
                 if (checkType === wildcardType || extendsType === wildcardType) {
                     return wildcardType;
@@ -47153,12 +50430,12 @@ var ts;
                 if (root.inferTypeParameters) {
                     var context = createInferenceContext(root.inferTypeParameters, undefined, 0);
                     if (!checkTypeInstantiable) {
-                        inferTypes(context.inferences, checkType, extendsType, 256 | 512);
+                        inferTypes(context.inferences, checkType, extendsType, 512 | 1024);
                     }
-                    combinedMapper = mergeTypeMappers(mapper, context.mapper);
+                    combinedMapper = mapper ? combineTypeMappers(context.mapper, mapper) : context.mapper;
                 }
                 var inferredExtendsType = combinedMapper ? instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), combinedMapper) : extendsType;
-                if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) {
+                if (!checkTypeInstantiable && !isGenericType(inferredExtendsType)) {
                     if (!(inferredExtendsType.flags & 3) && ((checkType.flags & 1 && !isUnwrapped) || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) {
                         if (checkType.flags & 1 && !isUnwrapped) {
                             (extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper));
@@ -47170,12 +50447,20 @@ var ts;
                                 root = newRoot;
                                 continue;
                             }
+                            if (canTailRecurse(falseType_1, mapper)) {
+                                continue;
+                            }
                         }
                         result = instantiateType(falseType_1, mapper);
                         break;
                     }
                     if (inferredExtendsType.flags & 3 || isTypeAssignableTo(getRestrictiveInstantiation(checkType), getRestrictiveInstantiation(inferredExtendsType))) {
-                        result = instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper);
+                        var trueType_1 = getTypeFromTypeNode(root.node.trueType);
+                        var trueMapper = combinedMapper || mapper;
+                        if (canTailRecurse(trueType_1, trueMapper)) {
+                            continue;
+                        }
+                        result = instantiateType(trueType_1, trueMapper);
                         break;
                     }
                 }
@@ -47190,6 +50475,28 @@ var ts;
                 break;
             }
             return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
+            function canTailRecurse(newType, newMapper) {
+                if (newType.flags & 16777216 && newMapper) {
+                    var newRoot = newType.root;
+                    if (newRoot.outerTypeParameters) {
+                        var typeParamMapper_1 = combineTypeMappers(newType.mapper, newMapper);
+                        var typeArguments = ts.map(newRoot.outerTypeParameters, function (t) { return getMappedType(t, typeParamMapper_1); });
+                        var newRootMapper = createTypeMapper(newRoot.outerTypeParameters, typeArguments);
+                        var newCheckType = newRoot.isDistributive ? getMappedType(newRoot.checkType, newRootMapper) : undefined;
+                        if (!newCheckType || newCheckType === newRoot.checkType || !(newCheckType.flags & (1048576 | 131072))) {
+                            root = newRoot;
+                            mapper = newRootMapper;
+                            aliasSymbol = undefined;
+                            aliasTypeArguments = undefined;
+                            if (newRoot.aliasSymbol) {
+                                tailCount++;
+                            }
+                            return true;
+                        }
+                    }
+                }
+                return false;
+            }
         }
         function getTrueTypeFromConditionalType(type) {
             return type.resolvedTrueType || (type.resolvedTrueType = instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.mapper));
@@ -47211,6 +50518,10 @@ var ts;
             }
             return result;
         }
+        function isDistributionDependent(root) {
+            return root.isDistributive && (isTypeParameterPossiblyReferenced(root.checkType, root.node.trueType) ||
+                isTypeParameterPossiblyReferenced(root.checkType, root.node.falseType));
+        }
         function getTypeFromConditionalTypeNode(node) {
             var links = getNodeLinks(node);
             if (!links.resolvedType) {
@@ -47340,7 +50651,7 @@ var ts;
         }
         function getAliasSymbolForTypeNode(node) {
             var host = node.parent;
-            while (ts.isParenthesizedTypeNode(host) || ts.isJSDocTypeExpression(host) || ts.isTypeOperatorNode(host) && host.operator === 142) {
+            while (ts.isParenthesizedTypeNode(host) || ts.isJSDocTypeExpression(host) || ts.isTypeOperatorNode(host) && host.operator === 144) {
                 host = host.parent;
             }
             return ts.isTypeAlias(host) ? getSymbolOfNode(host) : undefined;
@@ -47355,16 +50666,19 @@ var ts;
             return isEmptyObjectType(type) || !!(type.flags & (65536 | 32768 | 528 | 296 | 2112 | 402653316 | 1056 | 67108864 | 4194304));
         }
         function tryMergeUnionOfObjectTypeAndEmptyObject(type, readonly) {
+            if (!(type.flags & 1048576)) {
+                return type;
+            }
             if (ts.every(type.types, isEmptyObjectTypeOrSpreadsIntoEmptyObject)) {
                 return ts.find(type.types, isEmptyObjectType) || emptyObjectType;
             }
             var firstType = ts.find(type.types, function (t) { return !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t); });
             if (!firstType) {
-                return undefined;
+                return type;
             }
-            var secondType = firstType && ts.find(type.types, function (t) { return t !== firstType && !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t); });
+            var secondType = ts.find(type.types, function (t) { return t !== firstType && !isEmptyObjectTypeOrSpreadsIntoEmptyObject(t); });
             if (secondType) {
-                return undefined;
+                return type;
             }
             return getAnonymousPartialType(firstType);
             function getAnonymousPartialType(type) {
@@ -47377,15 +50691,15 @@ var ts;
                         var isSetonlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
                         var flags = 4 | 16777216;
                         var result = createSymbol(flags, prop.escapedName, getIsLateCheckFlag(prop) | (readonly ? 8 : 0));
-                        result.type = isSetonlyAccessor ? undefinedType : getUnionType([getTypeOfSymbol(prop), undefinedType]);
+                        result.type = isSetonlyAccessor ? undefinedType : addOptionality(getTypeOfSymbol(prop), true);
                         result.declarations = prop.declarations;
                         result.nameType = getSymbolLinks(prop).nameType;
                         result.syntheticOrigin = prop;
                         members.set(prop.escapedName, result);
                     }
                 }
-                var spread = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoOfType(type, 0), getIndexInfoOfType(type, 1));
-                spread.objectFlags |= 128 | 1048576;
+                var spread = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfosOfType(type));
+                spread.objectFlags |= 128 | 262144;
                 return spread;
             }
         }
@@ -47402,20 +50716,14 @@ var ts;
             if (right.flags & 131072) {
                 return left;
             }
+            left = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly);
             if (left.flags & 1048576) {
-                var merged = tryMergeUnionOfObjectTypeAndEmptyObject(left, readonly);
-                if (merged) {
-                    return getSpreadType(merged, right, symbol, objectFlags, readonly);
-                }
                 return checkCrossProductUnion([left, right])
                     ? mapType(left, function (t) { return getSpreadType(t, right, symbol, objectFlags, readonly); })
                     : errorType;
             }
+            right = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly);
             if (right.flags & 1048576) {
-                var merged = tryMergeUnionOfObjectTypeAndEmptyObject(right, readonly);
-                if (merged) {
-                    return getSpreadType(left, merged, symbol, objectFlags, readonly);
-                }
                 return checkCrossProductUnion([left, right])
                     ? mapType(right, function (t) { return getSpreadType(left, t, symbol, objectFlags, readonly); })
                     : errorType;
@@ -47438,16 +50746,7 @@ var ts;
             }
             var members = ts.createSymbolTable();
             var skippedPrivateMembers = new ts.Set();
-            var stringIndexInfo;
-            var numberIndexInfo;
-            if (left === emptyObjectType) {
-                stringIndexInfo = getIndexInfoOfType(right, 0);
-                numberIndexInfo = getIndexInfoOfType(right, 1);
-            }
-            else {
-                stringIndexInfo = unionSpreadIndexInfos(getIndexInfoOfType(left, 0), getIndexInfoOfType(right, 0));
-                numberIndexInfo = unionSpreadIndexInfos(getIndexInfoOfType(left, 1), getIndexInfoOfType(right, 1));
-            }
+            var indexInfos = left === emptyObjectType ? getIndexInfosOfType(right) : getUnionIndexInfos([left, right]);
             for (var _i = 0, _a = getPropertiesOfType(right); _i < _a.length; _i++) {
                 var rightProp = _a[_i];
                 if (ts.getDeclarationModifierFlagsFromSymbol(rightProp) & (8 | 16)) {
@@ -47469,7 +50768,7 @@ var ts;
                         var declarations = ts.concatenate(leftProp.declarations, rightProp.declarations);
                         var flags = 4 | (leftProp.flags & 16777216);
                         var result = createSymbol(flags, leftProp.escapedName);
-                        result.type = getUnionType([getTypeOfSymbol(leftProp), getTypeWithFacts(rightType, 524288)]);
+                        result.type = getUnionType([getTypeOfSymbol(leftProp), removeMissingOrUndefinedType(rightType)]);
                         result.leftSpread = leftProp;
                         result.rightSpread = rightProp;
                         result.declarations = declarations;
@@ -47481,14 +50780,15 @@ var ts;
                     members.set(leftProp.escapedName, getSpreadSymbol(leftProp, readonly));
                 }
             }
-            var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, getIndexInfoWithReadonly(stringIndexInfo, readonly), getIndexInfoWithReadonly(numberIndexInfo, readonly));
-            spread.objectFlags |= 128 | 1048576 | 1024 | objectFlags;
+            var spread = createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, ts.sameMap(indexInfos, function (info) { return getIndexInfoWithReadonly(info, readonly); }));
+            spread.objectFlags |= 128 | 262144 | 4194304 | objectFlags;
             return spread;
         }
         function isSpreadableProperty(prop) {
-            return !ts.some(prop.declarations, ts.isPrivateIdentifierPropertyDeclaration) &&
+            var _a;
+            return !ts.some(prop.declarations, ts.isPrivateIdentifierClassElementDeclaration) &&
                 (!(prop.flags & (8192 | 32768 | 65536)) ||
-                    !prop.declarations.some(function (decl) { return ts.isClassLike(decl.parent); }));
+                    !((_a = prop.declarations) === null || _a === void 0 ? void 0 : _a.some(function (decl) { return ts.isClassLike(decl.parent); })));
         }
         function getSpreadSymbol(prop, readonly) {
             var isSetonlyAccessor = prop.flags & 65536 && !(prop.flags & 32768);
@@ -47504,19 +50804,19 @@ var ts;
             return result;
         }
         function getIndexInfoWithReadonly(info, readonly) {
-            return info && info.isReadonly !== readonly ? createIndexInfo(info.type, readonly, info.declaration) : info;
+            return info.isReadonly !== readonly ? createIndexInfo(info.keyType, info.type, readonly, info.declaration) : info;
         }
-        function createLiteralType(flags, value, symbol) {
+        function createLiteralType(flags, value, symbol, regularType) {
             var type = createType(flags);
             type.symbol = symbol;
             type.value = value;
+            type.regularType = regularType || type;
             return type;
         }
         function getFreshTypeOfLiteralType(type) {
             if (type.flags & 2944) {
                 if (!type.freshType) {
-                    var freshType = createLiteralType(type.flags, type.value, type.symbol);
-                    freshType.regularType = type;
+                    var freshType = createLiteralType(type.flags, type.value, type.symbol, type);
                     freshType.freshType = freshType;
                     type.freshType = freshType;
                 }
@@ -47532,21 +50832,32 @@ var ts;
         function isFreshLiteralType(type) {
             return !!(type.flags & 2944) && type.freshType === type;
         }
-        function getLiteralType(value, enumId, symbol) {
-            var qualifier = typeof value === "number" ? "#" : typeof value === "string" ? "@" : "n";
-            var key = (enumId ? enumId : "") + qualifier + (typeof value === "object" ? ts.pseudoBigIntToString(value) : value);
-            var type = literalTypes.get(key);
-            if (!type) {
-                var flags = (typeof value === "number" ? 256 :
-                    typeof value === "string" ? 128 : 2048) |
-                    (enumId ? 1024 : 0);
-                literalTypes.set(key, type = createLiteralType(flags, value, symbol));
-                type.regularType = type;
-            }
-            return type;
+        function getStringLiteralType(value) {
+            var type;
+            return stringLiteralTypes.get(value) ||
+                (stringLiteralTypes.set(value, type = createLiteralType(128, value)), type);
+        }
+        function getNumberLiteralType(value) {
+            var type;
+            return numberLiteralTypes.get(value) ||
+                (numberLiteralTypes.set(value, type = createLiteralType(256, value)), type);
+        }
+        function getBigIntLiteralType(value) {
+            var type;
+            var key = ts.pseudoBigIntToString(value);
+            return bigIntLiteralTypes.get(key) ||
+                (bigIntLiteralTypes.set(key, type = createLiteralType(2048, value)), type);
+        }
+        function getEnumLiteralType(value, enumId, symbol) {
+            var type;
+            var qualifier = typeof value === "string" ? "@" : "#";
+            var key = enumId + qualifier + value;
+            var flags = 1024 | (typeof value === "string" ? 128 : 256);
+            return enumLiteralTypes.get(key) ||
+                (enumLiteralTypes.set(key, type = createLiteralType(flags, value, symbol)), type);
         }
         function getTypeFromLiteralTypeNode(node) {
-            if (node.literal.kind === 103) {
+            if (node.literal.kind === 104) {
                 return nullType;
             }
             var links = getNodeLinks(node);
@@ -47558,7 +50869,7 @@ var ts;
         function createUniqueESSymbolType(symbol) {
             var type = createType(8192);
             type.symbol = symbol;
-            type.escapedName = "__@" + type.symbol.escapedName + "@" + getSymbolId(type.symbol);
+            type.escapedName = "__@".concat(type.symbol.escapedName, "@").concat(getSymbolId(type.symbol));
             return type;
         }
         function getESSymbolLikeTypeForNode(node) {
@@ -47572,8 +50883,8 @@ var ts;
         function getThisType(node) {
             var container = ts.getThisContainer(node, false);
             var parent = container && container.parent;
-            if (parent && (ts.isClassLike(parent) || parent.kind === 253)) {
-                if (!ts.hasSyntacticModifier(container, 32) &&
+            if (parent && (ts.isClassLike(parent) || parent.kind === 257)) {
+                if (!ts.isStatic(container) &&
                     (!ts.isConstructorDeclaration(container) || ts.isNodeDescendantOf(node, container.body))) {
                     return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(parent)).thisType;
                 }
@@ -47603,17 +50914,17 @@ var ts;
         }
         function getArrayElementTypeNode(node) {
             switch (node.kind) {
-                case 186:
+                case 190:
                     return getArrayElementTypeNode(node.type);
-                case 179:
+                case 183:
                     if (node.elements.length === 1) {
                         node = node.elements[0];
-                        if (node.kind === 181 || node.kind === 192 && node.dotDotDotToken) {
+                        if (node.kind === 185 || node.kind === 196 && node.dotDotDotToken) {
                             return getArrayElementTypeNode(node.type);
                         }
                     }
                     break;
-                case 178:
+                case 182:
                     return node.elementType;
             }
             return undefined;
@@ -47622,102 +50933,101 @@ var ts;
             var links = getNodeLinks(node);
             return links.resolvedType || (links.resolvedType =
                 node.dotDotDotToken ? getTypeFromRestTypeNode(node) :
-                    node.questionToken && strictNullChecks ? getOptionalType(getTypeFromTypeNode(node.type)) :
-                        getTypeFromTypeNode(node.type));
+                    addOptionality(getTypeFromTypeNode(node.type), true, !!node.questionToken));
         }
         function getTypeFromTypeNode(node) {
             return getConditionalFlowTypeOfType(getTypeFromTypeNodeWorker(node), node);
         }
         function getTypeFromTypeNodeWorker(node) {
             switch (node.kind) {
-                case 128:
-                case 303:
-                case 304:
+                case 130:
+                case 310:
+                case 311:
                     return anyType;
-                case 152:
+                case 154:
                     return unknownType;
-                case 147:
+                case 149:
                     return stringType;
-                case 144:
+                case 146:
                     return numberType;
-                case 155:
+                case 157:
                     return bigintType;
-                case 131:
+                case 133:
                     return booleanType;
-                case 148:
+                case 150:
                     return esSymbolType;
-                case 113:
+                case 114:
                     return voidType;
-                case 150:
+                case 152:
                     return undefinedType;
-                case 103:
+                case 104:
                     return nullType;
-                case 141:
+                case 143:
                     return neverType;
-                case 145:
+                case 147:
                     return node.flags & 131072 && !noImplicitAny ? anyType : nonPrimitiveType;
-                case 136:
+                case 138:
                     return intrinsicMarkerType;
-                case 187:
-                case 107:
-                    return getTypeFromThisTypeNode(node);
                 case 191:
+                case 108:
+                    return getTypeFromThisTypeNode(node);
+                case 195:
                     return getTypeFromLiteralTypeNode(node);
-                case 173:
+                case 177:
                     return getTypeFromTypeReference(node);
-                case 172:
+                case 176:
                     return node.assertsModifier ? voidType : booleanType;
-                case 223:
+                case 227:
                     return getTypeFromTypeReference(node);
-                case 176:
+                case 180:
                     return getTypeFromTypeQueryNode(node);
-                case 178:
-                case 179:
+                case 182:
+                case 183:
                     return getTypeFromArrayOrTupleTypeNode(node);
-                case 180:
+                case 184:
                     return getTypeFromOptionalTypeNode(node);
-                case 182:
+                case 186:
                     return getTypeFromUnionTypeNode(node);
-                case 183:
+                case 187:
                     return getTypeFromIntersectionTypeNode(node);
-                case 305:
+                case 312:
                     return getTypeFromJSDocNullableTypeNode(node);
-                case 307:
+                case 314:
                     return addOptionality(getTypeFromTypeNode(node.type));
-                case 192:
+                case 196:
                     return getTypeFromNamedTupleTypeNode(node);
-                case 186:
-                case 306:
-                case 301:
+                case 190:
+                case 313:
+                case 307:
                     return getTypeFromTypeNode(node.type);
-                case 181:
+                case 185:
                     return getTypeFromRestTypeNode(node);
-                case 309:
+                case 316:
                     return getTypeFromJSDocVariadicType(node);
-                case 174:
-                case 175:
-                case 177:
-                case 312:
-                case 308:
-                case 313:
+                case 178:
+                case 179:
+                case 181:
+                case 320:
+                case 315:
+                case 321:
                     return getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
-                case 188:
+                case 192:
                     return getTypeFromTypeOperatorNode(node);
-                case 189:
+                case 193:
                     return getTypeFromIndexedAccessTypeNode(node);
-                case 190:
+                case 194:
                     return getTypeFromMappedTypeNode(node);
-                case 184:
+                case 188:
                     return getTypeFromConditionalTypeNode(node);
-                case 185:
+                case 189:
                     return getTypeFromInferTypeNode(node);
-                case 193:
+                case 197:
                     return getTypeFromTemplateTypeNode(node);
-                case 195:
+                case 199:
                     return getTypeFromImportTypeNode(node);
-                case 78:
-                case 157:
-                case 201:
+                case 79:
+                case 160:
+                case 205:
                     var symbol = getSymbolAtLocation(node);
                     return symbol ? getDeclaredTypeOfSymbol(symbol) : errorType;
                 default:
@@ -47747,6 +51057,9 @@ var ts;
         function instantiateSignatures(signatures, mapper) {
             return instantiateList(signatures, mapper, instantiateSignature);
         }
+        function instantiateIndexInfos(indexInfos, mapper) {
+            return instantiateList(indexInfos, mapper, instantiateIndexInfo);
+        }
         function createTypeMapper(sources, targets) {
             return sources.length === 1 ? makeUnaryTypeMapper(sources[0], targets ? targets[0] : anyType) : makeArrayTypeMapper(sources, targets);
         }
@@ -47864,8 +51177,9 @@ var ts;
                     outerTypeParameters = ts.addRange(outerTypeParameters, templateTagParameters);
                 }
                 typeParameters = outerTypeParameters || ts.emptyArray;
-                typeParameters = (target.objectFlags & 4 || target.symbol.flags & 2048) && !target.aliasTypeArguments ?
-                    ts.filter(typeParameters, function (tp) { return isTypeParameterPossiblyReferenced(tp, declaration); }) :
+                var allDeclarations_1 = type.objectFlags & 4 ? [declaration] : type.symbol.declarations;
+                typeParameters = (target.objectFlags & 4 || target.symbol.flags & 8192 || target.symbol.flags & 2048) && !target.aliasTypeArguments ?
+                    ts.filter(typeParameters, function (tp) { return ts.some(allDeclarations_1, function (d) { return isTypeParameterPossiblyReferenced(tp, d); }); }) :
                     typeParameters;
                 links.outerTypeParameters = typeParameters;
             }
@@ -47892,30 +51206,35 @@ var ts;
             return type;
         }
         function maybeTypeParameterReference(node) {
-            return !(node.kind === 157 ||
-                node.parent.kind === 173 && node.parent.typeArguments && node === node.parent.typeName ||
-                node.parent.kind === 195 && node.parent.typeArguments && node === node.parent.qualifier);
+            return !(node.parent.kind === 177 && node.parent.typeArguments && node === node.parent.typeName ||
+                node.parent.kind === 199 && node.parent.typeArguments && node === node.parent.qualifier);
         }
         function isTypeParameterPossiblyReferenced(tp, node) {
             if (tp.symbol && tp.symbol.declarations && tp.symbol.declarations.length === 1) {
                 var container = tp.symbol.declarations[0].parent;
                 for (var n = node; n !== container; n = n.parent) {
-                    if (!n || n.kind === 230 || n.kind === 184 && ts.forEachChild(n.extendsType, containsReference)) {
+                    if (!n || n.kind === 234 || n.kind === 188 && ts.forEachChild(n.extendsType, containsReference)) {
                         return true;
                     }
                 }
-                return !!ts.forEachChild(node, containsReference);
+                return containsReference(node);
             }
             return true;
             function containsReference(node) {
                 switch (node.kind) {
-                    case 187:
+                    case 191:
                         return !!tp.isThisType;
-                    case 78:
+                    case 79:
                         return !tp.isThisType && ts.isPartOfTypeNode(node) && maybeTypeParameterReference(node) &&
                             getTypeFromTypeNodeWorker(node) === tp;
-                    case 176:
+                    case 180:
                         return true;
+                    case 168:
+                    case 167:
+                        return !node.type && !!node.body ||
+                            ts.some(node.typeParameters, containsReference) ||
+                            ts.some(node.parameters, containsReference) ||
+                            !!node.type && containsReference(node.type);
                 }
                 return !!ts.forEachChild(node, containsReference);
             }
@@ -47936,9 +51255,11 @@ var ts;
                 var mappedTypeVariable = instantiateType(typeVariable, mapper);
                 if (typeVariable !== mappedTypeVariable) {
                     return mapTypeWithAlias(getReducedType(mappedTypeVariable), function (t) {
-                        if (t.flags & (3 | 58982400 | 524288 | 2097152) && t !== wildcardType && t !== errorType) {
+                        if (t.flags & (3 | 58982400 | 524288 | 2097152) && t !== wildcardType && !isErrorType(t)) {
                             if (!type.declaration.nameType) {
-                                if (isArrayType(t)) {
+                                var constraint = void 0;
+                                if (isArrayType(t) || t.flags & 1 && findResolutionCycleStartIndex(typeVariable, 4) < 0 &&
+                                    (constraint = getConstraintOfTypeParameter(typeVariable)) && everyType(constraint, ts.or(isArrayType, isTupleType))) {
                                     return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper));
                                 }
                                 if (isGenericTupleType(t)) {
@@ -47972,13 +51293,13 @@ var ts;
         }
         function instantiateMappedArrayType(arrayType, mappedType, mapper) {
             var elementType = instantiateMappedTypeTemplate(mappedType, numberType, true, mapper);
-            return elementType === errorType ? errorType :
+            return isErrorType(elementType) ? errorType :
                 createArrayType(elementType, getModifiedReadonlyState(isReadonlyArrayType(arrayType), getMappedTypeModifiers(mappedType)));
         }
         function instantiateMappedTupleType(tupleType, mappedType, mapper) {
             var elementFlags = tupleType.target.elementFlags;
             var elementTypes = ts.map(getTypeArguments(tupleType), function (_, i) {
-                return instantiateMappedTypeTemplate(mappedType, getLiteralType("" + i), !!(elementFlags[i] & 2), mapper);
+                return instantiateMappedTypeTemplate(mappedType, getStringLiteralType("" + i), !!(elementFlags[i] & 2), mapper);
             });
             var modifiers = getMappedTypeModifiers(mappedType);
             var newTupleModifiers = modifiers & 4 ? ts.map(elementFlags, function (f) { return f & 1 ? 2 : f; }) :
@@ -47992,7 +51313,7 @@ var ts;
             var templateMapper = appendTypeMapping(mapper, getTypeParameterFromMappedType(type), key);
             var propType = instantiateType(getTemplateTypeFromMappedType(type.target || type), templateMapper);
             var modifiers = getMappedTypeModifiers(type);
-            return strictNullChecks && modifiers & 4 && !maybeTypeOfKind(propType, 32768 | 16384) ? getOptionalType(propType) :
+            return strictNullChecks && modifiers & 4 && !maybeTypeOfKind(propType, 32768 | 16384) ? getOptionalType(propType, true) :
                 strictNullChecks && modifiers & 8 && isOptional ? getTypeWithFacts(propType, 524288) :
                     propType;
         }
@@ -48019,24 +51340,18 @@ var ts;
                 var id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments);
                 var result = root.instantiations.get(id);
                 if (!result) {
-                    var newMapper = createTypeMapper(root.outerTypeParameters, typeArguments);
-                    result = instantiateConditionalType(root, newMapper, aliasSymbol, aliasTypeArguments);
+                    var newMapper_1 = createTypeMapper(root.outerTypeParameters, typeArguments);
+                    var checkType_1 = root.checkType;
+                    var distributionType = root.isDistributive ? getMappedType(checkType_1, newMapper_1) : undefined;
+                    result = distributionType && checkType_1 !== distributionType && distributionType.flags & (1048576 | 131072) ?
+                        mapTypeWithAlias(distributionType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, newMapper_1)); }, aliasSymbol, aliasTypeArguments) :
+                        getConditionalType(root, newMapper_1, aliasSymbol, aliasTypeArguments);
                     root.instantiations.set(id, result);
                 }
                 return result;
             }
             return type;
         }
-        function instantiateConditionalType(root, mapper, aliasSymbol, aliasTypeArguments) {
-            if (root.isDistributive) {
-                var checkType_1 = root.checkType;
-                var instantiatedType = getMappedType(checkType_1, mapper);
-                if (checkType_1 !== instantiatedType && instantiatedType.flags & (1048576 | 131072)) {
-                    return mapTypeWithAlias(instantiatedType, function (t) { return getConditionalType(root, prependTypeMapping(checkType_1, t, mapper)); }, aliasSymbol, aliasTypeArguments);
-                }
-            }
-            return getConditionalType(root, mapper, aliasSymbol, aliasTypeArguments);
-        }
         function instantiateType(type, mapper) {
             return type && mapper ? instantiateTypeWithAlias(type, mapper, undefined, undefined) : type;
         }
@@ -48044,7 +51359,7 @@ var ts;
             if (!couldContainTypeVariables(type)) {
                 return type;
             }
-            if (instantiationDepth === 50 || instantiationCount >= 5000000) {
+            if (instantiationDepth === 100 || instantiationCount >= 5000000) {
                 ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("checkTypes", "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth: instantiationDepth, instantiationCount: instantiationCount });
                 error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
                 return errorType;
@@ -48069,6 +51384,9 @@ var ts;
                         var newTypeArguments = instantiateTypes(resolvedTypeArguments, mapper);
                         return newTypeArguments !== resolvedTypeArguments ? createNormalizedTypeReference(type.target, newTypeArguments) : type;
                     }
+                    if (objectFlags & 1024) {
+                        return instantiateReverseMappedType(type, mapper);
+                    }
                     return getObjectTypeInstantiation(type, mapper, aliasSymbol, aliasTypeArguments);
                 }
                 return type;
@@ -48098,7 +51416,7 @@ var ts;
             if (flags & 8388608) {
                 var newAliasSymbol = aliasSymbol || type.aliasSymbol;
                 var newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper);
-                return getIndexedAccessType(instantiateType(type.objectType, mapper), instantiateType(type.indexType, mapper), type.noUncheckedIndexedAccessCandidate, undefined, newAliasSymbol, newAliasTypeArguments);
+                return getIndexedAccessType(instantiateType(type.objectType, mapper), instantiateType(type.indexType, mapper), type.accessFlags, undefined, newAliasSymbol, newAliasTypeArguments);
             }
             if (flags & 16777216) {
                 return getConditionalTypeInstantiation(type, combineTypeMappers(type.mapper, mapper), aliasSymbol, aliasTypeArguments);
@@ -48118,6 +51436,21 @@ var ts;
             }
             return type;
         }
+        function instantiateReverseMappedType(type, mapper) {
+            var innerMappedType = instantiateType(type.mappedType, mapper);
+            if (!(ts.getObjectFlags(innerMappedType) & 32)) {
+                return type;
+            }
+            var innerIndexType = instantiateType(type.constraintType, mapper);
+            if (!(innerIndexType.flags & 4194304)) {
+                return type;
+            }
+            var instantiated = inferTypeForHomomorphicMappedType(instantiateType(type.source, mapper), innerMappedType, innerIndexType);
+            if (instantiated) {
+                return instantiated;
+            }
+            return type;
+        }
         function getPermissiveInstantiation(type) {
             return type.flags & (131068 | 3 | 131072) ? type :
                 type.permissiveInstantiation || (type.permissiveInstantiation = instantiateType(type, permissiveMapper));
@@ -48134,37 +51467,37 @@ var ts;
             return type.restrictiveInstantiation;
         }
         function instantiateIndexInfo(info, mapper) {
-            return info && createIndexInfo(instantiateType(info.type, mapper), info.isReadonly, info.declaration);
+            return createIndexInfo(info.keyType, instantiateType(info.type, mapper), info.isReadonly, info.declaration);
         }
         function isContextSensitive(node) {
-            ts.Debug.assert(node.kind !== 165 || ts.isObjectLiteralMethod(node));
+            ts.Debug.assert(node.kind !== 168 || ts.isObjectLiteralMethod(node));
             switch (node.kind) {
-                case 208:
-                case 209:
-                case 165:
-                case 251:
+                case 212:
+                case 213:
+                case 168:
+                case 255:
                     return isContextSensitiveFunctionLikeDeclaration(node);
-                case 200:
+                case 204:
                     return ts.some(node.properties, isContextSensitive);
-                case 199:
+                case 203:
                     return ts.some(node.elements, isContextSensitive);
-                case 217:
+                case 221:
                     return isContextSensitive(node.whenTrue) ||
                         isContextSensitive(node.whenFalse);
-                case 216:
+                case 220:
                     return (node.operatorToken.kind === 56 || node.operatorToken.kind === 60) &&
                         (isContextSensitive(node.left) || isContextSensitive(node.right));
-                case 288:
+                case 294:
                     return isContextSensitive(node.initializer);
-                case 207:
+                case 211:
                     return isContextSensitive(node.expression);
-                case 281:
+                case 285:
                     return ts.some(node.properties, isContextSensitive) || ts.isJsxOpeningElement(node.parent) && ts.some(node.parent.parent.children, isContextSensitive);
-                case 280: {
+                case 284: {
                     var initializer = node.initializer;
                     return !!initializer && isContextSensitive(initializer);
                 }
-                case 283: {
+                case 287: {
                     var expression = node.expression;
                     return !!expression && isContextSensitive(expression);
                 }
@@ -48173,27 +51506,13 @@ var ts;
         }
         function isContextSensitiveFunctionLikeDeclaration(node) {
             return (!ts.isFunctionDeclaration(node) || ts.isInJSFile(node) && !!getTypeForDeclarationFromJSDocComment(node)) &&
-                (hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node));
-        }
-        function hasContextSensitiveParameters(node) {
-            if (!node.typeParameters) {
-                if (ts.some(node.parameters, function (p) { return !ts.getEffectiveTypeAnnotationNode(p); })) {
-                    return true;
-                }
-                if (node.kind !== 209) {
-                    var parameter = ts.firstOrUndefined(node.parameters);
-                    if (!(parameter && ts.parameterIsThisKeyword(parameter))) {
-                        return true;
-                    }
-                }
-            }
-            return false;
+                (ts.hasContextSensitiveParameters(node) || hasContextSensitiveReturnExpression(node));
         }
         function hasContextSensitiveReturnExpression(node) {
-            return !node.typeParameters && !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 230 && isContextSensitive(node.body);
+            return !node.typeParameters && !ts.getEffectiveReturnTypeNode(node) && !!node.body && node.body.kind !== 234 && isContextSensitive(node.body);
         }
         function isContextSensitiveFunctionOrObjectLiteralMethod(func) {
-            return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) &&
+            return (ts.isInJSFile(func) && ts.isFunctionDeclaration(func) || ts.isFunctionExpressionOrArrowFunction(func) || ts.isObjectLiteralMethod(func)) &&
                 isContextSensitiveFunctionLikeDeclaration(func);
         }
         function getTypeWithoutSignatures(type) {
@@ -48205,6 +51524,7 @@ var ts;
                     result.properties = resolved.properties;
                     result.callSignatures = ts.emptyArray;
                     result.constructSignatures = ts.emptyArray;
+                    result.indexInfos = ts.emptyArray;
                     return result;
                 }
             }
@@ -48270,23 +51590,23 @@ var ts;
                 return true;
             }
             switch (node.kind) {
-                case 283:
-                case 207:
+                case 287:
+                case 211:
                     return elaborateError(node.expression, source, target, relation, headMessage, containingMessageChain, errorOutputContainer);
-                case 216:
+                case 220:
                     switch (node.operatorToken.kind) {
-                        case 62:
+                        case 63:
                         case 27:
                             return elaborateError(node.right, source, target, relation, headMessage, containingMessageChain, errorOutputContainer);
                     }
                     break;
-                case 200:
+                case 204:
                     return elaborateObjectLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer);
-                case 199:
+                case 203:
                     return elaborateArrayLiteral(node, source, target, relation, containingMessageChain, errorOutputContainer);
-                case 281:
+                case 285:
                     return elaborateJsxComponents(node, source, target, relation, containingMessageChain, errorOutputContainer);
-                case 209:
+                case 213:
                     return elaborateArrowFunction(node, source, target, relation, containingMessageChain, errorOutputContainer);
             }
             return false;
@@ -48377,17 +51697,29 @@ var ts;
                 if (!targetPropType || targetPropType.flags & 8388608)
                     continue;
                 var sourcePropType = getIndexedAccessTypeOrUndefined(source, nameType);
-                if (sourcePropType && !checkTypeRelatedTo(sourcePropType, targetPropType, relation, undefined)) {
+                if (!sourcePropType)
+                    continue;
+                var propName = getPropertyNameFromIndex(nameType, undefined);
+                if (!checkTypeRelatedTo(sourcePropType, targetPropType, relation, undefined)) {
                     var elaborated = next && elaborateError(next, sourcePropType, targetPropType, relation, undefined, containingMessageChain, errorOutputContainer);
-                    if (elaborated) {
-                        reportedError = true;
-                    }
-                    else {
+                    reportedError = true;
+                    if (!elaborated) {
                         var resultObj = errorOutputContainer || {};
                         var specificSource = next ? checkExpressionForMutableLocationWithContextualType(next, sourcePropType) : sourcePropType;
-                        var result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);
-                        if (result && specificSource !== sourcePropType) {
-                            checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);
+                        if (exactOptionalPropertyTypes && isExactOptionalPropertyMismatch(specificSource, targetPropType)) {
+                            var diag = ts.createDiagnosticForNode(prop, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target, typeToString(specificSource), typeToString(targetPropType));
+                            diagnostics.add(diag);
+                            resultObj.errors = [diag];
+                        }
+                        else {
+                            var targetIsOptional = !!(propName && (getPropertyOfType(target, propName) || unknownSymbol).flags & 16777216);
+                            var sourceIsOptional = !!(propName && (getPropertyOfType(source, propName) || unknownSymbol).flags & 16777216);
+                            targetPropType = removeMissingType(targetPropType, targetIsOptional);
+                            sourcePropType = removeMissingType(sourcePropType, targetIsOptional && sourceIsOptional);
+                            var result = checkTypeRelatedTo(specificSource, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);
+                            if (result && specificSource !== sourcePropType) {
+                                checkTypeRelatedTo(sourcePropType, targetPropType, relation, prop, errorMessage, containingMessageChain, resultObj);
+                            }
                         }
                         if (resultObj.errors) {
                             var reportedDiag = resultObj.errors[resultObj.errors.length - 1];
@@ -48395,9 +51727,7 @@ var ts;
                             var targetProp = propertyName !== undefined ? getPropertyOfType(target, propertyName) : undefined;
                             var issuedElaboration = false;
                             if (!targetProp) {
-                                var indexInfo = isTypeAssignableToKind(nameType, 296) && getIndexInfoOfType(target, 1) ||
-                                    getIndexInfoOfType(target, 0) ||
-                                    undefined;
+                                var indexInfo = getApplicableIndexInfo(target, nameType);
                                 if (indexInfo && indexInfo.declaration && !ts.getSourceFileOfNode(indexInfo.declaration).hasNoDefaultLib) {
                                     issuedElaboration = true;
                                     ts.addRelatedInfo(reportedDiag, ts.createDiagnosticForNode(indexInfo.declaration, ts.Diagnostics.The_expected_type_comes_from_this_index_signature));
@@ -48410,7 +51740,6 @@ var ts;
                                 }
                             }
                         }
-                        reportedError = true;
                     }
                 }
             }
@@ -48428,9 +51757,9 @@ var ts;
                     case 1:
                         if (!(_i < _a.length)) return [3, 4];
                         prop = _a[_i];
-                        if (ts.isJsxSpreadAttribute(prop))
+                        if (ts.isJsxSpreadAttribute(prop) || isHyphenatedJsxName(ts.idText(prop.name)))
                             return [3, 3];
-                        return [4, { errorNode: prop.name, innerExpression: prop.initializer, nameType: getLiteralType(ts.idText(prop.name)) }];
+                        return [4, { errorNode: prop.name, innerExpression: prop.initializer, nameType: getStringLiteralType(ts.idText(prop.name)) }];
                     case 2:
                         _b.sent();
                         _b.label = 3;
@@ -48454,7 +51783,7 @@ var ts;
                     case 1:
                         if (!(i < node.children.length)) return [3, 5];
                         child = node.children[i];
-                        nameType = getLiteralType(i - memberOffset);
+                        nameType = getNumberLiteralType(i - memberOffset);
                         elem = getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic);
                         if (!elem) return [3, 3];
                         return [4, elem];
@@ -48473,16 +51802,16 @@ var ts;
         }
         function getElaborationElementForJsxChild(child, nameType, getInvalidTextDiagnostic) {
             switch (child.kind) {
-                case 283:
+                case 287:
                     return { errorNode: child, innerExpression: child.expression, nameType: nameType };
                 case 11:
                     if (child.containsOnlyTriviaWhiteSpaces) {
                         break;
                     }
                     return { errorNode: child, innerExpression: undefined, nameType: nameType, errorMessage: getInvalidTextDiagnostic() };
-                case 273:
-                case 274:
                 case 277:
+                case 278:
+                case 281:
                     return { errorNode: child, innerExpression: child, nameType: nameType };
                 default:
                     return ts.Debug.assertNever(child, "Found invalid jsx child");
@@ -48495,7 +51824,7 @@ var ts;
                 var containingElement = node.parent.parent;
                 var childPropName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
                 var childrenPropName = childPropName === undefined ? "children" : ts.unescapeLeadingUnderscores(childPropName);
-                var childrenNameType = getLiteralType(childrenPropName);
+                var childrenNameType = getStringLiteralType(childrenPropName);
                 var childrenTargetType = getIndexedAccessType(target, childrenNameType);
                 var validChildren = ts.getSemanticJsxChildren(containingElement.children);
                 if (!ts.length(validChildren)) {
@@ -48548,7 +51877,7 @@ var ts;
                     var tagNameText = ts.getTextOfNode(node.parent.tagName);
                     var childPropName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
                     var childrenPropName = childPropName === undefined ? "children" : ts.unescapeLeadingUnderscores(childPropName);
-                    var childrenTargetType = getIndexedAccessType(target, getLiteralType(childrenPropName));
+                    var childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
                     var diagnostic = ts.Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
                     invalidTextDiagnostic = __assign(__assign({}, diagnostic), { key: "!!ALREADY FORMATTED!!", message: ts.formatMessage(undefined, diagnostic, tagNameText, childrenPropName, typeToString(childrenTargetType)) });
                 }
@@ -48572,7 +51901,7 @@ var ts;
                         elem = node.elements[i];
                         if (ts.isOmittedExpression(elem))
                             return [3, 3];
-                        nameType = getLiteralType(i);
+                        nameType = getNumberLiteralType(i);
                         return [4, { errorNode: elem, innerExpression: elem, nameType: nameType }];
                     case 2:
                         _a.sent();
@@ -48624,11 +51953,11 @@ var ts;
                         }
                         _b = prop.kind;
                         switch (_b) {
+                            case 172: return [3, 2];
+                            case 171: return [3, 2];
                             case 168: return [3, 2];
-                            case 167: return [3, 2];
-                            case 165: return [3, 2];
-                            case 289: return [3, 2];
-                            case 288: return [3, 4];
+                            case 295: return [3, 2];
+                            case 294: return [3, 4];
                         }
                         return [3, 6];
                     case 2: return [4, { errorNode: prop.name, innerExpression: undefined, nameType: type }];
@@ -48692,8 +52021,8 @@ var ts;
                 return 0;
             }
             var kind = target.declaration ? target.declaration.kind : 0;
-            var strictVariance = !(checkMode & 3) && strictFunctionTypes && kind !== 165 &&
-                kind !== 164 && kind !== 166;
+            var strictVariance = !(checkMode & 3) && strictFunctionTypes && kind !== 168 &&
+                kind !== 167 && kind !== 170;
             var result = -1;
             var sourceThisType = getThisTypeOfSignature(source);
             if (sourceThisType && sourceThisType !== voidType) {
@@ -48810,8 +52139,7 @@ var ts;
                 t.properties.length === 0 &&
                 t.callSignatures.length === 0 &&
                 t.constructSignatures.length === 0 &&
-                !t.stringIndexInfo &&
-                !t.numberIndexInfo;
+                t.indexInfos.length === 0;
         }
         function isEmptyObjectType(type) {
             return type.flags & 524288 ? !isGenericMappedType(type) && isEmptyResolvedType(resolveStructuredTypeMembers(type)) :
@@ -48825,7 +52153,7 @@ var ts;
                 type.symbol && type.symbol.flags & 2048 && getMembersOfSymbol(type.symbol).size === 0));
         }
         function isStringIndexSignatureOnlyType(type) {
-            return type.flags & 524288 && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfoOfType(type, 0) && !getIndexInfoOfType(type, 1) ||
+            return type.flags & 524288 && !isGenericMappedType(type) && getPropertiesOfType(type).length === 0 && getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, stringType) ||
                 type.flags & 3145728 && ts.every(type.types, isStringIndexSignatureOnlyType) ||
                 false;
         }
@@ -48906,7 +52234,7 @@ var ts;
             if (relation === assignableRelation || relation === comparableRelation) {
                 if (s & 1)
                     return true;
-                if (s & (8 | 256) && !(s & 1024) && (t & 32 || t & 256 && t & 1024))
+                if (s & (8 | 256) && !(s & 1024) && (t & 32 || relation === assignableRelation && t & 256 && t & 1024))
                     return true;
             }
             return false;
@@ -48927,9 +52255,10 @@ var ts;
                 }
             }
             else {
-                if (!(source.flags & 3145728) && !(target.flags & 3145728) &&
-                    source.flags !== target.flags && !(source.flags & 469237760))
+                if (source.flags !== target.flags)
                     return false;
+                if (source.flags & 67358815)
+                    return true;
             }
             if (source.flags & 524288 && target.flags & 524288) {
                 var related = relation.get(getRelationKey(source, target, 0, relation));
@@ -48943,7 +52272,7 @@ var ts;
             return false;
         }
         function isIgnoredJsxProperty(source, sourceProp) {
-            return ts.getObjectFlags(source) & 4096 && !isUnhyphenatedJsxName(sourceProp.escapedName);
+            return ts.getObjectFlags(source) & 2048 && isHyphenatedJsxName(sourceProp.escapedName);
         }
         function getNormalizedType(type, writing) {
             while (true) {
@@ -48953,6 +52282,7 @@ var ts;
                             type.flags & 33554432 ? writing ? type.baseType : type.substitute :
                                 type.flags & 25165824 ? getSimplifiedType(type, writing) :
                                     type;
+                t = getSingleBaseForNonAugmentingSubtype(t) || t;
                 if (t === type)
                     break;
                 type = t;
@@ -48966,7 +52296,8 @@ var ts;
             var sourceStack;
             var targetStack;
             var maybeCount = 0;
-            var depth = 0;
+            var sourceDepth = 0;
+            var targetDepth = 0;
             var expandingFlags = 0;
             var overflow = false;
             var overrideNextErrorInfo = 0;
@@ -48974,12 +52305,12 @@ var ts;
             var incompatibleStack = [];
             var inPropertyCheck = false;
             ts.Debug.assert(relation !== identityRelation || !errorNode, "no error reporting in identity checking");
-            var result = isRelatedTo(source, target, !!errorNode, headMessage);
+            var result = isRelatedTo(source, target, 3, !!errorNode, headMessage);
             if (incompatibleStack.length) {
                 reportIncompatibleStack();
             }
             if (overflow) {
-                ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("checkTypes", "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: depth });
+                ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("checkTypes", "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth: sourceDepth, targetDepth: targetDepth });
                 var diag = error(errorNode || currentNode, ts.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target));
                 if (errorOutputContainer) {
                     (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag);
@@ -49006,7 +52337,7 @@ var ts;
                 }
                 var diag = ts.createDiagnosticForNodeFromMessageChain(errorNode, errorInfo, relatedInformation);
                 if (relatedInfo) {
-                    ts.addRelatedInfo.apply(void 0, __spreadArray([diag], relatedInfo));
+                    ts.addRelatedInfo.apply(void 0, __spreadArray([diag], relatedInfo, false));
                 }
                 if (errorOutputContainer) {
                     (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag);
@@ -49048,7 +52379,7 @@ var ts;
                 if (stack.length === 1) {
                     reportError.apply(void 0, stack[0]);
                     if (info) {
-                        reportRelationError.apply(void 0, __spreadArray([undefined], info));
+                        reportRelationError.apply(void 0, __spreadArray([undefined], info, false));
                     }
                     return;
                 }
@@ -49059,20 +52390,20 @@ var ts;
                     switch (msg.code) {
                         case ts.Diagnostics.Types_of_property_0_are_incompatible.code: {
                             if (path.indexOf("new ") === 0) {
-                                path = "(" + path + ")";
+                                path = "(".concat(path, ")");
                             }
                             var str = "" + args[0];
                             if (path.length === 0) {
-                                path = "" + str;
+                                path = "".concat(str);
                             }
-                            else if (ts.isIdentifierText(str, compilerOptions.target)) {
-                                path = path + "." + str;
+                            else if (ts.isIdentifierText(str, ts.getEmitScriptTarget(compilerOptions))) {
+                                path = "".concat(path, ".").concat(str);
                             }
                             else if (str[0] === "[" && str[str.length - 1] === "]") {
-                                path = "" + path + str;
+                                path = "".concat(path).concat(str);
                             }
                             else {
-                                path = path + "[" + str + "]";
+                                path = "".concat(path, "[").concat(str, "]");
                             }
                             break;
                         }
@@ -49099,12 +52430,20 @@ var ts;
                                     msg.code === ts.Diagnostics.Construct_signatures_with_no_arguments_have_incompatible_return_types_0_and_1.code)
                                     ? ""
                                     : "...";
-                                path = "" + prefix + path + "(" + params + ")";
+                                path = "".concat(prefix).concat(path, "(").concat(params, ")");
                             }
                             break;
                         }
+                        case ts.Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target.code: {
+                            secondaryRootErrors.unshift([ts.Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, args[0], args[1]]);
+                            break;
+                        }
+                        case ts.Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target.code: {
+                            secondaryRootErrors.unshift([ts.Diagnostics.Type_at_positions_0_through_1_in_source_is_not_compatible_with_type_at_position_2_in_target, args[0], args[1], args[2]]);
+                            break;
+                        }
                         default:
-                            return ts.Debug.fail("Unhandled Diagnostic: " + msg.code);
+                            return ts.Debug.fail("Unhandled Diagnostic: ".concat(msg.code));
                     }
                 }
                 if (path) {
@@ -49119,11 +52458,11 @@ var ts;
                     var _b = secondaryRootErrors_1[_i], msg = _b[0], args = _b.slice(1);
                     var originalValue = msg.elidedInCompatabilityPyramid;
                     msg.elidedInCompatabilityPyramid = false;
-                    reportError.apply(void 0, __spreadArray([msg], args));
+                    reportError.apply(void 0, __spreadArray([msg], args, false));
                     msg.elidedInCompatabilityPyramid = originalValue;
                 }
                 if (info) {
-                    reportRelationError.apply(void 0, __spreadArray([undefined], info));
+                    reportRelationError.apply(void 0, __spreadArray([undefined], info, false));
                 }
             }
             function reportError(message, arg0, arg1, arg2, arg3) {
@@ -49161,6 +52500,7 @@ var ts;
                         reportError(ts.Diagnostics._0_is_assignable_to_the_constraint_of_type_1_but_1_could_be_instantiated_with_a_different_subtype_of_constraint_2, needsOriginalSource ? sourceType : generalizedSourceType, targetType, typeToString(constraint));
                     }
                     else {
+                        errorInfo = undefined;
                         reportError(ts.Diagnostics._0_could_be_instantiated_with_an_arbitrary_type_which_could_be_unrelated_to_1, targetType, generalizedSourceType);
                     }
                 }
@@ -49171,10 +52511,25 @@ var ts;
                     else if (sourceType === targetType) {
                         message = ts.Diagnostics.Type_0_is_not_assignable_to_type_1_Two_different_types_with_this_name_exist_but_they_are_unrelated;
                     }
+                    else if (exactOptionalPropertyTypes && getExactOptionalUnassignableProperties(source, target).length) {
+                        message = ts.Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;
+                    }
                     else {
+                        if (source.flags & 128 && target.flags & 1048576) {
+                            var suggestedType = getSuggestedTypeForNonexistentStringLiteralType(source, target);
+                            if (suggestedType) {
+                                reportError(ts.Diagnostics.Type_0_is_not_assignable_to_type_1_Did_you_mean_2, generalizedSourceType, targetType, typeToString(suggestedType));
+                                return;
+                            }
+                        }
                         message = ts.Diagnostics.Type_0_is_not_assignable_to_type_1;
                     }
                 }
+                else if (message === ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1
+                    && exactOptionalPropertyTypes
+                    && getExactOptionalUnassignableProperties(source, target).length) {
+                    message = ts.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_types_of_the_target_s_properties;
+                }
                 reportError(message, generalizedSourceType, targetType);
             }
             function tryElaborateErrorsForPrimitivesAndObjects(source, target) {
@@ -49208,14 +52563,18 @@ var ts;
                 }
                 return true;
             }
-            function isRelatedTo(originalSource, originalTarget, reportErrors, headMessage, intersectionState) {
+            function isRelatedToWorker(source, target, reportErrors) {
+                return isRelatedTo(source, target, 3, reportErrors);
+            }
+            function isRelatedTo(originalSource, originalTarget, recursionFlags, reportErrors, headMessage, intersectionState) {
+                if (recursionFlags === void 0) { recursionFlags = 3; }
                 if (reportErrors === void 0) { reportErrors = false; }
                 if (intersectionState === void 0) { intersectionState = 0; }
                 if (originalSource.flags & 524288 && originalTarget.flags & 131068) {
                     if (isSimpleTypeRelatedTo(originalSource, originalTarget, relation, reportErrors ? reportError : undefined)) {
                         return -1;
                     }
-                    reportErrorResults(originalSource, originalTarget, 0, !!(ts.getObjectFlags(originalSource) & 4096));
+                    reportErrorResults(originalSource, originalTarget, 0, !!(ts.getObjectFlags(originalSource) & 2048));
                     return 0;
                 }
                 var source = getNormalizedType(originalSource, false);
@@ -49223,7 +52582,7 @@ var ts;
                 if (source === target)
                     return -1;
                 if (relation === identityRelation) {
-                    return isIdenticalTo(source, target);
+                    return isIdenticalTo(source, target, recursionFlags);
                 }
                 if (source.flags & 262144 && getConstraintOfType(source) === target) {
                     return -1;
@@ -49232,16 +52591,16 @@ var ts;
                     target.types.length <= 3 && maybeTypeOfKind(target, 98304)) {
                     var nullStrippedTarget = extractTypesOfKind(target, ~98304);
                     if (!(nullStrippedTarget.flags & (1048576 | 131072))) {
-                        if (source === nullStrippedTarget)
-                            return -1;
-                        target = nullStrippedTarget;
+                        target = getNormalizedType(nullStrippedTarget, true);
                     }
+                    if (source === nullStrippedTarget)
+                        return -1;
                 }
                 if (relation === comparableRelation && !(target.flags & 131072) && isSimpleTypeRelatedTo(target, source, relation) ||
                     isSimpleTypeRelatedTo(source, target, relation, reportErrors ? reportError : undefined))
                     return -1;
-                var isComparingJsxAttributes = !!(ts.getObjectFlags(source) & 4096);
-                var isPerformingExcessPropertyChecks = !(intersectionState & 2) && (isObjectLiteralType(source) && ts.getObjectFlags(source) & 32768);
+                var isComparingJsxAttributes = !!(ts.getObjectFlags(source) & 2048);
+                var isPerformingExcessPropertyChecks = !(intersectionState & 2) && (isObjectLiteralType(source) && ts.getObjectFlags(source) & 16384);
                 if (isPerformingExcessPropertyChecks) {
                     if (hasExcessProperties(source, target, reportErrors)) {
                         if (reportErrors) {
@@ -49260,8 +52619,8 @@ var ts;
                         var targetString = typeToString(originalTarget.aliasSymbol ? originalTarget : target);
                         var calls = getSignaturesOfType(source, 0);
                         var constructs = getSignaturesOfType(source, 1);
-                        if (calls.length > 0 && isRelatedTo(getReturnTypeOfSignature(calls[0]), target, false) ||
-                            constructs.length > 0 && isRelatedTo(getReturnTypeOfSignature(constructs[0]), target, false)) {
+                        if (calls.length > 0 && isRelatedTo(getReturnTypeOfSignature(calls[0]), target, 1, false) ||
+                            constructs.length > 0 && isRelatedTo(getReturnTypeOfSignature(constructs[0]), target, 1, false)) {
                             reportError(ts.Diagnostics.Value_of_type_0_has_no_properties_in_common_with_type_1_Did_you_mean_to_call_it, sourceString, targetString);
                         }
                         else {
@@ -49273,13 +52632,14 @@ var ts;
                 traceUnionsOrIntersectionsTooLarge(source, target);
                 var result = 0;
                 var saveErrorInfo = captureErrorCalculationState();
-                if (source.flags & 3145728 || target.flags & 3145728) {
-                    result = getConstituentCount(source) * getConstituentCount(target) >= 4 ?
-                        recursiveTypeRelatedTo(source, target, reportErrors, intersectionState | 8) :
-                        structuredTypeRelatedTo(source, target, reportErrors, intersectionState | 8);
+                if ((source.flags & 1048576 || target.flags & 1048576) && getConstituentCount(source) * getConstituentCount(target) < 4) {
+                    result = structuredTypeRelatedTo(source, target, reportErrors, intersectionState | 8);
+                }
+                else if (source.flags & 3145728 || target.flags & 3145728) {
+                    result = recursiveTypeRelatedTo(source, target, reportErrors, intersectionState | 8, recursionFlags);
                 }
                 if (!result && !(source.flags & 1048576) && (source.flags & (469499904) || target.flags & 469499904)) {
-                    if (result = recursiveTypeRelatedTo(source, target, reportErrors, intersectionState)) {
+                    if (result = recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags)) {
                         resetErrorInfo(saveErrorInfo);
                     }
                 }
@@ -49287,24 +52647,26 @@ var ts;
                     var constraint = getEffectiveConstraintOfIntersection(source.flags & 2097152 ? source.types : [source], !!(target.flags & 1048576));
                     if (constraint && (source.flags & 2097152 || target.flags & 1048576)) {
                         if (everyType(constraint, function (c) { return c !== source; })) {
-                            if (result = isRelatedTo(constraint, target, false, undefined, intersectionState)) {
+                            if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
                                 resetErrorInfo(saveErrorInfo);
                             }
                         }
                     }
                 }
                 if (result && !inPropertyCheck && (target.flags & 2097152 && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks) ||
-                    isNonGenericObjectType(target) && !isArrayType(target) && !isTupleType(target) && source.flags & 2097152 && getApparentType(source).flags & 3670016 && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 2097152); }))) {
+                    isNonGenericObjectType(target) && !isArrayType(target) && !isTupleType(target) && source.flags & 2097152 && getApparentType(source).flags & 3670016 && !ts.some(source.types, function (t) { return !!(ts.getObjectFlags(t) & 524288); }))) {
                     inPropertyCheck = true;
-                    result &= recursiveTypeRelatedTo(source, target, reportErrors, 4);
+                    result &= recursiveTypeRelatedTo(source, target, reportErrors, 4, recursionFlags);
                     inPropertyCheck = false;
                 }
                 reportErrorResults(source, target, result, isComparingJsxAttributes);
                 return result;
                 function reportErrorResults(source, target, result, isComparingJsxAttributes) {
                     if (!result && reportErrors) {
-                        source = originalSource.aliasSymbol ? originalSource : source;
-                        target = originalTarget.aliasSymbol ? originalTarget : target;
+                        var sourceHasBase = !!getSingleBaseForNonAugmentingSubtype(originalSource);
+                        var targetHasBase = !!getSingleBaseForNonAugmentingSubtype(originalTarget);
+                        source = (originalSource.aliasSymbol || sourceHasBase) ? originalSource : source;
+                        target = (originalTarget.aliasSymbol || targetHasBase) ? originalTarget : target;
                         var maybeSuppress = overrideNextErrorInfo > 0;
                         if (maybeSuppress) {
                             overrideNextErrorInfo--;
@@ -49326,7 +52688,7 @@ var ts;
                             var targetTypes = target.types;
                             var intrinsicAttributes = getJsxType(JsxNames.IntrinsicAttributes, errorNode);
                             var intrinsicClassAttributes = getJsxType(JsxNames.IntrinsicClassAttributes, errorNode);
-                            if (intrinsicAttributes !== errorType && intrinsicClassAttributes !== errorType &&
+                            if (!isErrorType(intrinsicAttributes) && !isErrorType(intrinsicClassAttributes) &&
                                 (ts.contains(targetTypes, intrinsicAttributes) || ts.contains(targetTypes, intrinsicClassAttributes))) {
                                 return result;
                             }
@@ -49349,7 +52711,7 @@ var ts;
                 if ((source.flags & 3145728) && (target.flags & 3145728)) {
                     var sourceUnionOrIntersection = source;
                     var targetUnionOrIntersection = target;
-                    if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 262144) {
+                    if (sourceUnionOrIntersection.objectFlags & targetUnionOrIntersection.objectFlags & 65536) {
                         return;
                     }
                     var sourceSize = sourceUnionOrIntersection.types.length;
@@ -49366,35 +52728,37 @@ var ts;
                     }
                 }
             }
-            function isIdenticalTo(source, target) {
-                var flags = source.flags & target.flags;
-                if (!(flags & 469237760)) {
+            function isIdenticalTo(source, target, recursionFlags) {
+                if (source.flags !== target.flags)
                     return 0;
-                }
+                if (source.flags & 67358815)
+                    return -1;
                 traceUnionsOrIntersectionsTooLarge(source, target);
-                if (flags & 3145728) {
-                    var result_6 = eachTypeRelatedToSomeType(source, target);
-                    if (result_6) {
-                        result_6 &= eachTypeRelatedToSomeType(target, source);
+                if (source.flags & 3145728) {
+                    var result_7 = eachTypeRelatedToSomeType(source, target);
+                    if (result_7) {
+                        result_7 &= eachTypeRelatedToSomeType(target, source);
                     }
-                    return result_6;
+                    return result_7;
                 }
-                return recursiveTypeRelatedTo(source, target, false, 0);
+                return recursiveTypeRelatedTo(source, target, false, 0, recursionFlags);
             }
             function getTypeOfPropertyInTypes(types, name) {
                 var appendPropType = function (propTypes, type) {
+                    var _a;
                     type = getApparentType(type);
                     var prop = type.flags & 3145728 ? getPropertyOfUnionOrIntersectionType(type, name) : getPropertyOfObjectType(type, name);
-                    var propType = prop && getTypeOfSymbol(prop) || isNumericLiteralName(name) && getIndexTypeOfType(type, 1) || getIndexTypeOfType(type, 0) || undefinedType;
+                    var propType = prop && getTypeOfSymbol(prop) || ((_a = getApplicableIndexInfoForName(type, name)) === null || _a === void 0 ? void 0 : _a.type) || undefinedType;
                     return ts.append(propTypes, propType);
                 };
                 return getUnionType(ts.reduceLeft(types, appendPropType, undefined) || ts.emptyArray);
             }
             function hasExcessProperties(source, target, reportErrors) {
-                if (!isExcessPropertyCheckTarget(target) || !noImplicitAny && ts.getObjectFlags(target) & 16384) {
+                var _a;
+                if (!isExcessPropertyCheckTarget(target) || !noImplicitAny && ts.getObjectFlags(target) & 8192) {
                     return false;
                 }
-                var isComparingJsxAttributes = !!(ts.getObjectFlags(source) & 4096);
+                var isComparingJsxAttributes = !!(ts.getObjectFlags(source) & 2048);
                 if ((relation === assignableRelation || relation === comparableRelation) &&
                     (isTypeSubsetOf(globalObjectType, target) || (!isComparingJsxAttributes && isEmptyObjectType(target)))) {
                     return false;
@@ -49405,7 +52769,7 @@ var ts;
                     reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
                     checkTypes = reducedTarget.flags & 1048576 ? reducedTarget.types : [reducedTarget];
                 }
-                var _loop_16 = function (prop) {
+                var _loop_18 = function (prop) {
                     if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
                         if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
                             if (reportErrors) {
@@ -49427,7 +52791,7 @@ var ts;
                                     }
                                 }
                                 else {
-                                    var objectLiteralDeclaration_1 = source.symbol && ts.firstOrUndefined(source.symbol.declarations);
+                                    var objectLiteralDeclaration_1 = ((_a = source.symbol) === null || _a === void 0 ? void 0 : _a.declarations) && ts.firstOrUndefined(source.symbol.declarations);
                                     var suggestion = void 0;
                                     if (prop.valueDeclaration && ts.findAncestor(prop.valueDeclaration, function (d) { return d === objectLiteralDeclaration_1; }) && ts.getSourceFileOfNode(objectLiteralDeclaration_1) === ts.getSourceFileOfNode(errorNode)) {
                                         var propDeclaration = prop.valueDeclaration;
@@ -49448,7 +52812,7 @@ var ts;
                             }
                             return { value: true };
                         }
-                        if (checkTypes && !isRelatedTo(getTypeOfSymbol(prop), getTypeOfPropertyInTypes(checkTypes, prop.escapedName), reportErrors)) {
+                        if (checkTypes && !isRelatedTo(getTypeOfSymbol(prop), getTypeOfPropertyInTypes(checkTypes, prop.escapedName), 3, reportErrors)) {
                             if (reportErrors) {
                                 reportIncompatibleError(ts.Diagnostics.Types_of_property_0_are_incompatible, symbolToString(prop));
                             }
@@ -49456,9 +52820,9 @@ var ts;
                         }
                     }
                 };
-                for (var _i = 0, _a = getPropertiesOfType(source); _i < _a.length; _i++) {
-                    var prop = _a[_i];
-                    var state_5 = _loop_16(prop);
+                for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
+                    var prop = _b[_i];
+                    var state_5 = _loop_18(prop);
                     if (typeof state_5 === "object")
                         return state_5.value;
                 }
@@ -49482,19 +52846,28 @@ var ts;
             }
             function typeRelatedToSomeType(source, target, reportErrors) {
                 var targetTypes = target.types;
-                if (target.flags & 1048576 && containsType(targetTypes, source)) {
-                    return -1;
+                if (target.flags & 1048576) {
+                    if (containsType(targetTypes, source)) {
+                        return -1;
+                    }
+                    var match = getMatchingUnionConstituentForType(target, source);
+                    if (match) {
+                        var related = isRelatedTo(source, match, 2, false);
+                        if (related) {
+                            return related;
+                        }
+                    }
                 }
                 for (var _i = 0, targetTypes_1 = targetTypes; _i < targetTypes_1.length; _i++) {
                     var type = targetTypes_1[_i];
-                    var related = isRelatedTo(source, type, false);
+                    var related = isRelatedTo(source, type, 2, false);
                     if (related) {
                         return related;
                     }
                 }
                 if (reportErrors) {
                     var bestMatchingType = getBestMatchingType(source, target, isRelatedTo);
-                    isRelatedTo(source, bestMatchingType || targetTypes[targetTypes.length - 1], true);
+                    isRelatedTo(source, bestMatchingType || targetTypes[targetTypes.length - 1], 2, true);
                 }
                 return 0;
             }
@@ -49503,7 +52876,7 @@ var ts;
                 var targetTypes = target.types;
                 for (var _i = 0, targetTypes_2 = targetTypes; _i < targetTypes_2.length; _i++) {
                     var targetType = targetTypes_2[_i];
-                    var related = isRelatedTo(source, targetType, reportErrors, undefined, intersectionState);
+                    var related = isRelatedTo(source, targetType, 2, reportErrors, undefined, intersectionState);
                     if (!related) {
                         return 0;
                     }
@@ -49518,7 +52891,7 @@ var ts;
                 }
                 var len = sourceTypes.length;
                 for (var i = 0; i < len; i++) {
-                    var related = isRelatedTo(sourceTypes[i], target, reportErrors && i === len - 1, undefined, intersectionState);
+                    var related = isRelatedTo(sourceTypes[i], target, 1, reportErrors && i === len - 1, undefined, intersectionState);
                     if (related) {
                         return related;
                     }
@@ -49539,13 +52912,13 @@ var ts;
                 for (var i = 0; i < sourceTypes.length; i++) {
                     var sourceType = sourceTypes[i];
                     if (undefinedStrippedTarget.flags & 1048576 && sourceTypes.length >= undefinedStrippedTarget.types.length && sourceTypes.length % undefinedStrippedTarget.types.length === 0) {
-                        var related_1 = isRelatedTo(sourceType, undefinedStrippedTarget.types[i % undefinedStrippedTarget.types.length], false, undefined, intersectionState);
+                        var related_1 = isRelatedTo(sourceType, undefinedStrippedTarget.types[i % undefinedStrippedTarget.types.length], 3, false, undefined, intersectionState);
                         if (related_1) {
                             result &= related_1;
                             continue;
                         }
                     }
-                    var related = isRelatedTo(sourceType, target, reportErrors, undefined, intersectionState);
+                    var related = isRelatedTo(sourceType, target, 1, reportErrors, undefined, intersectionState);
                     if (!related) {
                         return 0;
                     }
@@ -49570,24 +52943,24 @@ var ts;
                         var t = targets[i];
                         var related = -1;
                         if (varianceFlags & 8) {
-                            related = relation === identityRelation ? isRelatedTo(s, t, false) : compareTypesIdentical(s, t);
+                            related = relation === identityRelation ? isRelatedTo(s, t, 3, false) : compareTypesIdentical(s, t);
                         }
                         else if (variance === 1) {
-                            related = isRelatedTo(s, t, reportErrors, undefined, intersectionState);
+                            related = isRelatedTo(s, t, 3, reportErrors, undefined, intersectionState);
                         }
                         else if (variance === 2) {
-                            related = isRelatedTo(t, s, reportErrors, undefined, intersectionState);
+                            related = isRelatedTo(t, s, 3, reportErrors, undefined, intersectionState);
                         }
                         else if (variance === 3) {
-                            related = isRelatedTo(t, s, false);
+                            related = isRelatedTo(t, s, 3, false);
                             if (!related) {
-                                related = isRelatedTo(s, t, reportErrors, undefined, intersectionState);
+                                related = isRelatedTo(s, t, 3, reportErrors, undefined, intersectionState);
                             }
                         }
                         else {
-                            related = isRelatedTo(s, t, reportErrors, undefined, intersectionState);
+                            related = isRelatedTo(s, t, 3, reportErrors, undefined, intersectionState);
                             if (related) {
-                                related &= isRelatedTo(t, s, reportErrors, undefined, intersectionState);
+                                related &= isRelatedTo(t, s, 3, reportErrors, undefined, intersectionState);
                             }
                         }
                         if (!related) {
@@ -49598,7 +52971,7 @@ var ts;
                 }
                 return result;
             }
-            function recursiveTypeRelatedTo(source, target, reportErrors, intersectionState) {
+            function recursiveTypeRelatedTo(source, target, reportErrors, intersectionState, recursionFlags) {
                 if (overflow) {
                     return 0;
                 }
@@ -49626,12 +52999,16 @@ var ts;
                     targetStack = [];
                 }
                 else {
+                    var broadestEquivalentId = id.split(",").map(function (i) { return i.replace(/-\d+/g, function (_match, offset) {
+                        var index = ts.length(id.slice(0, offset).match(/[-=]/g) || undefined);
+                        return "=".concat(index);
+                    }); }).join(",");
                     for (var i = 0; i < maybeCount; i++) {
-                        if (id === maybeKeys[i]) {
+                        if (id === maybeKeys[i] || broadestEquivalentId === maybeKeys[i]) {
                             return 3;
                         }
                     }
-                    if (depth === 100) {
+                    if (sourceDepth === 100 || targetDepth === 100) {
                         overflow = true;
                         return 0;
                     }
@@ -49639,14 +53016,19 @@ var ts;
                 var maybeStart = maybeCount;
                 maybeKeys[maybeCount] = id;
                 maybeCount++;
-                sourceStack[depth] = source;
-                targetStack[depth] = target;
-                depth++;
                 var saveExpandingFlags = expandingFlags;
-                if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, depth))
-                    expandingFlags |= 1;
-                if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, depth))
-                    expandingFlags |= 2;
+                if (recursionFlags & 1) {
+                    sourceStack[sourceDepth] = source;
+                    sourceDepth++;
+                    if (!(expandingFlags & 1) && isDeeplyNestedType(source, sourceStack, sourceDepth))
+                        expandingFlags |= 1;
+                }
+                if (recursionFlags & 2) {
+                    targetStack[targetDepth] = target;
+                    targetDepth++;
+                    if (!(expandingFlags & 2) && isDeeplyNestedType(target, targetStack, targetDepth))
+                        expandingFlags |= 2;
+                }
                 var originalHandler;
                 var propagatingVarianceFlags = 0;
                 if (outofbandVarianceMarkerHandler) {
@@ -49662,17 +53044,23 @@ var ts;
                         sourceIdStack: sourceStack.map(function (t) { return t.id; }),
                         targetId: target.id,
                         targetIdStack: targetStack.map(function (t) { return t.id; }),
-                        depth: depth,
+                        depth: sourceDepth,
+                        targetDepth: targetDepth
                     });
                 }
                 var result = expandingFlags !== 3 ? structuredTypeRelatedTo(source, target, reportErrors, intersectionState) : 3;
                 if (outofbandVarianceMarkerHandler) {
                     outofbandVarianceMarkerHandler = originalHandler;
                 }
+                if (recursionFlags & 1) {
+                    sourceDepth--;
+                }
+                if (recursionFlags & 2) {
+                    targetDepth--;
+                }
                 expandingFlags = saveExpandingFlags;
-                depth--;
                 if (result) {
-                    if (result === -1 || depth === 0) {
+                    if (result === -1 || (sourceDepth === 0 && targetDepth === 0)) {
                         if (result === -1 || result === 3) {
                             for (var i = maybeStart; i < maybeCount; i++) {
                                 relation.set(maybeKeys[i], 1 | propagatingVarianceFlags);
@@ -49709,28 +53097,37 @@ var ts;
                     if (target.flags & 2097152) {
                         return typeRelatedToEachType(getRegularTypeOfObjectLiteral(source), target, reportErrors, 2);
                     }
+                    if (relation === comparableRelation && target.flags & 131068) {
+                        var constraints = ts.sameMap(source.types, getBaseConstraintOrType);
+                        if (constraints !== source.types) {
+                            source = getIntersectionType(constraints);
+                            if (!(source.flags & 2097152)) {
+                                return isRelatedTo(source, target, 1, false);
+                            }
+                        }
+                    }
                     return someTypeRelatedToType(source, target, false, 1);
                 }
                 var flags = source.flags & target.flags;
                 if (relation === identityRelation && !(flags & 524288)) {
                     if (flags & 4194304) {
-                        return isRelatedTo(source.type, target.type, false);
+                        return isRelatedTo(source.type, target.type, 3, false);
                     }
-                    var result_7 = 0;
+                    var result_8 = 0;
                     if (flags & 8388608) {
-                        if (result_7 = isRelatedTo(source.objectType, target.objectType, false)) {
-                            if (result_7 &= isRelatedTo(source.indexType, target.indexType, false)) {
-                                return result_7;
+                        if (result_8 = isRelatedTo(source.objectType, target.objectType, 3, false)) {
+                            if (result_8 &= isRelatedTo(source.indexType, target.indexType, 3, false)) {
+                                return result_8;
                             }
                         }
                     }
                     if (flags & 16777216) {
                         if (source.root.isDistributive === target.root.isDistributive) {
-                            if (result_7 = isRelatedTo(source.checkType, target.checkType, false)) {
-                                if (result_7 &= isRelatedTo(source.extendsType, target.extendsType, false)) {
-                                    if (result_7 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), false)) {
-                                        if (result_7 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), false)) {
-                                            return result_7;
+                            if (result_8 = isRelatedTo(source.checkType, target.checkType, 3, false)) {
+                                if (result_8 &= isRelatedTo(source.extendsType, target.extendsType, 3, false)) {
+                                    if (result_8 &= isRelatedTo(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target), 3, false)) {
+                                        if (result_8 &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), 3, false)) {
+                                            return result_8;
                                         }
                                     }
                                 }
@@ -49738,7 +53135,7 @@ var ts;
                         }
                     }
                     if (flags & 33554432) {
-                        return isRelatedTo(source.substitute, target.substitute, false);
+                        return isRelatedTo(source.substitute, target.substitute, 3, false);
                     }
                     return 0;
                 }
@@ -49758,85 +53155,130 @@ var ts;
                         return varianceResult;
                     }
                 }
-                if (isSingleElementGenericTupleType(source) && !source.target.readonly && (result = isRelatedTo(getTypeArguments(source)[0], target)) ||
-                    isSingleElementGenericTupleType(target) && (target.target.readonly || isMutableArrayOrTuple(getBaseConstraintOfType(source) || source)) && (result = isRelatedTo(source, getTypeArguments(target)[0]))) {
+                if (isSingleElementGenericTupleType(source) && !source.target.readonly && (result = isRelatedTo(getTypeArguments(source)[0], target, 1)) ||
+                    isSingleElementGenericTupleType(target) && (target.target.readonly || isMutableArrayOrTuple(getBaseConstraintOfType(source) || source)) && (result = isRelatedTo(source, getTypeArguments(target)[0], 2))) {
                     return result;
                 }
                 if (target.flags & 262144) {
-                    if (ts.getObjectFlags(source) & 32 && !source.declaration.nameType && isRelatedTo(getIndexType(target), getConstraintTypeFromMappedType(source))) {
+                    if (ts.getObjectFlags(source) & 32 && !source.declaration.nameType && isRelatedTo(getIndexType(target), getConstraintTypeFromMappedType(source), 3)) {
                         if (!(getMappedTypeModifiers(source) & 4)) {
                             var templateType = getTemplateTypeFromMappedType(source);
                             var indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source));
-                            if (result = isRelatedTo(templateType, indexedAccessType, reportErrors)) {
+                            if (result = isRelatedTo(templateType, indexedAccessType, 3, reportErrors)) {
                                 return result;
                             }
                         }
                     }
                 }
                 else if (target.flags & 4194304) {
-                    var targetType = target.type;
+                    var targetType_1 = target.type;
                     if (source.flags & 4194304) {
-                        if (result = isRelatedTo(targetType, source.type, false)) {
+                        if (result = isRelatedTo(targetType_1, source.type, 3, false)) {
                             return result;
                         }
                     }
-                    if (isTupleType(targetType)) {
-                        if (result = isRelatedTo(source, getKnownKeysOfTupleType(targetType), reportErrors)) {
+                    if (isTupleType(targetType_1)) {
+                        if (result = isRelatedTo(source, getKnownKeysOfTupleType(targetType_1), 2, reportErrors)) {
                             return result;
                         }
                     }
                     else {
-                        var constraint = getSimplifiedTypeOrConstraint(targetType);
+                        var constraint = getSimplifiedTypeOrConstraint(targetType_1);
                         if (constraint) {
-                            if (isRelatedTo(source, getIndexType(constraint, target.stringsOnly), reportErrors) === -1) {
+                            if (isRelatedTo(source, getIndexType(constraint, target.stringsOnly), 2, reportErrors) === -1) {
+                                return -1;
+                            }
+                        }
+                        else if (isGenericMappedType(targetType_1)) {
+                            var nameType_1 = getNameTypeFromMappedType(targetType_1);
+                            var constraintType = getConstraintTypeFromMappedType(targetType_1);
+                            var targetKeys = void 0;
+                            if (nameType_1 && isMappedTypeWithKeyofConstraintDeclaration(targetType_1)) {
+                                var modifiersType = getApparentType(getModifiersTypeFromMappedType(targetType_1));
+                                var mappedKeys_1 = [];
+                                forEachMappedTypePropertyKeyTypeAndIndexSignatureKeyType(modifiersType, 8576, false, function (t) { return void mappedKeys_1.push(instantiateType(nameType_1, appendTypeMapping(targetType_1.mapper, getTypeParameterFromMappedType(targetType_1), t))); });
+                                targetKeys = getUnionType(__spreadArray(__spreadArray([], mappedKeys_1, true), [nameType_1], false));
+                            }
+                            else {
+                                targetKeys = nameType_1 || constraintType;
+                            }
+                            if (isRelatedTo(source, targetKeys, 2, reportErrors) === -1) {
                                 return -1;
                             }
                         }
                     }
                 }
                 else if (target.flags & 8388608) {
+                    if (source.flags & 8388608) {
+                        if (result = isRelatedTo(source.objectType, target.objectType, 3, reportErrors)) {
+                            result &= isRelatedTo(source.indexType, target.indexType, 3, reportErrors);
+                        }
+                        if (result) {
+                            resetErrorInfo(saveErrorInfo);
+                            return result;
+                        }
+                        if (reportErrors) {
+                            originalErrorInfo = errorInfo;
+                        }
+                    }
                     if (relation === assignableRelation || relation === comparableRelation) {
                         var objectType = target.objectType;
                         var indexType = target.indexType;
                         var baseObjectType = getBaseConstraintOfType(objectType) || objectType;
                         var baseIndexType = getBaseConstraintOfType(indexType) || indexType;
                         if (!isGenericObjectType(baseObjectType) && !isGenericIndexType(baseIndexType)) {
-                            var accessFlags = 2 | (baseObjectType !== objectType ? 1 : 0);
-                            var constraint = getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, target.noUncheckedIndexedAccessCandidate, undefined, accessFlags);
-                            if (constraint && (result = isRelatedTo(source, constraint, reportErrors))) {
-                                return result;
+                            var accessFlags = 4 | (baseObjectType !== objectType ? 2 : 0);
+                            var constraint = getIndexedAccessTypeOrUndefined(baseObjectType, baseIndexType, accessFlags);
+                            if (constraint) {
+                                if (reportErrors && originalErrorInfo) {
+                                    resetErrorInfo(saveErrorInfo);
+                                }
+                                if (result = isRelatedTo(source, constraint, 2, reportErrors)) {
+                                    return result;
+                                }
+                                if (reportErrors && originalErrorInfo && errorInfo) {
+                                    errorInfo = countMessageChainBreadth([originalErrorInfo]) <= countMessageChainBreadth([errorInfo]) ? originalErrorInfo : errorInfo;
+                                }
                             }
                         }
                     }
+                    if (reportErrors) {
+                        originalErrorInfo = undefined;
+                    }
                 }
-                else if (isGenericMappedType(target) && !target.declaration.nameType) {
-                    var template = getTemplateTypeFromMappedType(target);
+                else if (isGenericMappedType(target) && relation !== identityRelation) {
+                    var keysRemapped = !!target.declaration.nameType;
+                    var templateType = getTemplateTypeFromMappedType(target);
                     var modifiers = getMappedTypeModifiers(target);
                     if (!(modifiers & 8)) {
-                        if (template.flags & 8388608 && template.objectType === source &&
-                            template.indexType === getTypeParameterFromMappedType(target)) {
+                        if (!keysRemapped && templateType.flags & 8388608 && templateType.objectType === source &&
+                            templateType.indexType === getTypeParameterFromMappedType(target)) {
                             return -1;
                         }
                         if (!isGenericMappedType(source)) {
-                            var targetConstraint = getConstraintTypeFromMappedType(target);
+                            var targetKeys = keysRemapped ? getNameTypeFromMappedType(target) : getConstraintTypeFromMappedType(target);
                             var sourceKeys = getIndexType(source, undefined, true);
                             var includeOptional = modifiers & 4;
-                            var filteredByApplicability = includeOptional ? intersectTypes(targetConstraint, sourceKeys) : undefined;
+                            var filteredByApplicability = includeOptional ? intersectTypes(targetKeys, sourceKeys) : undefined;
                             if (includeOptional
                                 ? !(filteredByApplicability.flags & 131072)
-                                : isRelatedTo(targetConstraint, sourceKeys)) {
-                                var templateType = getTemplateTypeFromMappedType(target);
+                                : isRelatedTo(targetKeys, sourceKeys, 3)) {
+                                var templateType_1 = getTemplateTypeFromMappedType(target);
                                 var typeParameter = getTypeParameterFromMappedType(target);
-                                var nonNullComponent = extractTypesOfKind(templateType, ~98304);
-                                if (nonNullComponent.flags & 8388608 && nonNullComponent.indexType === typeParameter) {
-                                    if (result = isRelatedTo(source, nonNullComponent.objectType, reportErrors)) {
+                                var nonNullComponent = extractTypesOfKind(templateType_1, ~98304);
+                                if (!keysRemapped && nonNullComponent.flags & 8388608 && nonNullComponent.indexType === typeParameter) {
+                                    if (result = isRelatedTo(source, nonNullComponent.objectType, 2, reportErrors)) {
                                         return result;
                                     }
                                 }
                                 else {
-                                    var indexingType = filteredByApplicability ? getIntersectionType([filteredByApplicability, typeParameter]) : typeParameter;
+                                    var indexingType = keysRemapped
+                                        ? (filteredByApplicability || targetKeys)
+                                        : filteredByApplicability
+                                            ? getIntersectionType([filteredByApplicability, typeParameter])
+                                            : typeParameter;
                                     var indexedAccessType = getIndexedAccessType(source, indexingType);
-                                    if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) {
+                                    if (result = isRelatedTo(indexedAccessType, templateType_1, 3, reportErrors)) {
                                         return result;
                                     }
                                 }
@@ -49846,92 +53288,103 @@ var ts;
                         }
                     }
                 }
-                else if (target.flags & 134217728 && source.flags & 128) {
-                    if (isPatternLiteralType(target)) {
-                        var result_8 = inferLiteralsFromTemplateLiteralType(source, target);
-                        if (result_8 && ts.every(result_8, function (r, i) { return isStringLiteralTypeValueParsableAsType(r, target.types[i]); })) {
-                            return -1;
+                else if (target.flags & 16777216) {
+                    if (isDeeplyNestedType(target, targetStack, targetDepth, 10)) {
+                        resetErrorInfo(saveErrorInfo);
+                        return 3;
+                    }
+                    var c = target;
+                    if (!c.root.inferTypeParameters && !isDistributionDependent(c.root)) {
+                        var skipTrue = !isTypeAssignableTo(getPermissiveInstantiation(c.checkType), getPermissiveInstantiation(c.extendsType));
+                        var skipFalse = !skipTrue && isTypeAssignableTo(getRestrictiveInstantiation(c.checkType), getRestrictiveInstantiation(c.extendsType));
+                        if (result = skipTrue ? -1 : isRelatedTo(source, getTrueTypeFromConditionalType(c), 2, false)) {
+                            result &= skipFalse ? -1 : isRelatedTo(source, getFalseTypeFromConditionalType(c), 2, false);
+                            if (result) {
+                                resetErrorInfo(saveErrorInfo);
+                                return result;
+                            }
                         }
                     }
                 }
-                if (source.flags & 8650752) {
-                    if (source.flags & 8388608 && target.flags & 8388608) {
-                        if (result = isRelatedTo(source.objectType, target.objectType, reportErrors)) {
-                            result &= isRelatedTo(source.indexType, target.indexType, reportErrors);
-                        }
-                        if (result) {
-                            resetErrorInfo(saveErrorInfo);
-                            return result;
+                else if (target.flags & 134217728) {
+                    if (source.flags & 134217728) {
+                        if (relation === comparableRelation) {
+                            return templateLiteralTypesDefinitelyUnrelated(source, target) ? 0 : -1;
                         }
+                        instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers));
                     }
-                    else {
+                    if (isTypeMatchedByTemplateLiteralType(source, target)) {
+                        return -1;
+                    }
+                }
+                if (source.flags & 8650752) {
+                    if (!(source.flags & 8388608 && target.flags & 8388608)) {
                         var constraint = getConstraintOfType(source);
                         if (!constraint || (source.flags & 262144 && constraint.flags & 1)) {
-                            if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864))) {
+                            if (result = isRelatedTo(emptyObjectType, extractTypesOfKind(target, ~67108864), 3)) {
                                 resetErrorInfo(saveErrorInfo);
                                 return result;
                             }
                         }
-                        else if (result = isRelatedTo(constraint, target, false, undefined, intersectionState)) {
+                        else if (result = isRelatedTo(constraint, target, 1, false, undefined, intersectionState)) {
                             resetErrorInfo(saveErrorInfo);
                             return result;
                         }
-                        else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, reportErrors, undefined, intersectionState)) {
+                        else if (result = isRelatedTo(getTypeWithThisArgument(constraint, source), target, 1, reportErrors && !(target.flags & source.flags & 262144), undefined, intersectionState)) {
                             resetErrorInfo(saveErrorInfo);
                             return result;
                         }
                     }
                 }
                 else if (source.flags & 4194304) {
-                    if (result = isRelatedTo(keyofConstraintType, target, reportErrors)) {
+                    if (result = isRelatedTo(keyofConstraintType, target, 1, reportErrors)) {
                         resetErrorInfo(saveErrorInfo);
                         return result;
                     }
                 }
-                else if (source.flags & 134217728) {
-                    if (target.flags & 134217728 &&
-                        source.texts.length === target.texts.length &&
-                        source.types.length === target.types.length &&
-                        ts.every(source.texts, function (t, i) { return t === target.texts[i]; }) &&
-                        ts.every(instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers)).types, function (t, i) { return !!(target.types[i].flags & (1 | 4)) || !!isRelatedTo(t, target.types[i], false); })) {
-                        return -1;
-                    }
-                    var constraint = getBaseConstraintOfType(source);
-                    if (constraint && constraint !== source && (result = isRelatedTo(constraint, target, reportErrors))) {
-                        resetErrorInfo(saveErrorInfo);
-                        return result;
+                else if (source.flags & 134217728 && !(target.flags & 524288)) {
+                    if (!(target.flags & 134217728)) {
+                        var constraint = getBaseConstraintOfType(source);
+                        if (constraint && constraint !== source && (result = isRelatedTo(constraint, target, 1, reportErrors))) {
+                            resetErrorInfo(saveErrorInfo);
+                            return result;
+                        }
                     }
                 }
                 else if (source.flags & 268435456) {
                     if (target.flags & 268435456 && source.symbol === target.symbol) {
-                        if (result = isRelatedTo(source.type, target.type, reportErrors)) {
+                        if (result = isRelatedTo(source.type, target.type, 3, reportErrors)) {
                             resetErrorInfo(saveErrorInfo);
                             return result;
                         }
                     }
                     else {
                         var constraint = getBaseConstraintOfType(source);
-                        if (constraint && (result = isRelatedTo(constraint, target, reportErrors))) {
+                        if (constraint && (result = isRelatedTo(constraint, target, 1, reportErrors))) {
                             resetErrorInfo(saveErrorInfo);
                             return result;
                         }
                     }
                 }
                 else if (source.flags & 16777216) {
+                    if (isDeeplyNestedType(source, sourceStack, sourceDepth, 10)) {
+                        resetErrorInfo(saveErrorInfo);
+                        return 3;
+                    }
                     if (target.flags & 16777216) {
                         var sourceParams = source.root.inferTypeParameters;
                         var sourceExtends = source.extendsType;
                         var mapper = void 0;
                         if (sourceParams) {
-                            var ctx = createInferenceContext(sourceParams, undefined, 0, isRelatedTo);
-                            inferTypes(ctx.inferences, target.extendsType, sourceExtends, 256 | 512);
+                            var ctx = createInferenceContext(sourceParams, undefined, 0, isRelatedToWorker);
+                            inferTypes(ctx.inferences, target.extendsType, sourceExtends, 512 | 1024);
                             sourceExtends = instantiateType(sourceExtends, ctx.mapper);
                             mapper = ctx.mapper;
                         }
                         if (isTypeIdenticalTo(sourceExtends, target.extendsType) &&
-                            (isRelatedTo(source.checkType, target.checkType) || isRelatedTo(target.checkType, source.checkType))) {
-                            if (result = isRelatedTo(instantiateType(getTrueTypeFromConditionalType(source), mapper), getTrueTypeFromConditionalType(target), reportErrors)) {
-                                result &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), reportErrors);
+                            (isRelatedTo(source.checkType, target.checkType, 3) || isRelatedTo(target.checkType, source.checkType, 3))) {
+                            if (result = isRelatedTo(instantiateType(getTrueTypeFromConditionalType(source), mapper), getTrueTypeFromConditionalType(target), 3, reportErrors)) {
+                                result &= isRelatedTo(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target), 3, reportErrors);
                             }
                             if (result) {
                                 resetErrorInfo(saveErrorInfo);
@@ -49942,7 +53395,7 @@ var ts;
                     else {
                         var distributiveConstraint = getConstraintOfDistributiveConditionalType(source);
                         if (distributiveConstraint) {
-                            if (result = isRelatedTo(distributiveConstraint, target, reportErrors)) {
+                            if (result = isRelatedTo(distributiveConstraint, target, 1, reportErrors)) {
                                 resetErrorInfo(saveErrorInfo);
                                 return result;
                             }
@@ -49950,7 +53403,7 @@ var ts;
                     }
                     var defaultConstraint = getDefaultConstraintOfConditionalType(source);
                     if (defaultConstraint) {
-                        if (result = isRelatedTo(defaultConstraint, target, reportErrors)) {
+                        if (result = isRelatedTo(defaultConstraint, target, 1, reportErrors)) {
                             resetErrorInfo(saveErrorInfo);
                             return result;
                         }
@@ -49977,7 +53430,7 @@ var ts;
                         return 0;
                     }
                     if (ts.getObjectFlags(source) & 4 && ts.getObjectFlags(target) & 4 && source.target === target.target &&
-                        !(ts.getObjectFlags(source) & 8192 || ts.getObjectFlags(target) & 8192)) {
+                        !isTupleType(source) && !(ts.getObjectFlags(source) & 4096 || ts.getObjectFlags(target) & 4096)) {
                         var variances = getVariances(source.target);
                         if (variances === ts.emptyArray) {
                             return 1;
@@ -49989,13 +53442,13 @@ var ts;
                     }
                     else if (isReadonlyArrayType(target) ? isArrayType(source) || isTupleType(source) : isArrayType(target) && isTupleType(source) && !source.target.readonly) {
                         if (relation !== identityRelation) {
-                            return isRelatedTo(getIndexTypeOfType(source, 1) || anyType, getIndexTypeOfType(target, 1) || anyType, reportErrors);
+                            return isRelatedTo(getIndexTypeOfType(source, numberType) || anyType, getIndexTypeOfType(target, numberType) || anyType, 3, reportErrors);
                         }
                         else {
                             return 0;
                         }
                     }
-                    else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target) && ts.getObjectFlags(target) & 32768 && !isEmptyObjectType(source)) {
+                    else if ((relation === subtypeRelation || relation === strictSubtypeRelation) && isEmptyObjectType(target) && ts.getObjectFlags(target) & 16384 && !isEmptyObjectType(source)) {
                         return 0;
                     }
                     if (source.flags & (524288 | 2097152) && target.flags & 524288) {
@@ -50006,10 +53459,7 @@ var ts;
                             if (result) {
                                 result &= signaturesRelatedTo(source, target, 1, reportStructuralErrors);
                                 if (result) {
-                                    result &= indexTypesRelatedTo(source, target, 0, sourceIsPrimitive, reportStructuralErrors, intersectionState);
-                                    if (result) {
-                                        result &= indexTypesRelatedTo(source, target, 1, sourceIsPrimitive, reportStructuralErrors, intersectionState);
-                                    }
+                                    result &= indexSignaturesRelatedTo(source, target, sourceIsPrimitive, reportStructuralErrors, intersectionState);
                                 }
                             }
                         }
@@ -50031,6 +53481,11 @@ var ts;
                     }
                 }
                 return 0;
+                function countMessageChainBreadth(info) {
+                    if (!info)
+                        return 0;
+                    return ts.reduceLeft(info, function (value, chain) { return value + 1 + countMessageChainBreadth(chain.next); }, 0);
+                }
                 function relateVariances(sourceTypeArguments, targetTypeArguments, variances, intersectionState) {
                     if (result = typeArgumentsRelatedTo(sourceTypeArguments, targetTypeArguments, variances, reportErrors, intersectionState)) {
                         return result;
@@ -50070,10 +53525,10 @@ var ts;
                     var result_10;
                     var targetConstraint = getConstraintTypeFromMappedType(target);
                     var sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), makeFunctionTypeMapper(getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers));
-                    if (result_10 = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) {
+                    if (result_10 = isRelatedTo(targetConstraint, sourceConstraint, 3, reportErrors)) {
                         var mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]);
                         if (instantiateType(getNameTypeFromMappedType(source), mapper) === instantiateType(getNameTypeFromMappedType(target), mapper)) {
-                            return result_10 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors);
+                            return result_10 & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), 3, reportErrors);
                         }
                     }
                 }
@@ -50087,7 +53542,7 @@ var ts;
                 var numCombinations = 1;
                 for (var _i = 0, sourcePropertiesFiltered_1 = sourcePropertiesFiltered; _i < sourcePropertiesFiltered_1.length; _i++) {
                     var sourceProperty = sourcePropertiesFiltered_1[_i];
-                    numCombinations *= countTypes(getTypeOfSymbol(sourceProperty));
+                    numCombinations *= countTypes(getNonMissingTypeOfSymbol(sourceProperty));
                     if (numCombinations > 25) {
                         ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.instant("checkTypes", "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source.id, targetId: target.id, numCombinations: numCombinations });
                         return 0;
@@ -50097,7 +53552,7 @@ var ts;
                 var excludedProperties = new ts.Set();
                 for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
                     var sourceProperty = sourcePropertiesFiltered[i];
-                    var sourcePropertyType = getTypeOfSymbol(sourceProperty);
+                    var sourcePropertyType = getNonMissingTypeOfSymbol(sourceProperty);
                     sourceDiscriminantTypes[i] = sourcePropertyType.flags & 1048576
                         ? sourcePropertyType.types
                         : [sourcePropertyType];
@@ -50105,11 +53560,11 @@ var ts;
                 }
                 var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
                 var matchingTypes = [];
-                var _loop_17 = function (combination) {
+                var _loop_19 = function (combination) {
                     var hasMatch = false;
                     outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
                         var type = _d[_c];
-                        var _loop_18 = function (i) {
+                        var _loop_20 = function (i) {
                             var sourceProperty = sourcePropertiesFiltered[i];
                             var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
                             if (!targetProperty)
@@ -50122,7 +53577,7 @@ var ts;
                             }
                         };
                         for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
-                            var state_7 = _loop_18(i);
+                            var state_7 = _loop_20(i);
                             switch (state_7) {
                                 case "continue-outer": continue outer;
                             }
@@ -50136,7 +53591,7 @@ var ts;
                 };
                 for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
                     var combination = discriminantCombinations_1[_a];
-                    var state_6 = _loop_17(combination);
+                    var state_6 = _loop_19(combination);
                     if (typeof state_6 === "object")
                         return state_6.value;
                 }
@@ -50148,11 +53603,8 @@ var ts;
                         result &= signaturesRelatedTo(source, type, 0, false);
                         if (result) {
                             result &= signaturesRelatedTo(source, type, 1, false);
-                            if (result) {
-                                result &= indexTypesRelatedTo(source, type, 0, false, false, 0);
-                                if (result && !(isTupleType(source) && isTupleType(type))) {
-                                    result &= indexTypesRelatedTo(source, type, 1, false, false, 0);
-                                }
+                            if (result && !(isTupleType(source) && isTupleType(type))) {
+                                result &= indexSignaturesRelatedTo(source, type, false, false, 0);
                             }
                         }
                     }
@@ -50180,40 +53632,9 @@ var ts;
             }
             function isPropertySymbolTypeRelated(sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, intersectionState) {
                 var targetIsOptional = strictNullChecks && !!(ts.getCheckFlags(targetProp) & 48);
-                var source = getTypeOfSourceProperty(sourceProp);
-                if (ts.getCheckFlags(targetProp) & 65536 && !getSymbolLinks(targetProp).type) {
-                    var links = getSymbolLinks(targetProp);
-                    ts.Debug.assertIsDefined(links.deferralParent);
-                    ts.Debug.assertIsDefined(links.deferralConstituents);
-                    var unionParent = !!(links.deferralParent.flags & 1048576);
-                    var result_11 = unionParent ? 0 : -1;
-                    var targetTypes = links.deferralConstituents;
-                    for (var _i = 0, targetTypes_3 = targetTypes; _i < targetTypes_3.length; _i++) {
-                        var targetType = targetTypes_3[_i];
-                        var related = isRelatedTo(source, targetType, false, undefined, unionParent ? 0 : 2);
-                        if (!unionParent) {
-                            if (!related) {
-                                return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors);
-                            }
-                            result_11 &= related;
-                        }
-                        else {
-                            if (related) {
-                                return related;
-                            }
-                        }
-                    }
-                    if (unionParent && !result_11 && targetIsOptional) {
-                        result_11 = isRelatedTo(source, undefinedType);
-                    }
-                    if (unionParent && !result_11 && reportErrors) {
-                        return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors);
-                    }
-                    return result_11;
-                }
-                else {
-                    return isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional), reportErrors, undefined, intersectionState);
-                }
+                var effectiveTarget = addOptionality(getNonMissingTypeOfSymbol(targetProp), false, targetIsOptional);
+                var effectiveSource = getTypeOfSourceProperty(sourceProp);
+                return isRelatedTo(effectiveSource, effectiveTarget, 3, reportErrors, undefined, intersectionState);
             }
             function propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSourceProperty, reportErrors, intersectionState, skipOptional) {
                 var sourcePropFlags = ts.getDeclarationModifierFlagsFromSymbol(sourceProp);
@@ -50283,7 +53704,7 @@ var ts;
                 }
                 if (props.length === 1) {
                     var propName = symbolToString(unmatchedProperty);
-                    reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target)));
+                    reportError.apply(void 0, __spreadArray([ts.Diagnostics.Property_0_is_missing_in_type_1_but_required_in_type_2, propName], getTypeNamesForErrorDisplay(source, target), false));
                     if (ts.length(unmatchedProperty.declarations)) {
                         associateRelatedInfo(ts.createDiagnosticForNode(unmatchedProperty.declarations[0], ts.Diagnostics._0_is_declared_here, propName));
                     }
@@ -50331,7 +53752,7 @@ var ts;
                             }
                             return 0;
                         }
-                        if (!targetRestFlag && sourceRestFlag) {
+                        if (!targetRestFlag && (sourceRestFlag || targetArity < sourceArity)) {
                             if (reportErrors) {
                                 if (sourceMinLength < targetMinLength) {
                                     reportError(ts.Diagnostics.Target_requires_0_element_s_but_source_may_have_fewer, targetMinLength);
@@ -50378,13 +53799,14 @@ var ts;
                                 }
                             }
                             var sourceType = !isTupleType(source) ? sourceTypeArguments[0] :
-                                i < startCount || i >= targetArity - endCount ? sourceTypeArguments[sourceIndex] :
+                                i < startCount || i >= targetArity - endCount ? removeMissingType(sourceTypeArguments[sourceIndex], !!(sourceFlags & targetFlags & 2)) :
                                     getElementTypeOfSliceOfTupleType(source, startCount, endCount) || neverType;
                             var targetType = targetTypeArguments[i];
-                            var targetCheckType = sourceFlags & 8 && targetFlags & 4 ? createArrayType(targetType) : targetType;
-                            var related = isRelatedTo(sourceType, targetCheckType, reportErrors, undefined, intersectionState);
+                            var targetCheckType = sourceFlags & 8 && targetFlags & 4 ? createArrayType(targetType) :
+                                removeMissingType(targetType, !!(targetFlags & 2));
+                            var related = isRelatedTo(sourceType, targetCheckType, 3, reportErrors, undefined, intersectionState);
                             if (!related) {
-                                if (reportErrors) {
+                                if (reportErrors && (targetArity > 1 || sourceArity > 1)) {
                                     if (i < startCount || i >= targetArity - endCount || sourceArity - startCount - endCount === 1) {
                                         reportIncompatibleError(ts.Diagnostics.Type_at_position_0_in_source_is_not_compatible_with_type_at_position_1_in_target, sourceIndex, i);
                                     }
@@ -50415,7 +53837,7 @@ var ts;
                         var sourceProp = _a[_i];
                         if (!getPropertyOfObjectType(target, sourceProp.escapedName)) {
                             var sourceType = getTypeOfSymbol(sourceProp);
-                            if (!(sourceType === undefinedType || sourceType === undefinedWideningType || sourceType === optionalType)) {
+                            if (!(sourceType.flags & 32768)) {
                                 if (reportErrors) {
                                     reportError(ts.Diagnostics.Property_0_does_not_exist_on_type_1, symbolToString(sourceProp), typeToString(target));
                                 }
@@ -50432,7 +53854,7 @@ var ts;
                     if (!(targetProp.flags & 4194304) && (!numericNamesOnly || isNumericLiteralName(name) || name === "length")) {
                         var sourceProp = getPropertyOfType(source, name);
                         if (sourceProp && sourceProp !== targetProp) {
-                            var related = propertyRelatedTo(source, target, sourceProp, targetProp, getTypeOfSymbol, reportErrors, intersectionState, relation === comparableRelation);
+                            var related = propertyRelatedTo(source, target, sourceProp, targetProp, getNonMissingTypeOfSymbol, reportErrors, intersectionState, relation === comparableRelation);
                             if (!related) {
                                 return 0;
                             }
@@ -50513,7 +53935,7 @@ var ts;
                     var targetSignature = ts.first(targetSignatures);
                     result = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors, incompatibleReporter(sourceSignature, targetSignature));
                     if (!result && reportErrors && kind === 1 && (sourceObjectFlags & targetObjectFlags) &&
-                        (((_a = targetSignature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 166 || ((_b = sourceSignature.declaration) === null || _b === void 0 ? void 0 : _b.kind) === 166)) {
+                        (((_a = targetSignature.declaration) === null || _a === void 0 ? void 0 : _a.kind) === 170 || ((_b = sourceSignature.declaration) === null || _b === void 0 ? void 0 : _b.kind) === 170)) {
                         var constructSignatureToString = function (signature) {
                             return signatureToString(signature, undefined, 262144, kind);
                         };
@@ -50557,7 +53979,7 @@ var ts;
                 return function (source, target) { return reportIncompatibleError(ts.Diagnostics.Construct_signature_return_types_0_and_1_are_incompatible, typeToString(source), typeToString(target)); };
             }
             function signatureRelatedTo(source, target, erase, reportErrors, incompatibleReporter) {
-                return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, relation === strictSubtypeRelation ? 8 : 0, reportErrors, reportError, incompatibleReporter, isRelatedTo, makeFunctionTypeMapper(reportUnreliableMarkers));
+                return compareSignaturesRelated(erase ? getErasedSignature(source) : source, erase ? getErasedSignature(target) : target, relation === strictSubtypeRelation ? 8 : 0, reportErrors, reportError, incompatibleReporter, isRelatedToWorker, makeFunctionTypeMapper(reportUnreliableMarkers));
             }
             function signaturesIdenticalTo(source, target, kind) {
                 var sourceSignatures = getSignaturesOfType(source, kind);
@@ -50575,24 +53997,21 @@ var ts;
                 }
                 return result;
             }
-            function eachPropertyRelatedTo(source, target, kind, reportErrors) {
+            function membersRelatedToIndexInfo(source, targetInfo, reportErrors) {
                 var result = -1;
+                var keyType = targetInfo.keyType;
                 var props = source.flags & 2097152 ? getPropertiesOfUnionOrIntersectionType(source) : getPropertiesOfObjectType(source);
                 for (var _i = 0, props_2 = props; _i < props_2.length; _i++) {
                     var prop = props_2[_i];
                     if (isIgnoredJsxProperty(source, prop)) {
                         continue;
                     }
-                    var nameType = getSymbolLinks(prop).nameType;
-                    if (nameType && nameType.flags & 8192) {
-                        continue;
-                    }
-                    if (kind === 0 || isNumericLiteralName(prop.escapedName)) {
-                        var propType = getTypeOfSymbol(prop);
-                        var type = propType.flags & 32768 || !(kind === 0 && prop.flags & 16777216)
+                    if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576), keyType)) {
+                        var propType = getNonMissingTypeOfSymbol(prop);
+                        var type = exactOptionalPropertyTypes || propType.flags & 32768 || keyType === numberType || !(prop.flags & 16777216)
                             ? propType
                             : getTypeWithFacts(propType, 524288);
-                        var related = isRelatedTo(type, target, reportErrors);
+                        var related = isRelatedTo(type, targetInfo.type, 3, reportErrors);
                         if (!related) {
                             if (reportErrors) {
                                 reportError(ts.Diagnostics.Property_0_is_incompatible_with_index_signature, symbolToString(prop));
@@ -50602,55 +54021,76 @@ var ts;
                         result &= related;
                     }
                 }
+                for (var _a = 0, _b = getIndexInfosOfType(source); _a < _b.length; _a++) {
+                    var info = _b[_a];
+                    if (isApplicableIndexType(info.keyType, keyType)) {
+                        var related = indexInfoRelatedTo(info, targetInfo, reportErrors);
+                        if (!related) {
+                            return 0;
+                        }
+                        result &= related;
+                    }
+                }
                 return result;
             }
-            function indexTypeRelatedTo(sourceType, targetType, reportErrors) {
-                var related = isRelatedTo(sourceType, targetType, reportErrors);
+            function indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors) {
+                var related = isRelatedTo(sourceInfo.type, targetInfo.type, 3, reportErrors);
                 if (!related && reportErrors) {
-                    reportError(ts.Diagnostics.Index_signatures_are_incompatible);
+                    if (sourceInfo.keyType === targetInfo.keyType) {
+                        reportError(ts.Diagnostics._0_index_signatures_are_incompatible, typeToString(sourceInfo.keyType));
+                    }
+                    else {
+                        reportError(ts.Diagnostics._0_and_1_index_signatures_are_incompatible, typeToString(sourceInfo.keyType), typeToString(targetInfo.keyType));
+                    }
                 }
                 return related;
             }
-            function indexTypesRelatedTo(source, target, kind, sourceIsPrimitive, reportErrors, intersectionState) {
+            function indexSignaturesRelatedTo(source, target, sourceIsPrimitive, reportErrors, intersectionState) {
                 if (relation === identityRelation) {
-                    return indexTypesIdenticalTo(source, target, kind);
+                    return indexSignaturesIdenticalTo(source, target);
                 }
-                var targetType = getIndexTypeOfType(target, kind);
-                if (!targetType || targetType.flags & 1 && !sourceIsPrimitive) {
-                    return -1;
-                }
-                if (isGenericMappedType(source)) {
-                    return getIndexTypeOfType(target, 0) ? isRelatedTo(getTemplateTypeFromMappedType(source), targetType, reportErrors) : 0;
+                var indexInfos = getIndexInfosOfType(target);
+                var targetHasStringIndex = ts.some(indexInfos, function (info) { return info.keyType === stringType; });
+                var result = -1;
+                for (var _i = 0, indexInfos_3 = indexInfos; _i < indexInfos_3.length; _i++) {
+                    var targetInfo = indexInfos_3[_i];
+                    var related = !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 ? -1 :
+                        isGenericMappedType(source) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source), targetInfo.type, 3, reportErrors) :
+                            typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState);
+                    if (!related) {
+                        return 0;
+                    }
+                    result &= related;
                 }
-                var indexType = getIndexTypeOfType(source, kind) || kind === 1 && getIndexTypeOfType(source, 0);
-                if (indexType) {
-                    return indexTypeRelatedTo(indexType, targetType, reportErrors);
+                return result;
+            }
+            function typeRelatedToIndexInfo(source, targetInfo, reportErrors, intersectionState) {
+                var sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType);
+                if (sourceInfo) {
+                    return indexInfoRelatedTo(sourceInfo, targetInfo, reportErrors);
                 }
                 if (!(intersectionState & 1) && isObjectTypeWithInferableIndex(source)) {
-                    var related = eachPropertyRelatedTo(source, targetType, kind, reportErrors);
-                    if (related && kind === 0) {
-                        var numberIndexType = getIndexTypeOfType(source, 1);
-                        if (numberIndexType) {
-                            related &= indexTypeRelatedTo(numberIndexType, targetType, reportErrors);
-                        }
-                    }
-                    return related;
+                    return membersRelatedToIndexInfo(source, targetInfo, reportErrors);
                 }
                 if (reportErrors) {
-                    reportError(ts.Diagnostics.Index_signature_is_missing_in_type_0, typeToString(source));
+                    reportError(ts.Diagnostics.Index_signature_for_type_0_is_missing_in_type_1, typeToString(targetInfo.keyType), typeToString(source));
                 }
                 return 0;
             }
-            function indexTypesIdenticalTo(source, target, indexKind) {
-                var targetInfo = getIndexInfoOfType(target, indexKind);
-                var sourceInfo = getIndexInfoOfType(source, indexKind);
-                if (!sourceInfo && !targetInfo) {
-                    return -1;
+            function indexSignaturesIdenticalTo(source, target) {
+                var sourceInfos = getIndexInfosOfType(source);
+                var targetInfos = getIndexInfosOfType(target);
+                if (sourceInfos.length !== targetInfos.length) {
+                    return 0;
                 }
-                if (sourceInfo && targetInfo && sourceInfo.isReadonly === targetInfo.isReadonly) {
-                    return isRelatedTo(sourceInfo.type, targetInfo.type);
+                for (var _i = 0, targetInfos_1 = targetInfos; _i < targetInfos_1.length; _i++) {
+                    var targetInfo = targetInfos_1[_i];
+                    var sourceInfo = getIndexInfoOfType(source, targetInfo.keyType);
+                    if (!(sourceInfo && isRelatedTo(sourceInfo.type, targetInfo.type, 3) && sourceInfo.isReadonly === targetInfo.isReadonly)) {
+                        return 0;
+                    }
                 }
-                return 0;
+                return -1;
             }
             function constructorVisibilitiesAreCompatible(sourceSignature, targetSignature, reportErrors) {
                 if (!sourceSignature.declaration || !targetSignature.declaration) {
@@ -50688,6 +54128,18 @@ var ts;
             }
             return isUnitType(type) || !!(type.flags & 134217728);
         }
+        function getExactOptionalUnassignableProperties(source, target) {
+            if (isTupleType(source) && isTupleType(target))
+                return ts.emptyArray;
+            return getPropertiesOfType(target)
+                .filter(function (targetProp) { return isExactOptionalPropertyMismatch(getTypeOfPropertyOfType(source, targetProp.escapedName), getTypeOfSymbol(targetProp)); });
+        }
+        function isExactOptionalPropertyMismatch(source, target) {
+            return !!source && !!target && maybeTypeOfKind(source, 32768) && !!containsMissingType(target);
+        }
+        function getExactOptionalProperties(type) {
+            return getPropertiesOfType(type).filter(function (targetProp) { return containsMissingType(getTypeOfSymbol(targetProp)); });
+        }
         function getBestMatchingType(source, target, isRelatedTo) {
             if (isRelatedTo === void 0) { isRelatedTo = compareTypesAssignable; }
             return findMatchingDiscriminantType(source, target, isRelatedTo, true) ||
@@ -50733,10 +54185,8 @@ var ts;
         function isWeakType(type) {
             if (type.flags & 524288) {
                 var resolved = resolveStructuredTypeMembers(type);
-                return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 &&
-                    !resolved.stringIndexInfo && !resolved.numberIndexInfo &&
-                    resolved.properties.length > 0 &&
-                    ts.every(resolved.properties, function (p) { return !!(p.flags & 16777216); });
+                return resolved.callSignatures.length === 0 && resolved.constructSignatures.length === 0 && resolved.indexInfos.length === 0 &&
+                    resolved.properties.length > 0 && ts.every(resolved.properties, function (p) { return !!(p.flags & 16777216); });
             }
             if (type.flags & 2097152) {
                 return ts.every(type.types, isWeakType);
@@ -50754,7 +54204,7 @@ var ts;
         }
         function getMarkerTypeReference(type, source, target) {
             var result = createTypeReference(type, ts.map(type.typeParameters, function (t) { return t === source ? target : t; }));
-            result.objectFlags |= 8192;
+            result.objectFlags |= 4096;
             return result;
         }
         function getAliasVariances(symbol) {
@@ -50773,7 +54223,7 @@ var ts;
                 ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes", "getVariancesWorker", { arity: typeParameters.length, id: (_c = (_a = cache.id) !== null && _a !== void 0 ? _a : (_b = cache.declaredType) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : -1 });
                 cache.variances = ts.emptyArray;
                 variances = [];
-                var _loop_19 = function (tp) {
+                var _loop_21 = function (tp) {
                     var unmeasurable = false;
                     var unreliable = false;
                     var oldHandler = outofbandVarianceMarkerHandler;
@@ -50798,7 +54248,7 @@ var ts;
                 };
                 for (var _i = 0, typeParameters_1 = typeParameters; _i < typeParameters_1.length; _i++) {
                     var tp = typeParameters_1[_i];
-                    _loop_19(tp);
+                    _loop_21(tp);
                 }
                 cache.variances = variances;
                 ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
@@ -50826,7 +54276,7 @@ var ts;
             return !!(ts.getObjectFlags(type) & 4) && !type.node;
         }
         function isTypeReferenceWithGenericArguments(type) {
-            return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return isUnconstrainedTypeParameter(t) || isTypeReferenceWithGenericArguments(t); });
+            return isNonDeferredTypeReference(type) && ts.some(getTypeArguments(type), function (t) { return !!(t.flags & 262144) || isTypeReferenceWithGenericArguments(t); });
         }
         function getTypeReferenceId(type, typeParameters, depth) {
             if (depth === void 0) { depth = 0; }
@@ -50895,21 +54345,20 @@ var ts;
             return !forEachProperty(targetProp, function (tp) { return ts.getDeclarationModifierFlagsFromSymbol(tp) & 16 ?
                 !isPropertyInClassDerivedFrom(sourceProp, getDeclaringClass(tp)) : false; });
         }
-        function isClassDerivedFromDeclaringClasses(checkClass, prop) {
-            return forEachProperty(prop, function (p) { return ts.getDeclarationModifierFlagsFromSymbol(p) & 16 ?
+        function isClassDerivedFromDeclaringClasses(checkClass, prop, writing) {
+            return forEachProperty(prop, function (p) { return ts.getDeclarationModifierFlagsFromSymbol(p, writing) & 16 ?
                 !hasBaseType(checkClass, getDeclaringClass(p)) : false; }) ? undefined : checkClass;
         }
-        function isDeeplyNestedType(type, stack, depth) {
-            if (depth >= 5) {
+        function isDeeplyNestedType(type, stack, depth, maxDepth) {
+            if (maxDepth === void 0) { maxDepth = 5; }
+            if (depth >= maxDepth) {
                 var identity_1 = getRecursionIdentity(type);
-                if (identity_1) {
-                    var count = 0;
-                    for (var i = 0; i < depth; i++) {
-                        if (getRecursionIdentity(stack[i]) === identity_1) {
-                            count++;
-                            if (count >= 5) {
-                                return true;
-                            }
+                var count = 0;
+                for (var i = 0; i < depth; i++) {
+                    if (getRecursionIdentity(stack[i]) === identity_1) {
+                        count++;
+                        if (count >= maxDepth) {
+                            return true;
                         }
                     }
                 }
@@ -50928,6 +54377,9 @@ var ts;
                     return type.target;
                 }
             }
+            if (type.flags & 262144) {
+                return type.symbol;
+            }
             if (type.flags & 8388608) {
                 do {
                     type = type.objectType;
@@ -50937,7 +54389,7 @@ var ts;
             if (type.flags & 16777216) {
                 return type.root;
             }
-            return undefined;
+            return type;
         }
         function isPropertyIdenticalTo(sourceProp, targetProp) {
             return compareProperties(sourceProp, targetProp, compareTypesIdentical) !== 0;
@@ -51046,8 +54498,8 @@ var ts;
         }
         function literalTypesWithSameBaseType(types) {
             var commonBaseType;
-            for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
-                var t = types_14[_i];
+            for (var _i = 0, types_13 = types; _i < types_13.length; _i++) {
+                var t = types_13[_i];
                 var baseType = getBaseTypeOfLiteralType(t);
                 if (!commonBaseType) {
                     commonBaseType = baseType;
@@ -51059,6 +54511,9 @@ var ts;
             return true;
         }
         function getSupertypeOrUnion(types) {
+            if (types.length === 1) {
+                return types[0];
+            }
             return literalTypesWithSameBaseType(types) ?
                 getUnionType(types) :
                 ts.reduceLeft(types, function (s, t) { return isTypeSubtypeOf(s, t) ? t : s; });
@@ -51090,9 +54545,41 @@ var ts;
         function isArrayLikeType(type) {
             return isArrayType(type) || !(type.flags & 98304) && isTypeAssignableTo(type, anyReadonlyArrayType);
         }
+        function getSingleBaseForNonAugmentingSubtype(type) {
+            if (!(ts.getObjectFlags(type) & 4) || !(ts.getObjectFlags(type.target) & 3)) {
+                return undefined;
+            }
+            if (ts.getObjectFlags(type) & 33554432) {
+                return ts.getObjectFlags(type) & 67108864 ? type.cachedEquivalentBaseType : undefined;
+            }
+            type.objectFlags |= 33554432;
+            var target = type.target;
+            if (ts.getObjectFlags(target) & 1) {
+                var baseTypeNode = getBaseTypeNodeOfClass(target);
+                if (baseTypeNode && baseTypeNode.expression.kind !== 79 && baseTypeNode.expression.kind !== 205) {
+                    return undefined;
+                }
+            }
+            var bases = getBaseTypes(target);
+            if (bases.length !== 1) {
+                return undefined;
+            }
+            if (getMembersOfSymbol(type.symbol).size) {
+                return undefined;
+            }
+            var instantiatedBase = !ts.length(target.typeParameters) ? bases[0] : instantiateType(bases[0], createTypeMapper(target.typeParameters, getTypeArguments(type).slice(0, target.typeParameters.length)));
+            if (ts.length(getTypeArguments(type)) > ts.length(target.typeParameters)) {
+                instantiatedBase = getTypeWithThisArgument(instantiatedBase, ts.last(getTypeArguments(type)));
+            }
+            type.objectFlags |= 67108864;
+            return type.cachedEquivalentBaseType = instantiatedBase;
+        }
+        function isEmptyLiteralType(type) {
+            return strictNullChecks ? type === implicitNeverType : type === undefinedWideningType;
+        }
         function isEmptyArrayLiteralType(type) {
-            var elementType = isArrayType(type) ? getTypeArguments(type)[0] : undefined;
-            return elementType === undefinedWideningType || elementType === implicitNeverType;
+            var elementType = getElementTypeOfArrayType(type);
+            return !!elementType && isEmptyLiteralType(elementType);
         }
         function isTupleLikeType(type) {
             return isTupleType(type) || !!getPropertyOfType(type, "0");
@@ -51116,6 +54603,13 @@ var ts;
         function isUnitType(type) {
             return !!(type.flags & 109440);
         }
+        function isUnitLikeType(type) {
+            return type.flags & 2097152 ? ts.some(type.types, isUnitType) :
+                !!(type.flags & 109440);
+        }
+        function extractUnitType(type) {
+            return type.flags & 2097152 ? ts.find(type.types, isUnitType) || type : type;
+        }
         function isLiteralType(type) {
             return type.flags & 16 ? true :
                 type.flags & 1048576 ? type.flags & 1024 ? true : ts.every(type.types, isUnitType) :
@@ -51208,8 +54702,8 @@ var ts;
         }
         function getFalsyFlagsOfTypes(types) {
             var result = 0;
-            for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
-                var t = types_15[_i];
+            for (var _i = 0, types_14 = types; _i < types_14.length; _i++) {
+                var t = types_14[_i];
                 result |= getFalsyFlags(t);
             }
             return result;
@@ -51249,18 +54743,19 @@ var ts;
                     missing === 65536 ? getUnionType([type, nullType]) :
                         getUnionType([type, undefinedType, nullType]);
         }
-        function getOptionalType(type) {
+        function getOptionalType(type, isProperty) {
+            if (isProperty === void 0) { isProperty = false; }
             ts.Debug.assert(strictNullChecks);
-            return type.flags & 32768 ? type : getUnionType([type, undefinedType]);
+            return type.flags & 32768 ? type : getUnionType([type, isProperty ? missingType : undefinedType]);
         }
         function getGlobalNonNullableTypeInstantiation(type) {
+            var reducedType = getTypeWithFacts(type, 2097152);
             if (!deferredGlobalNonNullableTypeAlias) {
                 deferredGlobalNonNullableTypeAlias = getGlobalSymbol("NonNullable", 524288, undefined) || unknownSymbol;
             }
-            if (deferredGlobalNonNullableTypeAlias !== unknownSymbol) {
-                return getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [type]);
-            }
-            return getTypeWithFacts(type, 2097152);
+            return deferredGlobalNonNullableTypeAlias !== unknownSymbol ?
+                getTypeAliasInstantiation(deferredGlobalNonNullableTypeAlias, [reducedType]) :
+                reducedType;
         }
         function getNonNullableType(type) {
             return strictNullChecks ? getGlobalNonNullableTypeInstantiation(type) : type;
@@ -51268,11 +54763,8 @@ var ts;
         function addOptionalTypeMarker(type) {
             return strictNullChecks ? getUnionType([type, optionalType]) : type;
         }
-        function isNotOptionalTypeMarker(type) {
-            return type !== optionalType;
-        }
         function removeOptionalTypeMarker(type) {
-            return strictNullChecks ? filterType(type, isNotOptionalTypeMarker) : type;
+            return strictNullChecks ? removeType(type, optionalType) : type;
         }
         function propagateOptionalTypeMarker(type, node, wasOptional) {
             return wasOptional ? ts.isOutermostOptionalChain(node) ? getOptionalType(type) : addOptionalTypeMarker(type) : type;
@@ -51282,6 +54774,15 @@ var ts;
                 ts.isOptionalChain(expression) ? removeOptionalTypeMarker(exprType) :
                     exprType;
         }
+        function removeMissingType(type, isOptional) {
+            return exactOptionalPropertyTypes && isOptional ? removeType(type, missingType) : type;
+        }
+        function containsMissingType(type) {
+            return exactOptionalPropertyTypes && (type === missingType || type.flags & 1048576 && containsType(type.types, missingType));
+        }
+        function removeMissingOrUndefinedType(type) {
+            return exactOptionalPropertyTypes ? removeType(type, missingType) : getTypeWithFacts(type, 524288);
+        }
         function isCoercibleUnderDoubleEquals(source, target) {
             return ((source.flags & (8 | 4 | 512)) !== 0)
                 && ((target.flags & (8 | 4 | 16)) !== 0);
@@ -51289,7 +54790,7 @@ var ts;
         function isObjectTypeWithInferableIndex(type) {
             return type.flags & 2097152 ? ts.every(type.types, isObjectTypeWithInferableIndex) :
                 !!(type.symbol && (type.symbol.flags & (4096 | 2048 | 384 | 512)) !== 0 &&
-                    !typeHasCallOrConstructSignatures(type)) || !!(ts.getObjectFlags(type) & 2048 && isObjectTypeWithInferableIndex(type.source));
+                    !typeHasCallOrConstructSignatures(type)) || !!(ts.getObjectFlags(type) & 1024 && isObjectTypeWithInferableIndex(type.source));
         }
         function createSymbolWithType(source, type) {
             var symbol = createSymbol(source.flags, source.escapedName, ts.getCheckFlags(source) & 8);
@@ -51317,7 +54818,7 @@ var ts;
             return members;
         }
         function getRegularTypeOfObjectLiteral(type) {
-            if (!(isObjectLiteralType(type) && ts.getObjectFlags(type) & 32768)) {
+            if (!(isObjectLiteralType(type) && ts.getObjectFlags(type) & 16384)) {
                 return type;
             }
             var regularType = type.regularType;
@@ -51326,9 +54827,9 @@ var ts;
             }
             var resolved = type;
             var members = transformTypeOfMembers(type, getRegularTypeOfObjectLiteral);
-            var regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.stringIndexInfo, resolved.numberIndexInfo);
+            var regularNew = createAnonymousType(resolved.symbol, members, resolved.callSignatures, resolved.constructSignatures, resolved.indexInfos);
             regularNew.flags = resolved.flags;
-            regularNew.objectFlags |= resolved.objectFlags & ~32768;
+            regularNew.objectFlags |= resolved.objectFlags & ~16384;
             type.regularType = regularNew;
             return regularNew;
         }
@@ -51358,7 +54859,7 @@ var ts;
                 var names = new ts.Map();
                 for (var _i = 0, _a = getSiblingsOfContext(context); _i < _a.length; _i++) {
                     var t = _a[_i];
-                    if (isObjectLiteralType(t) && !(ts.getObjectFlags(t) & 1024)) {
+                    if (isObjectLiteralType(t) && !(ts.getObjectFlags(t) & 4194304)) {
                         for (var _b = 0, _c = getPropertiesOfType(t); _b < _c.length; _b++) {
                             var prop = _c[_b];
                             names.set(prop.escapedName, prop);
@@ -51383,7 +54884,7 @@ var ts;
             if (cached) {
                 return cached;
             }
-            var result = createSymbolWithType(prop, undefinedType);
+            var result = createSymbolWithType(prop, missingType);
             result.flags |= 16777216;
             undefinedProperties.set(prop.escapedName, result);
             return result;
@@ -51402,17 +54903,15 @@ var ts;
                     }
                 }
             }
-            var stringIndexInfo = getIndexInfoOfType(type, 0);
-            var numberIndexInfo = getIndexInfoOfType(type, 1);
-            var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, stringIndexInfo && createIndexInfo(getWidenedType(stringIndexInfo.type), stringIndexInfo.isReadonly), numberIndexInfo && createIndexInfo(getWidenedType(numberIndexInfo.type), numberIndexInfo.isReadonly));
-            result.objectFlags |= (ts.getObjectFlags(type) & (16384 | 2097152));
+            var result = createAnonymousType(type.symbol, members, ts.emptyArray, ts.emptyArray, ts.sameMap(getIndexInfosOfType(type), function (info) { return createIndexInfo(info.keyType, getWidenedType(info.type), info.isReadonly); }));
+            result.objectFlags |= (ts.getObjectFlags(type) & (8192 | 524288));
             return result;
         }
         function getWidenedType(type) {
             return getWidenedTypeWithContext(type, undefined);
         }
         function getWidenedTypeWithContext(type, context) {
-            if (ts.getObjectFlags(type) & 1572864) {
+            if (ts.getObjectFlags(type) & 393216) {
                 if (context === undefined && type.widened) {
                     return type.widened;
                 }
@@ -51443,7 +54942,7 @@ var ts;
         }
         function reportWideningErrorsInType(type) {
             var errorReported = false;
-            if (ts.getObjectFlags(type) & 524288) {
+            if (ts.getObjectFlags(type) & 131072) {
                 if (type.flags & 1048576) {
                     if (ts.some(type.types, isEmptyObjectType)) {
                         errorReported = true;
@@ -51469,7 +54968,7 @@ var ts;
                     for (var _d = 0, _e = getPropertiesOfObjectType(type); _d < _e.length; _d++) {
                         var p = _e[_d];
                         var t = getTypeOfSymbol(p);
-                        if (ts.getObjectFlags(t) & 524288) {
+                        if (ts.getObjectFlags(t) & 131072) {
                             if (!reportWideningErrorsInType(t)) {
                                 error(p.valueDeclaration, ts.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type, symbolToString(p), typeToString(getWidenedType(t)));
                             }
@@ -51487,12 +54986,12 @@ var ts;
             }
             var diagnostic;
             switch (declaration.kind) {
-                case 216:
-                case 163:
-                case 162:
+                case 220:
+                case 166:
+                case 165:
                     diagnostic = noImplicitAny ? ts.Diagnostics.Member_0_implicitly_has_an_1_type : ts.Diagnostics.Member_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;
                     break;
-                case 160:
+                case 163:
                     var param = declaration;
                     if (ts.isIdentifier(param.name) &&
                         (ts.isCallSignatureDeclaration(param.parent) || ts.isMethodSignature(param.parent) || ts.isFunctionTypeNode(param.parent)) &&
@@ -51500,29 +54999,30 @@ var ts;
                         (resolveName(param, param.name.escapedText, 788968, undefined, param.name.escapedText, true) ||
                             param.name.originalKeywordKind && ts.isTypeNodeKind(param.name.originalKeywordKind))) {
                         var newName = "arg" + param.parent.parameters.indexOf(param);
-                        errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, ts.declarationNameToString(param.name));
+                        var typeName = ts.declarationNameToString(param.name) + (param.dotDotDotToken ? "[]" : "");
+                        errorOrSuggestion(noImplicitAny, declaration, ts.Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1, newName, typeName);
                         return;
                     }
                     diagnostic = declaration.dotDotDotToken ?
                         noImplicitAny ? ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type : ts.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type_but_a_better_type_may_be_inferred_from_usage :
                         noImplicitAny ? ts.Diagnostics.Parameter_0_implicitly_has_an_1_type : ts.Diagnostics.Parameter_0_implicitly_has_an_1_type_but_a_better_type_may_be_inferred_from_usage;
                     break;
-                case 198:
+                case 202:
                     diagnostic = ts.Diagnostics.Binding_element_0_implicitly_has_an_1_type;
                     if (!noImplicitAny) {
                         return;
                     }
                     break;
-                case 308:
+                case 315:
                     error(declaration, ts.Diagnostics.Function_type_which_lacks_return_type_annotation_implicitly_has_an_0_return_type, typeAsString);
                     return;
-                case 251:
-                case 165:
-                case 164:
-                case 167:
+                case 255:
                 case 168:
-                case 208:
-                case 209:
+                case 167:
+                case 171:
+                case 172:
+                case 212:
+                case 213:
                     if (noImplicitAny && !declaration.name) {
                         if (wideningKind === 3) {
                             error(declaration, ts.Diagnostics.Generator_implicitly_has_yield_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type_annotation, typeAsString);
@@ -51536,7 +55036,7 @@ var ts;
                         wideningKind === 3 ? ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_yield_type :
                             ts.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type;
                     break;
-                case 190:
+                case 194:
                     if (noImplicitAny) {
                         error(declaration, ts.Diagnostics.Mapped_object_type_implicitly_has_an_any_template_type);
                     }
@@ -51547,7 +55047,7 @@ var ts;
             errorOrSuggestion(noImplicitAny, declaration, diagnostic, ts.declarationNameToString(ts.getNameOfDeclaration(declaration)), typeAsString);
         }
         function reportErrorsFromWidening(declaration, type, wideningKind) {
-            if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 524288 && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) {
+            if (produceDiagnostics && noImplicitAny && ts.getObjectFlags(type) & 131072 && (!wideningKind || !getContextualSignatureForFunctionLikeDeclaration(declaration))) {
                 if (!reportWideningErrorsInType(type)) {
                     reportImplicitAny(declaration, type, wideningKind);
                 }
@@ -51659,23 +55159,23 @@ var ts;
         }
         function couldContainTypeVariables(type) {
             var objectFlags = ts.getObjectFlags(type);
-            if (objectFlags & 67108864) {
-                return !!(objectFlags & 134217728);
+            if (objectFlags & 1048576) {
+                return !!(objectFlags & 2097152);
             }
             var result = !!(type.flags & 465829888 ||
                 type.flags & 524288 && !isNonGenericTopLevelType(type) && (objectFlags & 4 && (type.node || ts.forEach(getTypeArguments(type), couldContainTypeVariables)) ||
                     objectFlags & 16 && type.symbol && type.symbol.flags & (16 | 8192 | 32 | 2048 | 4096) && type.symbol.declarations ||
-                    objectFlags & (32 | 131072)) ||
+                    objectFlags & (32 | 1024 | 8388608)) ||
                 type.flags & 3145728 && !(type.flags & 1024) && !isNonGenericTopLevelType(type) && ts.some(type.types, couldContainTypeVariables));
             if (type.flags & 3899393) {
-                type.objectFlags |= 67108864 | (result ? 134217728 : 0);
+                type.objectFlags |= 1048576 | (result ? 2097152 : 0);
             }
             return result;
         }
         function isNonGenericTopLevelType(type) {
             if (type.aliasSymbol && !type.aliasTypeArguments) {
-                var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 254);
-                return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 297 ? true : n.kind === 256 ? false : "quit"; }));
+                var declaration = ts.getDeclarationOfKind(type.aliasSymbol, 258);
+                return !!(declaration && ts.findAncestor(declaration.parent, function (n) { return n.kind === 303 ? true : n.kind === 260 ? false : "quit"; }));
             }
             return false;
         }
@@ -51699,8 +55199,8 @@ var ts;
                 }
                 members.set(name, literalProp);
             });
-            var indexInfo = type.flags & 4 ? createIndexInfo(emptyObjectType, false) : undefined;
-            return createAnonymousType(undefined, members, ts.emptyArray, ts.emptyArray, indexInfo, undefined);
+            var indexInfos = type.flags & 4 ? [createIndexInfo(stringType, emptyObjectType, false)] : ts.emptyArray;
+            return createAnonymousType(undefined, members, ts.emptyArray, ts.emptyArray, indexInfos);
         }
         function inferTypeForHomomorphicMappedType(source, target, constraint) {
             if (inInferTypeForHomomorphicMappedType) {
@@ -51717,12 +55217,12 @@ var ts;
             return type;
         }
         function isPartiallyInferableType(type) {
-            return !(ts.getObjectFlags(type) & 2097152) ||
+            return !(ts.getObjectFlags(type) & 524288) ||
                 isObjectLiteralType(type) && ts.some(getPropertiesOfType(type), function (prop) { return isPartiallyInferableType(getTypeOfSymbol(prop)); }) ||
                 isTupleType(type) && ts.some(getTypeArguments(type), isPartiallyInferableType);
         }
         function createReverseMappedType(source, target, constraint) {
-            if (!(getIndexInfoOfType(source, 0) || getPropertiesOfType(source).length !== 0 && isPartiallyInferableType(source))) {
+            if (!(getIndexInfoOfType(source, stringType) || getPropertiesOfType(source).length !== 0 && isPartiallyInferableType(source))) {
                 return undefined;
             }
             if (isArrayType(source)) {
@@ -51735,14 +55235,18 @@ var ts;
                     source.target.elementFlags;
                 return createTupleType(elementTypes, elementFlags, source.target.readonly, source.target.labeledElementDeclarations);
             }
-            var reversed = createObjectType(2048 | 16, undefined);
+            var reversed = createObjectType(1024 | 16, undefined);
             reversed.source = source;
             reversed.mappedType = target;
             reversed.constraintType = constraint;
             return reversed;
         }
         function getTypeOfReverseMappedSymbol(symbol) {
-            return inferReverseMappedType(symbol.propertyType, symbol.mappedType, symbol.constraintType);
+            var links = getSymbolLinks(symbol);
+            if (!links.type) {
+                links.type = inferReverseMappedType(symbol.propertyType, symbol.mappedType, symbol.constraintType);
+            }
+            return links.type;
         }
         function inferReverseMappedType(sourceType, target, constraint) {
             var typeParameter = getIndexedAccessType(constraint.type, getTypeParameterFromMappedType(target));
@@ -51814,6 +55318,16 @@ var ts;
         function isFromInferenceBlockedSource(type) {
             return !!(type.symbol && ts.some(type.symbol.declarations, hasSkipDirectInferenceFlag));
         }
+        function templateLiteralTypesDefinitelyUnrelated(source, target) {
+            var sourceStart = source.texts[0];
+            var targetStart = target.texts[0];
+            var sourceEnd = source.texts[source.texts.length - 1];
+            var targetEnd = target.texts[target.texts.length - 1];
+            var startLen = Math.min(sourceStart.length, targetStart.length);
+            var endLen = Math.min(sourceEnd.length, targetEnd.length);
+            return sourceStart.slice(0, startLen) !== targetStart.slice(0, startLen) ||
+                sourceEnd.slice(sourceEnd.length - endLen) !== targetEnd.slice(targetEnd.length - endLen);
+        }
         function isValidBigIntString(s) {
             var scanner = ts.createScanner(99, false);
             var success = true;
@@ -51826,49 +55340,98 @@ var ts;
             var flags = scanner.getTokenFlags();
             return success && result === 9 && scanner.getTextPos() === (s.length + 1) && !(flags & 512);
         }
-        function isStringLiteralTypeValueParsableAsType(s, target) {
-            if (target.flags & 1048576) {
-                return !!forEachType(target, function (t) { return isStringLiteralTypeValueParsableAsType(s, t); });
-            }
-            switch (target) {
-                case stringType: return true;
-                case numberType: return s.value !== "" && isFinite(+(s.value));
-                case bigintType: return s.value !== "" && isValidBigIntString(s.value);
-                case trueType: return s.value === "true";
-                case falseType: return s.value === "false";
-                case undefinedType: return s.value === "undefined";
-                case nullType: return s.value === "null";
-                default: return !!(target.flags & 1);
-            }
-        }
-        function inferLiteralsFromTemplateLiteralType(source, target) {
-            var value = source.value;
-            var texts = target.texts;
-            var lastIndex = texts.length - 1;
-            var startText = texts[0];
-            var endText = texts[lastIndex];
-            if (!(value.startsWith(startText) && value.slice(startText.length).endsWith(endText)))
+        function isValidTypeForTemplateLiteralPlaceholder(source, target) {
+            if (source === target || target.flags & (1 | 4)) {
+                return true;
+            }
+            if (source.flags & 128) {
+                var value = source.value;
+                return !!(target.flags & 8 && value !== "" && isFinite(+value) ||
+                    target.flags & 64 && value !== "" && isValidBigIntString(value) ||
+                    target.flags & (512 | 98304) && value === target.intrinsicName);
+            }
+            if (source.flags & 134217728) {
+                var texts = source.texts;
+                return texts.length === 2 && texts[0] === "" && texts[1] === "" && isTypeAssignableTo(source.types[0], target);
+            }
+            return isTypeAssignableTo(source, target);
+        }
+        function inferTypesFromTemplateLiteralType(source, target) {
+            return source.flags & 128 ? inferFromLiteralPartsToTemplateLiteral([source.value], ts.emptyArray, target) :
+                source.flags & 134217728 ?
+                    ts.arraysEqual(source.texts, target.texts) ? ts.map(source.types, getStringLikeTypeForType) :
+                        inferFromLiteralPartsToTemplateLiteral(source.texts, source.types, target) :
+                    undefined;
+        }
+        function isTypeMatchedByTemplateLiteralType(source, target) {
+            var inferences = inferTypesFromTemplateLiteralType(source, target);
+            return !!inferences && ts.every(inferences, function (r, i) { return isValidTypeForTemplateLiteralPlaceholder(r, target.types[i]); });
+        }
+        function getStringLikeTypeForType(type) {
+            return type.flags & (1 | 402653316) ? type : getTemplateLiteralType(["", ""], [type]);
+        }
+        function inferFromLiteralPartsToTemplateLiteral(sourceTexts, sourceTypes, target) {
+            var lastSourceIndex = sourceTexts.length - 1;
+            var sourceStartText = sourceTexts[0];
+            var sourceEndText = sourceTexts[lastSourceIndex];
+            var targetTexts = target.texts;
+            var lastTargetIndex = targetTexts.length - 1;
+            var targetStartText = targetTexts[0];
+            var targetEndText = targetTexts[lastTargetIndex];
+            if (lastSourceIndex === 0 && sourceStartText.length < targetStartText.length + targetEndText.length ||
+                !sourceStartText.startsWith(targetStartText) || !sourceEndText.endsWith(targetEndText))
                 return undefined;
+            var remainingEndText = sourceEndText.slice(0, sourceEndText.length - targetEndText.length);
             var matches = [];
-            var str = value.slice(startText.length, value.length - endText.length);
-            var pos = 0;
-            for (var i = 1; i < lastIndex; i++) {
-                var delim = texts[i];
-                var delimPos = delim.length > 0 ? str.indexOf(delim, pos) : pos < str.length ? pos + 1 : -1;
-                if (delimPos < 0)
+            var seg = 0;
+            var pos = targetStartText.length;
+            for (var i = 1; i < lastTargetIndex; i++) {
+                var delim = targetTexts[i];
+                if (delim.length > 0) {
+                    var s = seg;
+                    var p = pos;
+                    while (true) {
+                        p = getSourceText(s).indexOf(delim, p);
+                        if (p >= 0)
+                            break;
+                        s++;
+                        if (s === sourceTexts.length)
+                            return undefined;
+                        p = 0;
+                    }
+                    addMatch(s, p);
+                    pos += delim.length;
+                }
+                else if (pos < getSourceText(seg).length) {
+                    addMatch(seg, pos + 1);
+                }
+                else if (seg < lastSourceIndex) {
+                    addMatch(seg + 1, 0);
+                }
+                else {
                     return undefined;
-                matches.push(getLiteralType(str.slice(pos, delimPos)));
-                pos = delimPos + delim.length;
+                }
             }
-            matches.push(getLiteralType(str.slice(pos)));
+            addMatch(lastSourceIndex, getSourceText(lastSourceIndex).length);
             return matches;
+            function getSourceText(index) {
+                return index < lastSourceIndex ? sourceTexts[index] : remainingEndText;
+            }
+            function addMatch(s, p) {
+                var matchType = s === seg ?
+                    getStringLiteralType(getSourceText(s).slice(pos, p)) :
+                    getTemplateLiteralType(__spreadArray(__spreadArray([sourceTexts[seg].slice(pos)], sourceTexts.slice(seg + 1, s), true), [getSourceText(s).slice(0, p)], false), sourceTypes.slice(seg, s));
+                matches.push(matchType);
+                seg = s;
+                pos = p;
+            }
         }
         function inferTypes(inferences, originalSource, originalTarget, priority, contravariant) {
             if (priority === void 0) { priority = 0; }
             if (contravariant === void 0) { contravariant = false; }
             var bivariant = false;
             var propagationType;
-            var inferencePriority = 1024;
+            var inferencePriority = 2048;
             var allowComplexConstraintInference = true;
             var visited;
             var sourceStack;
@@ -51924,8 +55487,8 @@ var ts;
                     target = getActualTypeVariable(target);
                 }
                 if (target.flags & 8650752) {
-                    if (ts.getObjectFlags(source) & 2097152 || source === nonInferrableAnyType || source === silentNeverType ||
-                        (priority & 64 && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) {
+                    if (ts.getObjectFlags(source) & 524288 || source === nonInferrableAnyType || source === silentNeverType ||
+                        (priority & 128 && (source === autoType || source === autoArrayType)) || isFromInferenceBlockedSource(source)) {
                         return;
                     }
                     var inference = getInferenceInfoForType(target);
@@ -51950,7 +55513,7 @@ var ts;
                                     clearCachedInferences(inferences);
                                 }
                             }
-                            if (!(priority & 64) && target.flags & 262144 && inference.topLevel && !isTypeParameterAtTopLevel(originalTarget, target)) {
+                            if (!(priority & 128) && target.flags & 262144 && inference.topLevel && !isTypeParameterAtTopLevel(originalTarget, target)) {
                                 inference.topLevel = false;
                                 clearCachedInferences(inferences);
                             }
@@ -51986,7 +55549,7 @@ var ts;
                 else if ((isLiteralType(source) || source.flags & 4) && target.flags & 4194304) {
                     var empty = createEmptyObjectTypeFromStringLiteral(source);
                     contravariant = !contravariant;
-                    inferWithPriority(empty, target.type, 128);
+                    inferWithPriority(empty, target.type, 256);
                     contravariant = !contravariant;
                 }
                 else if (source.flags & 8388608 && target.flags & 8388608) {
@@ -51998,6 +55561,13 @@ var ts;
                         inferFromTypes(source.type, target.type);
                     }
                 }
+                else if (source.flags & 33554432) {
+                    inferFromTypes(source.baseType, target);
+                    var oldPriority = priority;
+                    priority |= 4;
+                    inferFromTypes(source.substitute, target);
+                    priority = oldPriority;
+                }
                 else if (target.flags & 16777216) {
                     invokeOnce(source, target, inferToConditionalType);
                 }
@@ -52016,7 +55586,7 @@ var ts;
                 }
                 else {
                     source = getReducedType(source);
-                    if (!(priority & 256 && source.flags & (2097152 | 465829888))) {
+                    if (!(priority & 512 && source.flags & (2097152 | 465829888))) {
                         var apparentSource = getApparentType(source);
                         if (apparentSource !== source && allowComplexConstraintInference && !(apparentSource.flags & (524288 | 2097152))) {
                             allowComplexConstraintInference = false;
@@ -52044,24 +55614,20 @@ var ts;
                 }
                 (visited || (visited = new ts.Map())).set(key, -1);
                 var saveInferencePriority = inferencePriority;
-                inferencePriority = 1024;
+                inferencePriority = 2048;
                 var saveExpandingFlags = expandingFlags;
-                var sourceIdentity = getRecursionIdentity(source) || source;
-                var targetIdentity = getRecursionIdentity(target) || target;
-                if (sourceIdentity && ts.contains(sourceStack, sourceIdentity))
+                var sourceIdentity = getRecursionIdentity(source);
+                var targetIdentity = getRecursionIdentity(target);
+                if (ts.contains(sourceStack, sourceIdentity))
                     expandingFlags |= 1;
-                if (targetIdentity && ts.contains(targetStack, targetIdentity))
+                if (ts.contains(targetStack, targetIdentity))
                     expandingFlags |= 2;
                 if (expandingFlags !== 3) {
-                    if (sourceIdentity)
-                        (sourceStack || (sourceStack = [])).push(sourceIdentity);
-                    if (targetIdentity)
-                        (targetStack || (targetStack = [])).push(targetIdentity);
+                    (sourceStack || (sourceStack = [])).push(sourceIdentity);
+                    (targetStack || (targetStack = [])).push(targetIdentity);
                     action(source, target);
-                    if (targetIdentity)
-                        targetStack.pop();
-                    if (sourceIdentity)
-                        sourceStack.pop();
+                    targetStack.pop();
+                    sourceStack.pop();
                 }
                 else {
                     inferencePriority = -1;
@@ -52101,7 +55667,7 @@ var ts;
                 }
             }
             function inferFromContravariantTypes(source, target) {
-                if (strictFunctionTypes || priority & 512) {
+                if (strictFunctionTypes || priority & 1024) {
                     contravariant = !contravariant;
                     inferFromTypes(source, target);
                     contravariant = !contravariant;
@@ -52123,8 +55689,8 @@ var ts;
             }
             function getSingleTypeVariableFromIntersectionTypes(types) {
                 var typeVariable;
-                for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
-                    var type = types_16[_i];
+                for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
+                    var type = types_15[_i];
                     var t = type.flags & 2097152 && ts.find(type.types, function (t) { return !!getInferenceInfoForType(t); });
                     if (!t || typeVariable && t !== typeVariable) {
                         return undefined;
@@ -52149,7 +55715,7 @@ var ts;
                         else {
                             for (var i = 0; i < sources.length; i++) {
                                 var saveInferencePriority = inferencePriority;
-                                inferencePriority = 1024;
+                                inferencePriority = 2048;
                                 inferFromTypes(sources[i], t);
                                 if (inferencePriority === priority)
                                     matched_1[i] = true;
@@ -52207,24 +55773,22 @@ var ts;
                     if (inference && !inference.isFixed && !isFromInferenceBlockedSource(source)) {
                         var inferredType = inferTypeForHomomorphicMappedType(source, target, constraintType);
                         if (inferredType) {
-                            inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 2097152 ?
-                                8 :
-                                4);
+                            inferWithPriority(inferredType, inference.typeParameter, ts.getObjectFlags(source) & 524288 ?
+                                16 :
+                                8);
                         }
                     }
                     return true;
                 }
                 if (constraintType.flags & 262144) {
-                    inferWithPriority(getIndexType(source), constraintType, 16);
+                    inferWithPriority(getIndexType(source), constraintType, 32);
                     var extendedConstraint = getConstraintOfType(constraintType);
                     if (extendedConstraint && inferToMappedType(source, target, extendedConstraint)) {
                         return true;
                     }
                     var propTypes = ts.map(getPropertiesOfType(source), getTypeOfSymbol);
-                    var stringIndexType = getIndexTypeOfType(source, 0);
-                    var numberIndexInfo = getNonEnumNumberIndexInfo(source);
-                    var numberIndexType = numberIndexInfo && numberIndexInfo.type;
-                    inferFromTypes(getUnionType(ts.append(ts.append(propTypes, stringIndexType), numberIndexType)), getTemplateTypeFromMappedType(target));
+                    var indexTypes = ts.map(getIndexInfosOfType(source), function (info) { return info !== enumNumberIndexInfo ? info.type : neverType; });
+                    inferFromTypes(getUnionType(ts.concatenate(propTypes, indexTypes)), getTemplateTypeFromMappedType(target));
                     return true;
                 }
                 return false;
@@ -52238,19 +55802,19 @@ var ts;
                 }
                 else {
                     var savePriority = priority;
-                    priority |= contravariant ? 32 : 0;
+                    priority |= contravariant ? 64 : 0;
                     var targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)];
                     inferToMultipleTypes(source, targetTypes, target.flags);
                     priority = savePriority;
                 }
             }
             function inferToTemplateLiteralType(source, target) {
-                var matches = source.flags & 128 ? inferLiteralsFromTemplateLiteralType(source, target) :
-                    source.flags & 134217728 && ts.arraysEqual(source.texts, target.texts) ? source.types :
-                        undefined;
+                var matches = inferTypesFromTemplateLiteralType(source, target);
                 var types = target.types;
-                for (var i = 0; i < types.length; i++) {
-                    inferFromTypes(matches ? matches[i] : neverType, types[i]);
+                if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
+                    for (var i = 0; i < types.length; i++) {
+                        inferFromTypes(matches ? matches[i] : neverType, types[i]);
+                    }
                 }
             }
             function inferFromObjectTypes(source, target) {
@@ -52349,7 +55913,7 @@ var ts;
                 var sourceLen = sourceSignatures.length;
                 var targetLen = targetSignatures.length;
                 var len = sourceLen < targetLen ? sourceLen : targetLen;
-                var skipParameters = !!(ts.getObjectFlags(source) & 2097152);
+                var skipParameters = !!(ts.getObjectFlags(source) & 524288);
                 for (var i = 0; i < len; i++) {
                     inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]), skipParameters);
                 }
@@ -52358,34 +55922,49 @@ var ts;
                 if (!skipParameters) {
                     var saveBivariant = bivariant;
                     var kind = target.declaration ? target.declaration.kind : 0;
-                    bivariant = bivariant || kind === 165 || kind === 164 || kind === 166;
+                    bivariant = bivariant || kind === 168 || kind === 167 || kind === 170;
                     applyToParameterTypes(source, target, inferFromContravariantTypes);
                     bivariant = saveBivariant;
                 }
                 applyToReturnTypes(source, target, inferFromTypes);
             }
             function inferFromIndexTypes(source, target) {
-                var targetStringIndexType = getIndexTypeOfType(target, 0);
-                if (targetStringIndexType) {
-                    var sourceIndexType = getIndexTypeOfType(source, 0) ||
-                        getImplicitIndexTypeOfType(source, 0);
-                    if (sourceIndexType) {
-                        inferFromTypes(sourceIndexType, targetStringIndexType);
+                var priority = (ts.getObjectFlags(source) & ts.getObjectFlags(target) & 32) ? 8 : 0;
+                var indexInfos = getIndexInfosOfType(target);
+                if (isObjectTypeWithInferableIndex(source)) {
+                    for (var _i = 0, indexInfos_4 = indexInfos; _i < indexInfos_4.length; _i++) {
+                        var targetInfo = indexInfos_4[_i];
+                        var propTypes = [];
+                        for (var _a = 0, _b = getPropertiesOfType(source); _a < _b.length; _a++) {
+                            var prop = _b[_a];
+                            if (isApplicableIndexType(getLiteralTypeFromProperty(prop, 8576), targetInfo.keyType)) {
+                                var propType = getTypeOfSymbol(prop);
+                                propTypes.push(prop.flags & 16777216 ? removeMissingOrUndefinedType(propType) : propType);
+                            }
+                        }
+                        for (var _c = 0, _d = getIndexInfosOfType(source); _c < _d.length; _c++) {
+                            var info = _d[_c];
+                            if (isApplicableIndexType(info.keyType, targetInfo.keyType)) {
+                                propTypes.push(info.type);
+                            }
+                        }
+                        if (propTypes.length) {
+                            inferWithPriority(getUnionType(propTypes), targetInfo.type, priority);
+                        }
                     }
                 }
-                var targetNumberIndexType = getIndexTypeOfType(target, 1);
-                if (targetNumberIndexType) {
-                    var sourceIndexType = getIndexTypeOfType(source, 1) ||
-                        getIndexTypeOfType(source, 0) ||
-                        getImplicitIndexTypeOfType(source, 1);
-                    if (sourceIndexType) {
-                        inferFromTypes(sourceIndexType, targetNumberIndexType);
+                for (var _e = 0, indexInfos_5 = indexInfos; _e < indexInfos_5.length; _e++) {
+                    var targetInfo = indexInfos_5[_e];
+                    var sourceInfo = getApplicableIndexInfo(source, targetInfo.keyType);
+                    if (sourceInfo) {
+                        inferWithPriority(sourceInfo.type, targetInfo.type, priority);
                     }
                 }
             }
         }
         function isTypeOrBaseIdenticalTo(s, t) {
-            return isTypeIdenticalTo(s, t) || !!(t.flags & 4 && s.flags & 128 || t.flags & 8 && s.flags & 256);
+            return exactOptionalPropertyTypes && t === missingType ? s === t :
+                (isTypeIdenticalTo(s, t) || !!(t.flags & 4 && s.flags & 128 || t.flags & 8 && s.flags & 256));
         }
         function isTypeCloselyMatchedBy(s, t) {
             return !!(s.flags & 524288 && t.flags & 524288 && s.symbol && s.symbol === t.symbol ||
@@ -52399,7 +55978,7 @@ var ts;
             return !!(ts.getObjectFlags(type) & 128);
         }
         function isObjectOrArrayLiteralType(type) {
-            return !!(ts.getObjectFlags(type) & (128 | 65536));
+            return !!(ts.getObjectFlags(type) & (128 | 32768));
         }
         function unionObjectAndArrayLiteralCandidates(candidates) {
             if (candidates.length > 1) {
@@ -52412,7 +55991,7 @@ var ts;
             return candidates;
         }
         function getContravariantInference(inference) {
-            return inference.priority & 208 ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
+            return inference.priority & 416 ? getIntersectionType(inference.contraCandidates) : getCommonSubtype(inference.contraCandidates);
         }
         function getCovariantInference(inference, signature) {
             var candidates = unionObjectAndArrayLiteralCandidates(inference.candidates);
@@ -52422,7 +56001,7 @@ var ts;
             var baseCandidates = primitiveConstraint ? ts.sameMap(candidates, getRegularTypeOfLiteralType) :
                 widenLiteralTypes ? ts.sameMap(candidates, getWidenedLiteralType) :
                     candidates;
-            var unwidenedType = inference.priority & 208 ?
+            var unwidenedType = inference.priority & 416 ?
                 getUnionType(baseCandidates, 2) :
                 getCommonSupertype(baseCandidates);
             return getWidenedType(unwidenedType);
@@ -52433,15 +56012,14 @@ var ts;
                 var inferredType = void 0;
                 var signature = context.signature;
                 if (signature) {
-                    var inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : undefined;
+                    var inferredCovariantType_1 = inference.candidates ? getCovariantInference(inference, signature) : undefined;
                     if (inference.contraCandidates) {
-                        var inferredContravariantType = getContravariantInference(inference);
-                        inferredType = inferredCovariantType && !(inferredCovariantType.flags & 131072) &&
-                            isTypeSubtypeOf(inferredCovariantType, inferredContravariantType) ?
-                            inferredCovariantType : inferredContravariantType;
+                        inferredType = inferredCovariantType_1 && !(inferredCovariantType_1.flags & 131072) &&
+                            ts.some(inference.contraCandidates, function (t) { return isTypeSubtypeOf(inferredCovariantType_1, t); }) ?
+                            inferredCovariantType_1 : getContravariantInference(inference);
                     }
-                    else if (inferredCovariantType) {
-                        inferredType = inferredCovariantType;
+                    else if (inferredCovariantType_1) {
+                        inferredType = inferredCovariantType_1;
                     }
                     else if (context.flags & 1) {
                         inferredType = silentNeverType;
@@ -52520,7 +56098,7 @@ var ts;
                 case "BigUint64Array":
                     return ts.Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_1_or_later;
                 default:
-                    if (node.parent.kind === 289) {
+                    if (node.parent.kind === 295) {
                         return ts.Diagnostics.No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer;
                     }
                     else {
@@ -52532,25 +56110,30 @@ var ts;
             var links = getNodeLinks(node);
             if (!links.resolvedSymbol) {
                 links.resolvedSymbol = !ts.nodeIsMissing(node) &&
-                    resolveName(node, node.escapedText, 111551 | 1048576, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node), false, ts.Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol;
+                    resolveName(node, node.escapedText, 111551 | 1048576, getCannotFindNameDiagnosticForName(node), node, !ts.isWriteOnlyAccess(node), false) || unknownSymbol;
             }
             return links.resolvedSymbol;
         }
         function isInTypeQuery(node) {
-            return !!ts.findAncestor(node, function (n) { return n.kind === 176 ? true : n.kind === 78 || n.kind === 157 ? false : "quit"; });
+            return !!ts.findAncestor(node, function (n) { return n.kind === 180 ? true : n.kind === 79 || n.kind === 160 ? false : "quit"; });
         }
         function getFlowCacheKey(node, declaredType, initialType, flowContainer) {
             switch (node.kind) {
-                case 78:
-                    var symbol = getResolvedSymbol(node);
-                    return symbol !== unknownSymbol ? (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType) + "|" + (isConstraintPosition(node) ? "@" : "") + getSymbolId(symbol) : undefined;
-                case 107:
-                    return "0|" + (flowContainer ? getNodeId(flowContainer) : "-1") + "|" + getTypeId(declaredType) + "|" + getTypeId(initialType);
-                case 225:
-                case 207:
+                case 79:
+                    if (!ts.isThisInTypeQuery(node)) {
+                        var symbol = getResolvedSymbol(node);
+                        return symbol !== unknownSymbol ? "".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType), "|").concat(getSymbolId(symbol)) : undefined;
+                    }
+                case 108:
+                    return "0|".concat(flowContainer ? getNodeId(flowContainer) : "-1", "|").concat(getTypeId(declaredType), "|").concat(getTypeId(initialType));
+                case 229:
+                case 211:
                     return getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
-                case 201:
-                case 202:
+                case 160:
+                    var left = getFlowCacheKey(node.left, declaredType, initialType, flowContainer);
+                    return left && left + "." + node.right.escapedText;
+                case 205:
+                case 206:
                     var propName = getAccessedPropertyName(node);
                     if (propName !== undefined) {
                         var key = getFlowCacheKey(node.expression, declaredType, initialType, flowContainer);
@@ -52561,49 +56144,73 @@ var ts;
         }
         function isMatchingReference(source, target) {
             switch (target.kind) {
-                case 207:
-                case 225:
+                case 211:
+                case 229:
                     return isMatchingReference(source, target.expression);
-                case 216:
+                case 220:
                     return (ts.isAssignmentExpression(target) && isMatchingReference(source, target.left)) ||
                         (ts.isBinaryExpression(target) && target.operatorToken.kind === 27 && isMatchingReference(source, target.right));
             }
             switch (source.kind) {
-                case 78:
+                case 230:
+                    return target.kind === 230
+                        && source.keywordToken === target.keywordToken
+                        && source.name.escapedText === target.name.escapedText;
                 case 79:
-                    return target.kind === 78 && getResolvedSymbol(source) === getResolvedSymbol(target) ||
-                        (target.kind === 249 || target.kind === 198) &&
-                            getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
-                case 107:
-                    return target.kind === 107;
-                case 105:
-                    return target.kind === 105;
-                case 225:
-                case 207:
+                case 80:
+                    return ts.isThisInTypeQuery(source) ?
+                        target.kind === 108 :
+                        target.kind === 79 && getResolvedSymbol(source) === getResolvedSymbol(target) ||
+                            (target.kind === 253 || target.kind === 202) &&
+                                getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target);
+                case 108:
+                    return target.kind === 108;
+                case 106:
+                    return target.kind === 106;
+                case 229:
+                case 211:
                     return isMatchingReference(source.expression, target);
-                case 201:
-                case 202:
+                case 205:
+                case 206:
                     return ts.isAccessExpression(target) &&
                         getAccessedPropertyName(source) === getAccessedPropertyName(target) &&
                         isMatchingReference(source.expression, target.expression);
-                case 157:
+                case 160:
                     return ts.isAccessExpression(target) &&
                         source.right.escapedText === getAccessedPropertyName(target) &&
                         isMatchingReference(source.left, target.expression);
-                case 216:
+                case 220:
                     return (ts.isBinaryExpression(source) && source.operatorToken.kind === 27 && isMatchingReference(source.right, target));
             }
             return false;
         }
-        function containsTruthyCheck(source, target) {
-            return isMatchingReference(source, target) ||
-                (target.kind === 216 && target.operatorToken.kind === 55 &&
-                    (containsTruthyCheck(source, target.left) || containsTruthyCheck(source, target.right)));
+        function getPropertyAccess(expr) {
+            if (ts.isAccessExpression(expr)) {
+                return expr;
+            }
+            if (ts.isIdentifier(expr)) {
+                var symbol = getResolvedSymbol(expr);
+                if (isConstVariable(symbol)) {
+                    var declaration = symbol.valueDeclaration;
+                    if (ts.isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && ts.isAccessExpression(declaration.initializer)) {
+                        return declaration.initializer;
+                    }
+                    if (ts.isBindingElement(declaration) && !declaration.initializer) {
+                        var parent = declaration.parent.parent;
+                        if (ts.isVariableDeclaration(parent) && !parent.type && parent.initializer && (ts.isIdentifier(parent.initializer) || ts.isAccessExpression(parent.initializer))) {
+                            return declaration;
+                        }
+                    }
+                }
+            }
+            return undefined;
         }
         function getAccessedPropertyName(access) {
-            return access.kind === 201 ? access.name.escapedText :
-                ts.isStringOrNumericLiteralLike(access.argumentExpression) ? ts.escapeLeadingUnderscores(access.argumentExpression.text) :
-                    undefined;
+            var propertyName;
+            return access.kind === 205 ? access.name.escapedText :
+                access.kind === 206 && ts.isStringOrNumericLiteralLike(access.argumentExpression) ? ts.escapeLeadingUnderscores(access.argumentExpression.text) :
+                    access.kind === 202 && (propertyName = getDestructuringPropertyName(access)) ? ts.escapeLeadingUnderscores(propertyName) :
+                        undefined;
         }
         function containsMatchingReference(source, target) {
             while (ts.isAccessExpression(source)) {
@@ -52630,7 +56237,7 @@ var ts;
                     if (prop.isDiscriminantProperty === undefined) {
                         prop.isDiscriminantProperty =
                             (prop.checkFlags & 192) === 192 &&
-                                !maybeTypeOfKind(getTypeOfSymbol(prop), 465829888);
+                                !isGenericType(getTypeOfSymbol(prop));
                     }
                     return !!prop.isDiscriminantProperty;
                 }
@@ -52651,6 +56258,76 @@ var ts;
             }
             return result;
         }
+        function mapTypesByKeyProperty(types, name) {
+            var map = new ts.Map();
+            var count = 0;
+            var _loop_22 = function (type) {
+                if (type.flags & (524288 | 2097152 | 58982400)) {
+                    var discriminant = getTypeOfPropertyOfType(type, name);
+                    if (discriminant) {
+                        if (!isLiteralType(discriminant)) {
+                            return { value: undefined };
+                        }
+                        var duplicate_1 = false;
+                        forEachType(discriminant, function (t) {
+                            var id = getTypeId(getRegularTypeOfLiteralType(t));
+                            var existing = map.get(id);
+                            if (!existing) {
+                                map.set(id, type);
+                            }
+                            else if (existing !== unknownType) {
+                                map.set(id, unknownType);
+                                duplicate_1 = true;
+                            }
+                        });
+                        if (!duplicate_1)
+                            count++;
+                    }
+                }
+            };
+            for (var _i = 0, types_16 = types; _i < types_16.length; _i++) {
+                var type = types_16[_i];
+                var state_8 = _loop_22(type);
+                if (typeof state_8 === "object")
+                    return state_8.value;
+            }
+            return count >= 10 && count * 2 >= types.length ? map : undefined;
+        }
+        function getKeyPropertyName(unionType) {
+            var types = unionType.types;
+            if (types.length < 10 || ts.getObjectFlags(unionType) & 65536 ||
+                ts.countWhere(types, function (t) { return !!(t.flags & (524288 | 58982400)); }) < 10) {
+                return undefined;
+            }
+            if (unionType.keyPropertyName === undefined) {
+                var keyPropertyName = ts.forEach(types, function (t) {
+                    return t.flags & (524288 | 58982400) ?
+                        ts.forEach(getPropertiesOfType(t), function (p) { return isUnitType(getTypeOfSymbol(p)) ? p.escapedName : undefined; }) :
+                        undefined;
+                });
+                var mapByKeyProperty = keyPropertyName && mapTypesByKeyProperty(types, keyPropertyName);
+                unionType.keyPropertyName = mapByKeyProperty ? keyPropertyName : "";
+                unionType.constituentMap = mapByKeyProperty;
+            }
+            return unionType.keyPropertyName.length ? unionType.keyPropertyName : undefined;
+        }
+        function getConstituentTypeForKeyType(unionType, keyType) {
+            var _a;
+            var result = (_a = unionType.constituentMap) === null || _a === void 0 ? void 0 : _a.get(getTypeId(getRegularTypeOfLiteralType(keyType)));
+            return result !== unknownType ? result : undefined;
+        }
+        function getMatchingUnionConstituentForType(unionType, type) {
+            var keyPropertyName = getKeyPropertyName(unionType);
+            var propType = keyPropertyName && getTypeOfPropertyOfType(type, keyPropertyName);
+            return propType && getConstituentTypeForKeyType(unionType, propType);
+        }
+        function getMatchingUnionConstituentForObjectLiteral(unionType, node) {
+            var keyPropertyName = getKeyPropertyName(unionType);
+            var propNode = keyPropertyName && ts.find(node.properties, function (p) { return p.symbol && p.kind === 294 &&
+                p.symbol.escapedName === keyPropertyName && isPossiblyDiscriminantValue(p.initializer); });
+            var propType = propNode && getContextFreeTypeOfExpression(propNode.initializer);
+            return propType && getConstituentTypeForKeyType(unionType, propType);
+        }
         function isOrContainsMatchingReference(source, target) {
             return isMatchingReference(source, target) || containsMatchingReference(source, target);
         }
@@ -52663,7 +56340,7 @@ var ts;
                     }
                 }
             }
-            if (expression.expression.kind === 201 &&
+            if (expression.expression.kind === 205 &&
                 isOrContainsMatchingReference(reference, expression.expression.expression)) {
                 return true;
             }
@@ -52703,20 +56380,13 @@ var ts;
             }
             return declaredType;
         }
-        function getTypeFactsOfTypes(types) {
-            var result = 0;
-            for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
-                var t = types_17[_i];
-                result |= getTypeFacts(t);
-            }
-            return result;
-        }
         function isFunctionObjectType(type) {
             var resolved = resolveStructuredTypeMembers(type);
             return !!(resolved.callSignatures.length || resolved.constructSignatures.length ||
                 resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
         }
-        function getTypeFacts(type) {
+        function getTypeFacts(type, ignoreObjects) {
+            if (ignoreObjects === void 0) { ignoreObjects = false; }
             var flags = type.flags;
             if (flags & 4) {
                 return strictNullChecks ? 16317953 : 16776705;
@@ -52753,7 +56423,7 @@ var ts;
                     (type === falseType || type === regularFalseType) ? 12121864 : 7927560 :
                     (type === falseType || type === regularFalseType) ? 12580616 : 16774920;
             }
-            if (flags & 524288) {
+            if (flags & 524288 && !ignoreObjects) {
                 return ts.getObjectFlags(type) & 16 && isEmptyObjectType(type) ?
                     strictNullChecks ? 16318463 : 16777215 :
                     isFunctionObjectType(type) ?
@@ -52776,11 +56446,15 @@ var ts;
                 return 0;
             }
             if (flags & 465829888) {
-                return !isPatternLiteralType(type) ? getTypeFacts(getBaseConstraintOfType(type) || unknownType) :
+                return !isPatternLiteralType(type) ? getTypeFacts(getBaseConstraintOfType(type) || unknownType, ignoreObjects) :
                     strictNullChecks ? 7929345 : 16776705;
             }
-            if (flags & 3145728) {
-                return getTypeFactsOfTypes(type.types);
+            if (flags & 1048576) {
+                return ts.reduceLeft(type.types, function (facts, t) { return facts | getTypeFacts(t, ignoreObjects); }, 0);
+            }
+            if (flags & 2097152) {
+                ignoreObjects || (ignoreObjects = maybeTypeOfKind(type, 131068));
+                return ts.reduceLeft(type.types, function (facts, t) { return facts & getTypeFacts(t, ignoreObjects); }, 16777215);
             }
             return 16777215;
         }
@@ -52788,21 +56462,17 @@ var ts;
             return filterType(type, function (t) { return (getTypeFacts(t) & include) !== 0; });
         }
         function getTypeWithDefault(type, defaultExpression) {
-            if (defaultExpression) {
-                var defaultType = getTypeOfExpression(defaultExpression);
-                return getUnionType([getTypeWithFacts(type, 524288), defaultType]);
-            }
-            return type;
+            return defaultExpression ?
+                getUnionType([getNonUndefinedType(type), getTypeOfExpression(defaultExpression)]) :
+                type;
         }
         function getTypeOfDestructuredProperty(type, name) {
+            var _a;
             var nameType = getLiteralTypeFromPropertyName(name);
             if (!isTypeUsableAsPropertyName(nameType))
                 return errorType;
             var text = getPropertyNameFromType(nameType);
-            return getConstraintForLocation(getTypeOfPropertyOfType(type, text), name) ||
-                isNumericLiteralName(text) && includeUndefinedInIndexSignature(getIndexTypeOfType(type, 1)) ||
-                includeUndefinedInIndexSignature(getIndexTypeOfType(type, 0)) ||
-                errorType;
+            return getTypeOfPropertyOfType(type, text) || includeUndefinedInIndexSignature((_a = getApplicableIndexInfoForName(type, text)) === null || _a === void 0 ? void 0 : _a.type) || errorType;
         }
         function getTypeOfDestructuredArrayElement(type, index) {
             return everyType(type, isTupleLikeType) && getTupleElementType(type, index) ||
@@ -52820,15 +56490,15 @@ var ts;
             return createArrayType(checkIteratedTypeOrElementType(65, type, undefinedType, undefined) || errorType);
         }
         function getAssignedTypeOfBinaryExpression(node) {
-            var isDestructuringDefaultAssignment = node.parent.kind === 199 && isDestructuringAssignmentTarget(node.parent) ||
-                node.parent.kind === 288 && isDestructuringAssignmentTarget(node.parent.parent);
+            var isDestructuringDefaultAssignment = node.parent.kind === 203 && isDestructuringAssignmentTarget(node.parent) ||
+                node.parent.kind === 294 && isDestructuringAssignmentTarget(node.parent.parent);
             return isDestructuringDefaultAssignment ?
                 getTypeWithDefault(getAssignedType(node), node.right) :
                 getTypeOfExpression(node.right);
         }
         function isDestructuringAssignmentTarget(parent) {
-            return parent.parent.kind === 216 && parent.parent.left === parent ||
-                parent.parent.kind === 239 && parent.parent.initializer === parent;
+            return parent.parent.kind === 220 && parent.parent.left === parent ||
+                parent.parent.kind === 243 && parent.parent.initializer === parent;
         }
         function getAssignedTypeOfArrayLiteralElement(node, element) {
             return getTypeOfDestructuredArrayElement(getAssignedType(node), node.elements.indexOf(element));
@@ -52845,21 +56515,21 @@ var ts;
         function getAssignedType(node) {
             var parent = node.parent;
             switch (parent.kind) {
-                case 238:
+                case 242:
                     return stringType;
-                case 239:
+                case 243:
                     return checkRightHandSideOfForOf(parent) || errorType;
-                case 216:
+                case 220:
                     return getAssignedTypeOfBinaryExpression(parent);
-                case 210:
+                case 214:
                     return undefinedType;
-                case 199:
+                case 203:
                     return getAssignedTypeOfArrayLiteralElement(parent, node);
-                case 220:
+                case 224:
                     return getAssignedTypeOfSpreadExpression(parent);
-                case 288:
+                case 294:
                     return getAssignedTypeOfPropertyAssignment(parent);
-                case 289:
+                case 295:
                     return getAssignedTypeOfShorthandPropertyAssignment(parent);
             }
             return errorType;
@@ -52867,7 +56537,7 @@ var ts;
         function getInitialTypeOfBindingElement(node) {
             var pattern = node.parent;
             var parentType = getInitialType(pattern.parent);
-            var type = pattern.kind === 196 ?
+            var type = pattern.kind === 200 ?
                 getTypeOfDestructuredProperty(parentType, node.propertyName || node.name) :
                 !node.dotDotDotToken ?
                     getTypeOfDestructuredArrayElement(parentType, pattern.elements.indexOf(node)) :
@@ -52882,35 +56552,35 @@ var ts;
             if (node.initializer) {
                 return getTypeOfInitializer(node.initializer);
             }
-            if (node.parent.parent.kind === 238) {
+            if (node.parent.parent.kind === 242) {
                 return stringType;
             }
-            if (node.parent.parent.kind === 239) {
+            if (node.parent.parent.kind === 243) {
                 return checkRightHandSideOfForOf(node.parent.parent) || errorType;
             }
             return errorType;
         }
         function getInitialType(node) {
-            return node.kind === 249 ?
+            return node.kind === 253 ?
                 getInitialTypeOfVariableDeclaration(node) :
                 getInitialTypeOfBindingElement(node);
         }
         function isEmptyArrayAssignment(node) {
-            return node.kind === 249 && node.initializer &&
+            return node.kind === 253 && node.initializer &&
                 isEmptyArrayLiteral(node.initializer) ||
-                node.kind !== 198 && node.parent.kind === 216 &&
+                node.kind !== 202 && node.parent.kind === 220 &&
                     isEmptyArrayLiteral(node.parent.right);
         }
         function getReferenceCandidate(node) {
             switch (node.kind) {
-                case 207:
+                case 211:
                     return getReferenceCandidate(node.expression);
-                case 216:
+                case 220:
                     switch (node.operatorToken.kind) {
-                        case 62:
-                        case 74:
+                        case 63:
                         case 75:
                         case 76:
+                        case 77:
                             return getReferenceCandidate(node.left);
                         case 27:
                             return getReferenceCandidate(node.right);
@@ -52920,13 +56590,13 @@ var ts;
         }
         function getReferenceRoot(node) {
             var parent = node.parent;
-            return parent.kind === 207 ||
-                parent.kind === 216 && parent.operatorToken.kind === 62 && parent.left === node ||
-                parent.kind === 216 && parent.operatorToken.kind === 27 && parent.right === node ?
+            return parent.kind === 211 ||
+                parent.kind === 220 && parent.operatorToken.kind === 63 && parent.left === node ||
+                parent.kind === 220 && parent.operatorToken.kind === 27 && parent.right === node ?
                 getReferenceRoot(parent) : node;
         }
         function getTypeOfSwitchClause(clause) {
-            if (clause.kind === 284) {
+            if (clause.kind === 288) {
                 return getRegularTypeOfLiteralType(getTypeOfExpression(clause.expression));
             }
             return neverType;
@@ -52946,7 +56616,7 @@ var ts;
             var witnesses = [];
             for (var _i = 0, _a = switchStatement.caseBlock.clauses; _i < _a.length; _i++) {
                 var clause = _a[_i];
-                if (clause.kind === 284) {
+                if (clause.kind === 288) {
                     if (ts.isStringLiteralLike(clause.expression)) {
                         witnesses.push(clause.expression.text);
                         continue;
@@ -52982,9 +56652,15 @@ var ts;
         function forEachType(type, f) {
             return type.flags & 1048576 ? ts.forEach(type.types, f) : f(type);
         }
+        function someType(type, f) {
+            return type.flags & 1048576 ? ts.some(type.types, f) : f(type);
+        }
         function everyType(type, f) {
             return type.flags & 1048576 ? ts.every(type.types, f) : f(type);
         }
+        function everyContainedType(type, f) {
+            return type.flags & 3145728 ? ts.every(type.types, f) : f(type);
+        }
         function filterType(type, f) {
             if (type.flags & 1048576) {
                 var types = type.types;
@@ -53008,6 +56684,9 @@ var ts;
             }
             return type.flags & 131072 || f(type) ? type : neverType;
         }
+        function removeType(type, targetType) {
+            return filterType(type, function (t) { return t !== targetType; });
+        }
         function countTypes(type) {
             return type.flags & 1048576 ? type.types.length : 1;
         }
@@ -53022,8 +56701,8 @@ var ts;
             var types = origin && origin.flags & 1048576 ? origin.types : type.types;
             var mappedTypes;
             var changed = false;
-            for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
-                var t = types_18[_i];
+            for (var _i = 0, types_17 = types; _i < types_17.length; _i++) {
+                var t = types_17[_i];
                 var mapped = t.flags & 1048576 ? mapType(t, mapper, noReductions) : mapper(t);
                 changed || (changed = t !== mapped);
                 if (mapped) {
@@ -53043,19 +56722,19 @@ var ts;
                 mapType(type, mapper);
         }
         function getConstituentCount(type) {
-            return type.flags & 3145728 ? type.types.length : 1;
+            return type.flags & 1048576 ? type.types.length : 1;
         }
         function extractTypesOfKind(type, kind) {
             return filterType(type, function (t) { return (t.flags & kind) !== 0; });
         }
         function replacePrimitivesWithLiterals(typeWithPrimitives, typeWithLiterals) {
-            if (isTypeSubsetOf(stringType, typeWithPrimitives) && maybeTypeOfKind(typeWithLiterals, 128) ||
-                isTypeSubsetOf(numberType, typeWithPrimitives) && maybeTypeOfKind(typeWithLiterals, 256) ||
-                isTypeSubsetOf(bigintType, typeWithPrimitives) && maybeTypeOfKind(typeWithLiterals, 2048)) {
+            if (maybeTypeOfKind(typeWithPrimitives, 4 | 134217728 | 8 | 64) &&
+                maybeTypeOfKind(typeWithLiterals, 128 | 134217728 | 268435456 | 256 | 2048)) {
                 return mapType(typeWithPrimitives, function (t) {
-                    return t.flags & 4 ? extractTypesOfKind(typeWithLiterals, 4 | 128) :
-                        t.flags & 8 ? extractTypesOfKind(typeWithLiterals, 8 | 256) :
-                            t.flags & 64 ? extractTypesOfKind(typeWithLiterals, 64 | 2048) : t;
+                    return t.flags & 4 ? extractTypesOfKind(typeWithLiterals, 4 | 128 | 134217728 | 268435456) :
+                        isPatternLiteralType(t) && !maybeTypeOfKind(typeWithLiterals, 4 | 134217728 | 268435456) ? extractTypesOfKind(typeWithLiterals, 128) :
+                            t.flags & 8 ? extractTypesOfKind(typeWithLiterals, 8 | 256) :
+                                t.flags & 64 ? extractTypesOfKind(typeWithLiterals, 64 | 2048) : t;
                 });
             }
             return typeWithPrimitives;
@@ -53099,8 +56778,8 @@ var ts;
         }
         function isEvolvingArrayTypeList(types) {
             var hasEvolvingArrayType = false;
-            for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
-                var t = types_19[_i];
+            for (var _i = 0, types_18 = types; _i < types_18.length; _i++) {
+                var t = types_18[_i];
                 if (!(t.flags & 131072)) {
                     if (!(ts.getObjectFlags(t) & 256)) {
                         return false;
@@ -53114,22 +56793,22 @@ var ts;
             var root = getReferenceRoot(node);
             var parent = root.parent;
             var isLengthPushOrUnshift = ts.isPropertyAccessExpression(parent) && (parent.name.escapedText === "length" ||
-                parent.parent.kind === 203
+                parent.parent.kind === 207
                     && ts.isIdentifier(parent.name)
                     && ts.isPushOrUnshiftIdentifier(parent.name));
-            var isElementAssignment = parent.kind === 202 &&
+            var isElementAssignment = parent.kind === 206 &&
                 parent.expression === root &&
-                parent.parent.kind === 216 &&
-                parent.parent.operatorToken.kind === 62 &&
+                parent.parent.kind === 220 &&
+                parent.parent.operatorToken.kind === 63 &&
                 parent.parent.left === parent &&
                 !ts.isAssignmentTarget(parent.parent) &&
                 isTypeAssignableToKind(getTypeOfExpression(parent.argumentExpression), 296);
             return isLengthPushOrUnshift || isElementAssignment;
         }
-        function isDeclarationWithExplicitTypeAnnotation(declaration) {
-            return (declaration.kind === 249 || declaration.kind === 160 ||
-                declaration.kind === 163 || declaration.kind === 162) &&
-                !!ts.getEffectiveTypeAnnotationNode(declaration);
+        function isDeclarationWithExplicitTypeAnnotation(node) {
+            return (ts.isVariableDeclaration(node) || ts.isPropertyDeclaration(node) || ts.isPropertySignature(node) || ts.isParameter(node)) &&
+                !!(ts.getEffectiveTypeAnnotationNode(node) ||
+                    ts.isInJSFile(node) && ts.hasInitializer(node) && node.initializer && ts.isFunctionExpressionOrArrowFunction(node.initializer) && ts.getEffectiveReturnTypeNode(node.initializer));
         }
         function getExplicitTypeOfSymbol(symbol, diagnostic) {
             if (symbol.flags & (16 | 8192 | 32 | 512)) {
@@ -53147,7 +56826,7 @@ var ts;
                     if (isDeclarationWithExplicitTypeAnnotation(declaration)) {
                         return getTypeOfSymbol(symbol);
                     }
-                    if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 239) {
+                    if (ts.isVariableDeclaration(declaration) && declaration.parent.parent.kind === 243) {
                         var statement = declaration.parent.parent;
                         var expressionType = getTypeOfDottedName(statement.expression, undefined);
                         if (expressionType) {
@@ -53164,14 +56843,14 @@ var ts;
         function getTypeOfDottedName(node, diagnostic) {
             if (!(node.flags & 16777216)) {
                 switch (node.kind) {
-                    case 78:
+                    case 79:
                         var symbol = getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(node));
                         return getExplicitTypeOfSymbol(symbol.flags & 2097152 ? resolveAlias(symbol) : symbol, diagnostic);
-                    case 107:
+                    case 108:
                         return getExplicitThisType(node);
-                    case 105:
+                    case 106:
                         return checkSuperExpression(node);
-                    case 201: {
+                    case 205: {
                         var type = getTypeOfDottedName(node.expression, diagnostic);
                         if (type) {
                             var name = node.name;
@@ -53189,7 +56868,7 @@ var ts;
                         }
                         return undefined;
                     }
-                    case 207:
+                    case 211:
                         return getTypeOfDottedName(node.expression, diagnostic);
                 }
             }
@@ -53199,10 +56878,10 @@ var ts;
             var signature = links.effectsSignature;
             if (signature === undefined) {
                 var funcType = void 0;
-                if (node.parent.kind === 233) {
+                if (node.parent.kind === 237) {
                     funcType = getTypeOfDottedName(node.expression, undefined);
                 }
-                else if (node.expression.kind !== 105) {
+                else if (node.expression.kind !== 106) {
                     if (ts.isOptionalChain(node)) {
                         funcType = checkNonNullType(getOptionalExpressionType(checkExpression(node.expression), node.expression), node.expression);
                     }
@@ -53242,8 +56921,8 @@ var ts;
             return result;
         }
         function isFalseExpression(expr) {
-            var node = ts.skipParentheses(expr);
-            return node.kind === 94 || node.kind === 216 && (node.operatorToken.kind === 55 && (isFalseExpression(node.left) || isFalseExpression(node.right)) ||
+            var node = ts.skipParentheses(expr, true);
+            return node.kind === 95 || node.kind === 220 && (node.operatorToken.kind === 55 && (isFalseExpression(node.left) || isFalseExpression(node.right)) ||
                 node.operatorToken.kind === 56 && isFalseExpression(node.left) && isFalseExpression(node.right));
         }
         function isReachableFlowNodeWorker(flow, noCacheCheck) {
@@ -53324,7 +57003,7 @@ var ts;
                     flow = flow.antecedent;
                 }
                 else if (flags & 512) {
-                    if (flow.node.expression.kind === 105) {
+                    if (flow.node.expression.kind === 106) {
                         return true;
                     }
                     flow = flow.antecedent;
@@ -53348,7 +57027,19 @@ var ts;
                 }
             }
         }
-        function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer, couldBeUninitialized) {
+        function isConstantReference(node) {
+            switch (node.kind) {
+                case 79: {
+                    var symbol = getResolvedSymbol(node);
+                    return isConstVariable(symbol) || ts.isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
+                }
+                case 205:
+                case 206:
+                    return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);
+            }
+            return false;
+        }
+        function getFlowTypeOfReference(reference, declaredType, initialType, flowContainer) {
             if (initialType === void 0) { initialType = declaredType; }
             var key;
             var isKeySet = false;
@@ -53356,7 +57047,7 @@ var ts;
             if (flowAnalysisDisabled) {
                 return errorType;
             }
-            if (!reference.flowNode || !couldBeUninitialized && !(declaredType.flags & 536624127)) {
+            if (!reference.flowNode) {
                 return declaredType;
             }
             flowInvocationCount++;
@@ -53364,10 +57055,10 @@ var ts;
             var evolvedType = getTypeFromFlowType(getTypeAtFlowNode(reference.flowNode));
             sharedFlowCount = sharedFlowStart;
             var resultType = ts.getObjectFlags(evolvedType) & 256 && isEvolvingArrayOperationTarget(reference) ? autoArrayType : finalizeEvolvingArrayType(evolvedType);
-            if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 225 && getTypeWithFacts(resultType, 2097152).flags & 131072) {
+            if (resultType === unreachableNeverType || reference.parent && reference.parent.kind === 229 && !(resultType.flags & 131072) && getTypeWithFacts(resultType, 2097152).flags & 131072) {
                 return declaredType;
             }
-            return resultType;
+            return resultType === nonNullUnknownType ? unknownType : resultType;
             function getOrSetCacheKey() {
                 if (isKeySet) {
                     return key;
@@ -53442,9 +57133,9 @@ var ts;
                     else if (flags & 2) {
                         var container = flow.node;
                         if (container && container !== flowContainer &&
-                            reference.kind !== 201 &&
-                            reference.kind !== 202 &&
-                            reference.kind !== 107) {
+                            reference.kind !== 205 &&
+                            reference.kind !== 206 &&
+                            reference.kind !== 108) {
                             flow = container.flowNode;
                             continue;
                         }
@@ -53464,7 +57155,7 @@ var ts;
             }
             function getInitialOrAssignedType(flow) {
                 var node = flow.node;
-                return getConstraintForLocation(node.kind === 249 || node.kind === 198 ?
+                return getNarrowableTypeForReference(node.kind === 253 || node.kind === 202 ?
                     getInitialType(node) :
                     getAssignedType(node), reference);
             }
@@ -53496,23 +57187,23 @@ var ts;
                     }
                     if (ts.isVariableDeclaration(node) && (ts.isInJSFile(node) || ts.isVarConst(node))) {
                         var init = ts.getDeclaredExpandoInitializer(node);
-                        if (init && (init.kind === 208 || init.kind === 209)) {
+                        if (init && (init.kind === 212 || init.kind === 213)) {
                             return getTypeAtFlowNode(flow.antecedent);
                         }
                     }
                     return declaredType;
                 }
-                if (ts.isVariableDeclaration(node) && node.parent.parent.kind === 238 && isMatchingReference(reference, node.parent.parent.expression)) {
+                if (ts.isVariableDeclaration(node) && node.parent.parent.kind === 242 && isMatchingReference(reference, node.parent.parent.expression)) {
                     return getNonNullableTypeIfNeeded(getTypeFromFlowType(getTypeAtFlowNode(flow.antecedent)));
                 }
                 return undefined;
             }
             function narrowTypeByAssertion(type, expr) {
-                var node = ts.skipParentheses(expr);
-                if (node.kind === 94) {
+                var node = ts.skipParentheses(expr, true);
+                if (node.kind === 95) {
                     return unreachableNeverType;
                 }
-                if (node.kind === 216) {
+                if (node.kind === 220) {
                     if (node.operatorToken.kind === 55) {
                         return narrowTypeByAssertion(narrowTypeByAssertion(type, node.left), node.right);
                     }
@@ -53543,7 +57234,7 @@ var ts;
             function getTypeAtFlowArrayMutation(flow) {
                 if (declaredType === autoType || declaredType === autoArrayType) {
                     var node = flow.node;
-                    var expr = node.kind === 203 ?
+                    var expr = node.kind === 207 ?
                         node.expression.expression :
                         node.left.expression;
                     if (isMatchingReference(reference, getReferenceCandidate(expr))) {
@@ -53551,7 +57242,7 @@ var ts;
                         var type = getTypeFromFlowType(flowType);
                         if (ts.getObjectFlags(type) & 256) {
                             var evolvedType_1 = type;
-                            if (node.kind === 203) {
+                            if (node.kind === 207) {
                                 for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
                                     var arg = _a[_i];
                                     evolvedType_1 = addEvolvingArrayElementType(evolvedType_1, arg);
@@ -53591,7 +57282,7 @@ var ts;
                 if (isMatchingReference(reference, expr)) {
                     type = narrowTypeBySwitchOnDiscriminant(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
                 }
-                else if (expr.kind === 211 && isMatchingReference(reference, expr.expression)) {
+                else if (expr.kind === 215 && isMatchingReference(reference, expr.expression)) {
                     type = narrowBySwitchOnTypeOf(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
                 }
                 else {
@@ -53599,12 +57290,13 @@ var ts;
                         if (optionalChainContainsReference(expr, reference)) {
                             type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & (32768 | 131072)); });
                         }
-                        else if (expr.kind === 211 && optionalChainContainsReference(expr.expression, reference)) {
+                        else if (expr.kind === 215 && optionalChainContainsReference(expr.expression, reference)) {
                             type = narrowTypeBySwitchOptionalChainContainment(type, flow.switchStatement, flow.clauseStart, flow.clauseEnd, function (t) { return !(t.flags & 131072 || t.flags & 128 && t.value === "undefined"); });
                         }
                     }
-                    if (isMatchingReferenceDiscriminant(expr, type)) {
-                        type = narrowTypeByDiscriminant(type, expr, function (t) { return narrowTypeBySwitchOnDiscriminant(t, flow.switchStatement, flow.clauseStart, flow.clauseEnd); });
+                    var access = getDiscriminantPropertyAccess(expr, type);
+                    if (access) {
+                        type = narrowTypeBySwitchOnDiscriminantProperty(type, access, flow.switchStatement, flow.clauseStart, flow.clauseEnd);
                     }
                 }
                 return createFlowType(type, isIncomplete(flowType));
@@ -53717,24 +57409,20 @@ var ts;
                 }
                 return result;
             }
-            function isMatchingReferenceDiscriminant(expr, computedType) {
+            function getDiscriminantPropertyAccess(expr, computedType) {
+                var access, name;
                 var type = declaredType.flags & 1048576 ? declaredType : computedType;
-                if (!(type.flags & 1048576) || !ts.isAccessExpression(expr)) {
-                    return false;
-                }
-                var name = getAccessedPropertyName(expr);
-                if (name === undefined) {
-                    return false;
-                }
-                return isMatchingReference(reference, expr.expression) && isDiscriminantProperty(type, name);
+                return type.flags & 1048576 && (access = getPropertyAccess(expr)) && (name = getAccessedPropertyName(access)) &&
+                    isMatchingReference(reference, ts.isAccessExpression(access) ? access.expression : access.parent.parent.initializer) &&
+                    isDiscriminantProperty(type, name) ?
+                    access : undefined;
             }
             function narrowTypeByDiscriminant(type, access, narrowType) {
                 var propName = getAccessedPropertyName(access);
                 if (propName === undefined) {
                     return type;
                 }
-                var includesNullable = strictNullChecks && maybeTypeOfKind(type, 98304);
-                var removeNullable = includesNullable && ts.isOptionalChain(access);
+                var removeNullable = strictNullChecks && ts.isOptionalChain(access) && maybeTypeOfKind(type, 98304);
                 var propType = getTypeOfPropertyOfType(removeNullable ? getTypeWithFacts(type, 2097152) : type, propName);
                 if (!propType) {
                     return type;
@@ -53743,100 +57431,160 @@ var ts;
                 var narrowedPropType = narrowType(propType);
                 return filterType(type, function (t) {
                     var discriminantType = getTypeOfPropertyOrIndexSignature(t, propName);
-                    return !(discriminantType.flags & 131072) && isTypeComparableTo(discriminantType, narrowedPropType);
+                    return !(narrowedPropType.flags & 131072) && isTypeComparableTo(narrowedPropType, discriminantType);
                 });
             }
+            function narrowTypeByDiscriminantProperty(type, access, operator, value, assumeTrue) {
+                if ((operator === 36 || operator === 37) && type.flags & 1048576) {
+                    var keyPropertyName = getKeyPropertyName(type);
+                    if (keyPropertyName && keyPropertyName === getAccessedPropertyName(access)) {
+                        var candidate = getConstituentTypeForKeyType(type, getTypeOfExpression(value));
+                        if (candidate) {
+                            return operator === (assumeTrue ? 36 : 37) ? candidate :
+                                isUnitType(getTypeOfPropertyOfType(candidate, keyPropertyName) || unknownType) ? removeType(type, candidate) :
+                                    type;
+                        }
+                    }
+                }
+                return narrowTypeByDiscriminant(type, access, function (t) { return narrowTypeByEquality(t, operator, value, assumeTrue); });
+            }
+            function narrowTypeBySwitchOnDiscriminantProperty(type, access, switchStatement, clauseStart, clauseEnd) {
+                if (clauseStart < clauseEnd && type.flags & 1048576 && getKeyPropertyName(type) === getAccessedPropertyName(access)) {
+                    var clauseTypes = getSwitchClauseTypes(switchStatement).slice(clauseStart, clauseEnd);
+                    var candidate = getUnionType(ts.map(clauseTypes, function (t) { return getConstituentTypeForKeyType(type, t) || unknownType; }));
+                    if (candidate !== unknownType) {
+                        return candidate;
+                    }
+                }
+                return narrowTypeByDiscriminant(type, access, function (t) { return narrowTypeBySwitchOnDiscriminant(t, switchStatement, clauseStart, clauseEnd); });
+            }
             function narrowTypeByTruthiness(type, expr, assumeTrue) {
                 if (isMatchingReference(reference, expr)) {
-                    return getTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
+                    return type.flags & 2 && assumeTrue ? nonNullUnknownType :
+                        getTypeWithFacts(type, assumeTrue ? 4194304 : 8388608);
                 }
                 if (strictNullChecks && assumeTrue && optionalChainContainsReference(expr, reference)) {
                     type = getTypeWithFacts(type, 2097152);
                 }
-                if (isMatchingReferenceDiscriminant(expr, type)) {
-                    return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 : 8388608); });
+                var access = getDiscriminantPropertyAccess(expr, type);
+                if (access) {
+                    return narrowTypeByDiscriminant(type, access, function (t) { return getTypeWithFacts(t, assumeTrue ? 4194304 : 8388608); });
                 }
                 return type;
             }
             function isTypePresencePossible(type, propName, assumeTrue) {
-                if (getIndexInfoOfType(type, 0)) {
-                    return true;
-                }
                 var prop = getPropertyOfType(type, propName);
                 if (prop) {
                     return prop.flags & 16777216 ? true : assumeTrue;
                 }
-                return !assumeTrue;
+                return getApplicableIndexInfoForName(type, propName) ? true : !assumeTrue;
             }
-            function narrowByInKeyword(type, literal, assumeTrue) {
-                if (type.flags & (1048576 | 524288)
+            function narrowByInKeyword(type, name, assumeTrue) {
+                if (type.flags & 1048576
+                    || type.flags & 524288 && declaredType !== type
                     || isThisTypeParameter(type)
                     || type.flags & 2097152 && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
-                    var propName_1 = ts.escapeLeadingUnderscores(literal.text);
-                    return filterType(type, function (t) { return isTypePresencePossible(t, propName_1, assumeTrue); });
+                    return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
                 }
                 return type;
             }
             function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
                 switch (expr.operatorToken.kind) {
-                    case 62:
-                    case 74:
+                    case 63:
                     case 75:
                     case 76:
+                    case 77:
                         return narrowTypeByTruthiness(narrowType(type, expr.right, assumeTrue), expr.left, assumeTrue);
                     case 34:
                     case 35:
                     case 36:
                     case 37:
-                        var operator_1 = expr.operatorToken.kind;
-                        var left_1 = getReferenceCandidate(expr.left);
-                        var right_1 = getReferenceCandidate(expr.right);
-                        if (left_1.kind === 211 && ts.isStringLiteralLike(right_1)) {
-                            return narrowTypeByTypeof(type, left_1, operator_1, right_1, assumeTrue);
+                        var operator = expr.operatorToken.kind;
+                        var left = getReferenceCandidate(expr.left);
+                        var right = getReferenceCandidate(expr.right);
+                        if (left.kind === 215 && ts.isStringLiteralLike(right)) {
+                            return narrowTypeByTypeof(type, left, operator, right, assumeTrue);
                         }
-                        if (right_1.kind === 211 && ts.isStringLiteralLike(left_1)) {
-                            return narrowTypeByTypeof(type, right_1, operator_1, left_1, assumeTrue);
+                        if (right.kind === 215 && ts.isStringLiteralLike(left)) {
+                            return narrowTypeByTypeof(type, right, operator, left, assumeTrue);
                         }
-                        if (isMatchingReference(reference, left_1)) {
-                            return narrowTypeByEquality(type, operator_1, right_1, assumeTrue);
+                        if (isMatchingReference(reference, left)) {
+                            return narrowTypeByEquality(type, operator, right, assumeTrue);
                         }
-                        if (isMatchingReference(reference, right_1)) {
-                            return narrowTypeByEquality(type, operator_1, left_1, assumeTrue);
+                        if (isMatchingReference(reference, right)) {
+                            return narrowTypeByEquality(type, operator, left, assumeTrue);
                         }
                         if (strictNullChecks) {
-                            if (optionalChainContainsReference(left_1, reference)) {
-                                type = narrowTypeByOptionalChainContainment(type, operator_1, right_1, assumeTrue);
+                            if (optionalChainContainsReference(left, reference)) {
+                                type = narrowTypeByOptionalChainContainment(type, operator, right, assumeTrue);
                             }
-                            else if (optionalChainContainsReference(right_1, reference)) {
-                                type = narrowTypeByOptionalChainContainment(type, operator_1, left_1, assumeTrue);
+                            else if (optionalChainContainsReference(right, reference)) {
+                                type = narrowTypeByOptionalChainContainment(type, operator, left, assumeTrue);
                             }
                         }
-                        if (isMatchingReferenceDiscriminant(left_1, type)) {
-                            return narrowTypeByDiscriminant(type, left_1, function (t) { return narrowTypeByEquality(t, operator_1, right_1, assumeTrue); });
+                        var leftAccess = getDiscriminantPropertyAccess(left, type);
+                        if (leftAccess) {
+                            return narrowTypeByDiscriminantProperty(type, leftAccess, operator, right, assumeTrue);
                         }
-                        if (isMatchingReferenceDiscriminant(right_1, type)) {
-                            return narrowTypeByDiscriminant(type, right_1, function (t) { return narrowTypeByEquality(t, operator_1, left_1, assumeTrue); });
+                        var rightAccess = getDiscriminantPropertyAccess(right, type);
+                        if (rightAccess) {
+                            return narrowTypeByDiscriminantProperty(type, rightAccess, operator, left, assumeTrue);
                         }
-                        if (isMatchingConstructorReference(left_1)) {
-                            return narrowTypeByConstructor(type, operator_1, right_1, assumeTrue);
+                        if (isMatchingConstructorReference(left)) {
+                            return narrowTypeByConstructor(type, operator, right, assumeTrue);
                         }
-                        if (isMatchingConstructorReference(right_1)) {
-                            return narrowTypeByConstructor(type, operator_1, left_1, assumeTrue);
+                        if (isMatchingConstructorReference(right)) {
+                            return narrowTypeByConstructor(type, operator, left, assumeTrue);
                         }
                         break;
-                    case 101:
+                    case 102:
                         return narrowTypeByInstanceof(type, expr, assumeTrue);
-                    case 100:
+                    case 101:
+                        if (ts.isPrivateIdentifier(expr.left)) {
+                            return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue);
+                        }
                         var target = getReferenceCandidate(expr.right);
-                        if (ts.isStringLiteralLike(expr.left) && isMatchingReference(reference, target)) {
-                            return narrowByInKeyword(type, expr.left, assumeTrue);
+                        var leftType = getTypeOfNode(expr.left);
+                        if (leftType.flags & 128) {
+                            var name = ts.escapeLeadingUnderscores(leftType.value);
+                            if (containsMissingType(type) && ts.isAccessExpression(reference) && isMatchingReference(reference.expression, target) &&
+                                getAccessedPropertyName(reference) === name) {
+                                return getTypeWithFacts(type, assumeTrue ? 524288 : 65536);
+                            }
+                            if (isMatchingReference(reference, target)) {
+                                return narrowByInKeyword(type, name, assumeTrue);
+                            }
                         }
                         break;
                     case 27:
                         return narrowType(type, expr.right, assumeTrue);
+                    case 55:
+                        return assumeTrue ?
+                            narrowType(narrowType(type, expr.left, true), expr.right, true) :
+                            getUnionType([narrowType(type, expr.left, false), narrowType(type, expr.right, false)]);
+                    case 56:
+                        return assumeTrue ?
+                            getUnionType([narrowType(type, expr.left, true), narrowType(type, expr.right, true)]) :
+                            narrowType(narrowType(type, expr.left, false), expr.right, false);
                 }
                 return type;
             }
+            function narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue) {
+                var target = getReferenceCandidate(expr.right);
+                if (!isMatchingReference(reference, target)) {
+                    return type;
+                }
+                ts.Debug.assertNode(expr.left, ts.isPrivateIdentifier);
+                var symbol = getSymbolForPrivateIdentifierExpression(expr.left);
+                if (symbol === undefined) {
+                    return type;
+                }
+                var classSymbol = symbol.parent;
+                var targetType = ts.hasStaticModifier(ts.Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration"))
+                    ? getTypeOfSymbol(classSymbol)
+                    : getDeclaredTypeOfSymbol(classSymbol);
+                return getNarrowedType(type, targetType, assumeTrue, isTypeDerivedFrom);
+            }
             function narrowTypeByOptionalChainContainment(type, operator, value, assumeTrue) {
                 var equalsOperator = operator === 34 || operator === 36;
                 var nullableFlags = operator === 34 || operator === 35 ? 98304 : 32768;
@@ -53853,6 +57601,9 @@ var ts;
                     assumeTrue = !assumeTrue;
                 }
                 var valueType = getTypeOfExpression(value);
+                if (assumeTrue && (type.flags & 2) && (operator === 34 || operator === 35) && (valueType.flags & 65536)) {
+                    return getUnionType([nullType, undefinedType]);
+                }
                 if ((type.flags & 2) && assumeTrue && (operator === 36 || operator === 37)) {
                     if (valueType.flags & (131068 | 67108864)) {
                         return valueType;
@@ -53872,17 +57623,16 @@ var ts;
                         valueType.flags & 65536 ?
                             assumeTrue ? 131072 : 1048576 :
                             assumeTrue ? 65536 : 524288;
-                    return getTypeWithFacts(type, facts);
+                    return type.flags & 2 && facts & (1048576 | 2097152) ? nonNullUnknownType : getTypeWithFacts(type, facts);
                 }
                 if (assumeTrue) {
                     var filterFn = operator === 34 ?
-                        (function (t) { return areTypesComparable(t, valueType) || isCoercibleUnderDoubleEquals(t, valueType); }) :
+                        function (t) { return areTypesComparable(t, valueType) || isCoercibleUnderDoubleEquals(t, valueType); } :
                         function (t) { return areTypesComparable(t, valueType); };
                     return replacePrimitivesWithLiterals(filterType(type, filterFn), valueType);
                 }
                 if (isUnitType(valueType)) {
-                    var regularType_1 = getRegularTypeOfLiteralType(valueType);
-                    return filterType(type, function (t) { return isUnitType(t) ? !areTypesComparable(t, valueType) : getRegularTypeOfLiteralType(t) !== regularType_1; });
+                    return filterType(type, function (t) { return !(isUnitLikeType(t) && areTypesComparable(t, valueType)); });
                 }
                 return type;
             }
@@ -53901,13 +57651,7 @@ var ts;
                     return type;
                 }
                 if (assumeTrue && type.flags & 2 && literal.text === "object") {
-                    if (typeOfExpr.parent.parent.kind === 216) {
-                        var expr = typeOfExpr.parent.parent;
-                        if (expr.operatorToken.kind === 55 && expr.right === typeOfExpr.parent && containsTruthyCheck(reference, expr.left)) {
-                            return nonPrimitiveType;
-                        }
-                    }
-                    return getUnionType([nonPrimitiveType, nullType]);
+                    return type === nonNullUnknownType ? nonPrimitiveType : getUnionType([nonPrimitiveType, nullType]);
                 }
                 var facts = assumeTrue ?
                     typeofEQFacts.get(literal.text) || 128 :
@@ -53953,7 +57697,7 @@ var ts;
                 if (!hasDefaultClause) {
                     return caseType;
                 }
-                var defaultType = filterType(type, function (t) { return !(isUnitType(t) && ts.contains(switchTypes, getRegularTypeOfLiteralType(t))); });
+                var defaultType = filterType(type, function (t) { return !(isUnitLikeType(t) && ts.contains(switchTypes, getRegularTypeOfLiteralType(extractUnitType(t)))); });
                 return caseType.flags & 131072 ? defaultType : getUnionType([caseType, defaultType]);
             }
             function getImpliedTypeFromTypeofGuard(type, text) {
@@ -54102,6 +57846,16 @@ var ts;
                         return narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue);
                     }
                 }
+                if (containsMissingType(type) && ts.isAccessExpression(reference) && ts.isPropertyAccessExpression(callExpression.expression)) {
+                    var callAccess = callExpression.expression;
+                    if (isMatchingReference(reference.expression, getReferenceCandidate(callAccess.expression)) &&
+                        ts.isIdentifier(callAccess.name) && callAccess.name.escapedText === "hasOwnProperty" && callExpression.arguments.length === 1) {
+                        var argument = callExpression.arguments[0];
+                        if (ts.isStringLiteralLike(argument) && getAccessedPropertyName(reference) === ts.escapeLeadingUnderscores(argument.text)) {
+                            return getTypeWithFacts(type, assumeTrue ? 524288 : 65536);
+                        }
+                    }
+                }
                 return type;
             }
             function narrowTypeByTypePredicate(type, predicate, callExpression, assumeTrue) {
@@ -54115,8 +57869,9 @@ var ts;
                             !(getTypeFacts(predicate.type) & 65536)) {
                             type = getTypeWithFacts(type, 2097152);
                         }
-                        if (isMatchingReferenceDiscriminant(predicateArgument, type)) {
-                            return narrowTypeByDiscriminant(type, predicateArgument, function (t) { return getNarrowedType(t, predicate.type, assumeTrue, isTypeSubtypeOf); });
+                        var access = getDiscriminantPropertyAccess(predicateArgument, type);
+                        if (access) {
+                            return narrowTypeByDiscriminant(type, access, function (t) { return getNarrowedType(t, predicate.type, assumeTrue, isTypeSubtypeOf); });
                         }
                     }
                 }
@@ -54128,20 +57883,32 @@ var ts;
                     return narrowTypeByOptionality(type, expr, assumeTrue);
                 }
                 switch (expr.kind) {
-                    case 78:
-                    case 107:
-                    case 105:
-                    case 201:
-                    case 202:
+                    case 79:
+                        if (!isMatchingReference(reference, expr) && inlineLevel < 5) {
+                            var symbol = getResolvedSymbol(expr);
+                            if (isConstVariable(symbol)) {
+                                var declaration = symbol.valueDeclaration;
+                                if (declaration && ts.isVariableDeclaration(declaration) && !declaration.type && declaration.initializer && isConstantReference(reference)) {
+                                    inlineLevel++;
+                                    var result = narrowType(type, declaration.initializer, assumeTrue);
+                                    inlineLevel--;
+                                    return result;
+                                }
+                            }
+                        }
+                    case 108:
+                    case 106:
+                    case 205:
+                    case 206:
                         return narrowTypeByTruthiness(type, expr, assumeTrue);
-                    case 203:
-                        return narrowTypeByCallExpression(type, expr, assumeTrue);
                     case 207:
-                    case 225:
+                        return narrowTypeByCallExpression(type, expr, assumeTrue);
+                    case 211:
+                    case 229:
                         return narrowType(type, expr.expression, assumeTrue);
-                    case 216:
+                    case 220:
                         return narrowTypeByBinaryExpression(type, expr, assumeTrue);
-                    case 214:
+                    case 218:
                         if (expr.operator === 53) {
                             return narrowType(type, expr.operand, !assumeTrue);
                         }
@@ -54153,69 +57920,78 @@ var ts;
                 if (isMatchingReference(reference, expr)) {
                     return getTypeWithFacts(type, assumePresent ? 2097152 : 262144);
                 }
-                if (isMatchingReferenceDiscriminant(expr, type)) {
-                    return narrowTypeByDiscriminant(type, expr, function (t) { return getTypeWithFacts(t, assumePresent ? 2097152 : 262144); });
+                var access = getDiscriminantPropertyAccess(expr, type);
+                if (access) {
+                    return narrowTypeByDiscriminant(type, access, function (t) { return getTypeWithFacts(t, assumePresent ? 2097152 : 262144); });
                 }
                 return type;
             }
         }
         function getTypeOfSymbolAtLocation(symbol, location) {
             symbol = symbol.exportSymbol || symbol;
-            if (location.kind === 78) {
+            if (location.kind === 79 || location.kind === 80) {
                 if (ts.isRightSideOfQualifiedNameOrPropertyAccess(location)) {
                     location = location.parent;
                 }
-                if (ts.isExpressionNode(location) && !ts.isAssignmentTarget(location)) {
+                if (ts.isExpressionNode(location) && (!ts.isAssignmentTarget(location) || ts.isWriteAccess(location))) {
                     var type = getTypeOfExpression(location);
                     if (getExportSymbolOfValueSymbolIfExported(getNodeLinks(location).resolvedSymbol) === symbol) {
                         return type;
                     }
                 }
             }
-            return getTypeOfSymbol(symbol);
+            if (ts.isDeclarationName(location) && ts.isSetAccessor(location.parent) && getAnnotatedAccessorTypeNode(location.parent)) {
+                return resolveTypeOfAccessors(location.parent.symbol, true);
+            }
+            return getNonMissingTypeOfSymbol(symbol);
         }
         function getControlFlowContainer(node) {
             return ts.findAncestor(node.parent, function (node) {
                 return ts.isFunctionLike(node) && !ts.getImmediatelyInvokedFunctionExpression(node) ||
-                    node.kind === 257 ||
-                    node.kind === 297 ||
-                    node.kind === 163;
+                    node.kind === 261 ||
+                    node.kind === 303 ||
+                    node.kind === 166;
             });
         }
-        function isParameterAssigned(symbol) {
-            var func = ts.getRootDeclaration(symbol.valueDeclaration).parent;
-            var links = getNodeLinks(func);
+        function isSymbolAssigned(symbol) {
+            if (!symbol.valueDeclaration) {
+                return false;
+            }
+            var parent = ts.getRootDeclaration(symbol.valueDeclaration).parent;
+            var links = getNodeLinks(parent);
             if (!(links.flags & 8388608)) {
                 links.flags |= 8388608;
-                if (!hasParentWithAssignmentsMarked(func)) {
-                    markParameterAssignments(func);
+                if (!hasParentWithAssignmentsMarked(parent)) {
+                    markNodeAssignments(parent);
                 }
             }
             return symbol.isAssigned || false;
         }
         function hasParentWithAssignmentsMarked(node) {
-            return !!ts.findAncestor(node.parent, function (node) { return ts.isFunctionLike(node) && !!(getNodeLinks(node).flags & 8388608); });
+            return !!ts.findAncestor(node.parent, function (node) {
+                return (ts.isFunctionLike(node) || ts.isCatchClause(node)) && !!(getNodeLinks(node).flags & 8388608);
+            });
         }
-        function markParameterAssignments(node) {
-            if (node.kind === 78) {
+        function markNodeAssignments(node) {
+            if (node.kind === 79) {
                 if (ts.isAssignmentTarget(node)) {
                     var symbol = getResolvedSymbol(node);
-                    if (symbol.valueDeclaration && ts.getRootDeclaration(symbol.valueDeclaration).kind === 160) {
+                    if (ts.isParameterOrCatchClauseVariable(symbol)) {
                         symbol.isAssigned = true;
                     }
                 }
             }
             else {
-                ts.forEachChild(node, markParameterAssignments);
+                ts.forEachChild(node, markNodeAssignments);
             }
         }
         function isConstVariable(symbol) {
-            return symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0 && getTypeOfSymbol(symbol) !== autoArrayType;
+            return symbol.flags & 3 && (getDeclarationNodeFlagsFromSymbol(symbol) & 2) !== 0;
         }
         function removeOptionalityFromDeclaredType(declaredType, declaration) {
             if (pushTypeResolution(declaration.symbol, 2)) {
                 var annotationIncludesUndefined = strictNullChecks &&
-                    declaration.kind === 160 &&
+                    declaration.kind === 163 &&
                     declaration.initializer &&
                     getFalsyFlags(declaredType) & 32768 &&
                     !(getFalsyFlags(checkExpression(declaration.initializer)) & 32768);
@@ -54227,24 +58003,45 @@ var ts;
                 return declaredType;
             }
         }
-        function isConstraintPosition(node) {
+        function isConstraintPosition(type, node) {
             var parent = node.parent;
-            return parent.kind === 201 ||
-                parent.kind === 203 && parent.expression === node ||
-                parent.kind === 202 && parent.expression === node ||
-                parent.kind === 198 && parent.name === node && !!parent.initializer;
+            return parent.kind === 205 ||
+                parent.kind === 207 && parent.expression === node ||
+                parent.kind === 206 && parent.expression === node &&
+                    !(someType(type, isGenericTypeWithoutNullableConstraint) && isGenericIndexType(getTypeOfExpression(parent.argumentExpression)));
         }
-        function typeHasNullableConstraint(type) {
-            return type.flags & 58982400 && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 98304);
+        function isGenericTypeWithUnionConstraint(type) {
+            return !!(type.flags & 465829888 && getBaseConstraintOrType(type).flags & (98304 | 1048576));
         }
-        function getConstraintForLocation(type, node) {
-            if (type && isConstraintPosition(node) && forEachType(type, typeHasNullableConstraint)) {
-                return mapType(getWidenedType(type), getBaseConstraintOrType);
-            }
-            return type;
+        function isGenericTypeWithoutNullableConstraint(type) {
+            return !!(type.flags & 465829888 && !maybeTypeOfKind(getBaseConstraintOrType(type), 98304));
+        }
+        function hasNonBindingPatternContextualTypeWithNoGenericTypes(node) {
+            var contextualType = (ts.isIdentifier(node) || ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) &&
+                !((ts.isJsxOpeningElement(node.parent) || ts.isJsxSelfClosingElement(node.parent)) && node.parent.tagName === node) &&
+                getContextualType(node, 8);
+            return contextualType && !isGenericType(contextualType);
+        }
+        function getNarrowableTypeForReference(type, reference, checkMode) {
+            var substituteConstraints = !(checkMode && checkMode & 2) &&
+                someType(type, isGenericTypeWithUnionConstraint) &&
+                (isConstraintPosition(type, reference) || hasNonBindingPatternContextualTypeWithNoGenericTypes(reference));
+            return substituteConstraints ? mapType(type, function (t) { return t.flags & 465829888 ? getBaseConstraintOrType(t) : t; }) : type;
         }
         function isExportOrExportExpression(location) {
-            return !!ts.findAncestor(location, function (e) { return e.parent && ts.isExportAssignment(e.parent) && e.parent.expression === e && ts.isEntityNameExpression(e); });
+            return !!ts.findAncestor(location, function (n) {
+                var parent = n.parent;
+                if (parent === undefined) {
+                    return "quit";
+                }
+                if (ts.isExportAssignment(parent)) {
+                    return parent.expression === n && ts.isEntityNameExpression(n);
+                }
+                if (ts.isExportSpecifier(parent)) {
+                    return parent.name === n || parent.propertyName === n;
+                }
+                return false;
+            });
         }
         function markAliasReferenced(symbol, location) {
             if (isNonLocalAlias(symbol, 111551) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) {
@@ -54261,15 +58058,19 @@ var ts;
                 }
             }
         }
-        function checkIdentifier(node) {
+        function checkIdentifier(node, checkMode) {
             var symbol = getResolvedSymbol(node);
             if (symbol === unknownSymbol) {
                 return errorType;
             }
             if (symbol === argumentsSymbol) {
+                if (isInPropertyInitializerOrClassStaticBlock(node)) {
+                    error(node, ts.Diagnostics.arguments_cannot_be_referenced_in_property_initializers);
+                    return errorType;
+                }
                 var container = ts.getContainingFunction(node);
                 if (languageVersion < 2) {
-                    if (container.kind === 209) {
+                    if (container.kind === 213) {
                         error(node, ts.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression);
                     }
                     else if (ts.hasSyntacticModifier(container, 256)) {
@@ -54284,12 +58085,12 @@ var ts;
             }
             var localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
             var sourceSymbol = localOrExportSymbol.flags & 2097152 ? resolveAlias(localOrExportSymbol) : localOrExportSymbol;
-            if (getDeclarationNodeFlagsFromSymbol(sourceSymbol) & 134217728 && isUncalledFunctionReference(node, sourceSymbol)) {
+            if (sourceSymbol.declarations && getDeclarationNodeFlagsFromSymbol(sourceSymbol) & 134217728 && isUncalledFunctionReference(node, sourceSymbol)) {
                 addDeprecatedSuggestion(node, sourceSymbol.declarations, node.escapedText);
             }
             var declaration = localOrExportSymbol.valueDeclaration;
-            if (localOrExportSymbol.flags & 32) {
-                if (declaration.kind === 252
+            if (declaration && localOrExportSymbol.flags & 32) {
+                if (declaration.kind === 256
                     && ts.nodeIsDecorated(declaration)) {
                     var container = ts.getContainingClass(node);
                     while (container !== undefined) {
@@ -54301,11 +58102,11 @@ var ts;
                         container = ts.getContainingClass(container);
                     }
                 }
-                else if (declaration.kind === 221) {
+                else if (declaration.kind === 225) {
                     var container = ts.getThisContainer(node, false);
-                    while (container.kind !== 297) {
+                    while (container.kind !== 303) {
                         if (container.parent === declaration) {
-                            if (container.kind === 163 && ts.hasSyntacticModifier(container, 32)) {
+                            if (ts.isPropertyDeclaration(container) && ts.isStatic(container) || ts.isClassStaticBlockDeclaration(container)) {
                                 getNodeLinks(declaration).flags |= 16777216;
                                 getNodeLinks(node).flags |= 33554432;
                             }
@@ -54316,12 +58117,18 @@ var ts;
                 }
             }
             checkNestedBlockScopedBinding(node, symbol);
-            var type = getConstraintForLocation(getTypeOfSymbol(localOrExportSymbol), node);
+            var type = getTypeOfSymbol(localOrExportSymbol);
             var assignmentKind = ts.getAssignmentTargetKind(node);
             if (assignmentKind) {
                 if (!(localOrExportSymbol.flags & 3) &&
                     !(ts.isInJSFile(node) && localOrExportSymbol.flags & 512)) {
-                    error(node, ts.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable, symbolToString(symbol));
+                    var assignmentError = localOrExportSymbol.flags & 384 ? ts.Diagnostics.Cannot_assign_to_0_because_it_is_an_enum
+                        : localOrExportSymbol.flags & 32 ? ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_class
+                            : localOrExportSymbol.flags & 1536 ? ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_namespace
+                                : localOrExportSymbol.flags & 16 ? ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_function
+                                    : localOrExportSymbol.flags & 2097152 ? ts.Diagnostics.Cannot_assign_to_0_because_it_is_an_import
+                                        : ts.Diagnostics.Cannot_assign_to_0_because_it_is_not_a_variable;
+                    error(node, assignmentError, symbolToString(symbol));
                     return errorType;
                 }
                 if (isReadonlySymbol(localOrExportSymbol)) {
@@ -54341,7 +58148,7 @@ var ts;
                 }
             }
             else if (isAlias) {
-                declaration = ts.find(symbol.declarations, isSomeImportDeclaration);
+                declaration = getDeclarationOfAliasSymbol(symbol);
             }
             else {
                 return type;
@@ -54349,27 +58156,28 @@ var ts;
             if (!declaration) {
                 return type;
             }
-            var isParameter = ts.getRootDeclaration(declaration).kind === 160;
+            type = getNarrowableTypeForReference(type, node, checkMode);
+            var isParameter = ts.getRootDeclaration(declaration).kind === 163;
             var declarationContainer = getControlFlowContainer(declaration);
             var flowContainer = getControlFlowContainer(node);
             var isOuterVariable = flowContainer !== declarationContainer;
             var isSpreadDestructuringAssignmentTarget = node.parent && node.parent.parent && ts.isSpreadAssignment(node.parent) && isDestructuringAssignmentTarget(node.parent.parent);
             var isModuleExports = symbol.flags & 134217728;
-            while (flowContainer !== declarationContainer && (flowContainer.kind === 208 ||
-                flowContainer.kind === 209 || ts.isObjectLiteralOrClassExpressionMethod(flowContainer)) &&
-                (isConstVariable(localOrExportSymbol) || isParameter && !isParameterAssigned(localOrExportSymbol))) {
+            while (flowContainer !== declarationContainer && (flowContainer.kind === 212 ||
+                flowContainer.kind === 213 || ts.isObjectLiteralOrClassExpressionMethodOrAccessor(flowContainer)) &&
+                (isConstVariable(localOrExportSymbol) && type !== autoArrayType || isParameter && !isSymbolAssigned(localOrExportSymbol))) {
                 flowContainer = getControlFlowContainer(flowContainer);
             }
             var assumeInitialized = isParameter || isAlias || isOuterVariable || isSpreadDestructuringAssignmentTarget || isModuleExports || ts.isBindingElement(declaration) ||
                 type !== autoType && type !== autoArrayType && (!strictNullChecks || (type.flags & (3 | 16384)) !== 0 ||
-                    isInTypeQuery(node) || node.parent.kind === 270) ||
-                node.parent.kind === 225 ||
-                declaration.kind === 249 && declaration.exclamationToken ||
+                    isInTypeQuery(node) || node.parent.kind === 274) ||
+                node.parent.kind === 229 ||
+                declaration.kind === 253 && declaration.exclamationToken ||
                 declaration.flags & 8388608;
             var initialType = assumeInitialized ? (isParameter ? removeOptionalityFromDeclaredType(type, declaration) : type) :
                 type === autoType || type === autoArrayType ? undefinedType :
                     getOptionalType(type);
-            var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer, !assumeInitialized);
+            var flowType = getFlowTypeOfReference(node, type, initialType, flowContainer);
             if (!isEvolvingArrayOperationTarget(node) && (type === autoType || type === autoArrayType)) {
                 if (flowType === autoType || flowType === autoArrayType) {
                     if (noImplicitAny) {
@@ -54385,35 +58193,31 @@ var ts;
             }
             return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType;
         }
-        function isInsideFunction(node, threshold) {
-            return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n); });
+        function isInsideFunctionOrInstancePropertyInitializer(node, threshold) {
+            return !!ts.findAncestor(node, function (n) { return n === threshold ? "quit" : ts.isFunctionLike(n) || (n.parent && ts.isPropertyDeclaration(n.parent) && !ts.hasStaticModifier(n.parent) && n.parent.initializer === n); });
         }
         function getPartOfForStatementContainingNode(node, container) {
             return ts.findAncestor(node, function (n) { return n === container ? "quit" : n === container.initializer || n === container.condition || n === container.incrementor || n === container.statement; });
         }
+        function getEnclosingIterationStatement(node) {
+            return ts.findAncestor(node, function (n) { return (!n || ts.nodeStartsNewLexicalEnvironment(n)) ? "quit" : ts.isIterationStatement(n, false); });
+        }
         function checkNestedBlockScopedBinding(node, symbol) {
             if (languageVersion >= 2 ||
                 (symbol.flags & (2 | 32)) === 0 ||
+                !symbol.valueDeclaration ||
                 ts.isSourceFile(symbol.valueDeclaration) ||
-                symbol.valueDeclaration.parent.kind === 287) {
+                symbol.valueDeclaration.parent.kind === 291) {
                 return;
             }
             var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
-            var usedInFunction = isInsideFunction(node.parent, container);
-            var current = container;
-            var containedInIterationStatement = false;
-            while (current && !ts.nodeStartsNewLexicalEnvironment(current)) {
-                if (ts.isIterationStatement(current, false)) {
-                    containedInIterationStatement = true;
-                    break;
-                }
-                current = current.parent;
-            }
-            if (containedInIterationStatement) {
-                if (usedInFunction) {
+            var isCaptured = isInsideFunctionOrInstancePropertyInitializer(node, container);
+            var enclosingIterationStatement = getEnclosingIterationStatement(container);
+            if (enclosingIterationStatement) {
+                if (isCaptured) {
                     var capturesBlockScopeBindingInLoopBody = true;
                     if (ts.isForStatement(container)) {
-                        var varDeclList = ts.getAncestor(symbol.valueDeclaration, 250);
+                        var varDeclList = ts.getAncestor(symbol.valueDeclaration, 254);
                         if (varDeclList && varDeclList.parent === container) {
                             var part = getPartOfForStatementContainingNode(node.parent, container);
                             if (part) {
@@ -54428,18 +58232,18 @@ var ts;
                         }
                     }
                     if (capturesBlockScopeBindingInLoopBody) {
-                        getNodeLinks(current).flags |= 65536;
+                        getNodeLinks(enclosingIterationStatement).flags |= 65536;
                     }
                 }
                 if (ts.isForStatement(container)) {
-                    var varDeclList = ts.getAncestor(symbol.valueDeclaration, 250);
+                    var varDeclList = ts.getAncestor(symbol.valueDeclaration, 254);
                     if (varDeclList && varDeclList.parent === container && isAssignedInBodyOfForStatement(node, container)) {
                         getNodeLinks(symbol.valueDeclaration).flags |= 4194304;
                     }
                 }
                 getNodeLinks(symbol.valueDeclaration).flags |= 524288;
             }
-            if (usedInFunction) {
+            if (isCaptured) {
                 getNodeLinks(symbol.valueDeclaration).flags |= 262144;
             }
         }
@@ -54449,14 +58253,14 @@ var ts;
         }
         function isAssignedInBodyOfForStatement(node, container) {
             var current = node;
-            while (current.parent.kind === 207) {
+            while (current.parent.kind === 211) {
                 current = current.parent;
             }
             var isAssigned = false;
             if (ts.isAssignmentTarget(current)) {
                 isAssigned = true;
             }
-            else if ((current.parent.kind === 214 || current.parent.kind === 215)) {
+            else if ((current.parent.kind === 218 || current.parent.kind === 219)) {
                 var expr = current.parent;
                 isAssigned = expr.operator === 45 || expr.operator === 46;
             }
@@ -54467,7 +58271,7 @@ var ts;
         }
         function captureLexicalThis(node, container) {
             getNodeLinks(node).flags |= 2;
-            if (container.kind === 163 || container.kind === 166) {
+            if (container.kind === 166 || container.kind === 170) {
                 var classNode = container.parent;
                 getNodeLinks(classNode).flags |= 4;
             }
@@ -54495,39 +58299,41 @@ var ts;
                 }
             }
         }
+        function checkThisInStaticClassFieldInitializerInDecoratedClass(thisExpression, container) {
+            if (ts.isPropertyDeclaration(container) && ts.hasStaticModifier(container) &&
+                container.initializer && ts.textRangeContainsPositionInclusive(container.initializer, thisExpression.pos) && ts.length(container.parent.decorators)) {
+                error(thisExpression, ts.Diagnostics.Cannot_use_this_in_a_static_property_initializer_of_a_decorated_class);
+            }
+        }
         function checkThisExpression(node) {
+            var isNodeInTypeQuery = isInTypeQuery(node);
             var container = ts.getThisContainer(node, true);
             var capturedByArrowFunction = false;
-            if (container.kind === 166) {
+            if (container.kind === 170) {
                 checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class);
             }
-            if (container.kind === 209) {
+            if (container.kind === 213) {
                 container = ts.getThisContainer(container, false);
                 capturedByArrowFunction = true;
             }
+            checkThisInStaticClassFieldInitializerInDecoratedClass(node, container);
             switch (container.kind) {
-                case 256:
+                case 260:
                     error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);
                     break;
-                case 255:
+                case 259:
                     error(node, ts.Diagnostics.this_cannot_be_referenced_in_current_location);
                     break;
-                case 166:
+                case 170:
                     if (isInConstructorArgumentInitializer(node, container)) {
                         error(node, ts.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);
                     }
                     break;
-                case 163:
-                case 162:
-                    if (ts.hasSyntacticModifier(container, 32) && !(compilerOptions.target === 99 && compilerOptions.useDefineForClassFields)) {
-                        error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);
-                    }
-                    break;
-                case 158:
+                case 161:
                     error(node, ts.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name);
                     break;
             }
-            if (capturedByArrowFunction && languageVersion < 2) {
+            if (!isNodeInTypeQuery && capturedByArrowFunction && languageVersion < 2) {
                 captureLexicalThis(node, container);
             }
             var type = tryGetThisTypeAt(node, true, container);
@@ -54574,7 +58380,7 @@ var ts;
             }
             if (ts.isClassLike(container.parent)) {
                 var symbol = getSymbolOfNode(container.parent);
-                var type = ts.hasSyntacticModifier(container, 32) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
+                var type = ts.isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
                 return getFlowTypeOfReference(node, type);
             }
             if (ts.isSourceFile(container)) {
@@ -54600,11 +58406,11 @@ var ts;
             }
             if (ts.isClassLike(container.parent)) {
                 var symbol = getSymbolOfNode(container.parent);
-                return ts.hasSyntacticModifier(container, 32) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
+                return ts.isStatic(container) ? getTypeOfSymbol(symbol) : getDeclaredTypeOfSymbol(symbol).thisType;
             }
         }
         function getClassNameFromPrototypeMethod(container) {
-            if (container.kind === 208 &&
+            if (container.kind === 212 &&
                 ts.isBinaryExpression(container.parent) &&
                 ts.getAssignmentDeclarationKind(container.parent) === 3) {
                 return container.parent
@@ -54612,20 +58418,20 @@ var ts;
                     .expression
                     .expression;
             }
-            else if (container.kind === 165 &&
-                container.parent.kind === 200 &&
+            else if (container.kind === 168 &&
+                container.parent.kind === 204 &&
                 ts.isBinaryExpression(container.parent.parent) &&
                 ts.getAssignmentDeclarationKind(container.parent.parent) === 6) {
                 return container.parent.parent.left.expression;
             }
-            else if (container.kind === 208 &&
-                container.parent.kind === 288 &&
-                container.parent.parent.kind === 200 &&
+            else if (container.kind === 212 &&
+                container.parent.kind === 294 &&
+                container.parent.parent.kind === 204 &&
                 ts.isBinaryExpression(container.parent.parent.parent) &&
                 ts.getAssignmentDeclarationKind(container.parent.parent.parent) === 6) {
                 return container.parent.parent.parent.left.expression;
             }
-            else if (container.kind === 208 &&
+            else if (container.kind === 212 &&
                 ts.isPropertyAssignment(container.parent) &&
                 ts.isIdentifier(container.parent.name) &&
                 (container.parent.name.escapedText === "value" || container.parent.name.escapedText === "get" || container.parent.name.escapedText === "set") &&
@@ -54647,7 +58453,7 @@ var ts;
         }
         function getTypeForThisExpressionFromJSDoc(node) {
             var jsdocType = ts.getJSDocType(node);
-            if (jsdocType && jsdocType.kind === 308) {
+            if (jsdocType && jsdocType.kind === 315) {
                 var jsDocFunctionType = jsdocType;
                 if (jsDocFunctionType.parameters.length > 0 &&
                     jsDocFunctionType.parameters[0].name &&
@@ -54661,15 +58467,15 @@ var ts;
             }
         }
         function isInConstructorArgumentInitializer(node, constructorDecl) {
-            return !!ts.findAncestor(node, function (n) { return ts.isFunctionLikeDeclaration(n) ? "quit" : n.kind === 160 && n.parent === constructorDecl; });
+            return !!ts.findAncestor(node, function (n) { return ts.isFunctionLikeDeclaration(n) ? "quit" : n.kind === 163 && n.parent === constructorDecl; });
         }
         function checkSuperExpression(node) {
-            var isCallExpression = node.parent.kind === 203 && node.parent.expression === node;
+            var isCallExpression = node.parent.kind === 207 && node.parent.expression === node;
             var immediateContainer = ts.getSuperContainer(node, true);
             var container = immediateContainer;
             var needToCaptureLexicalThis = false;
             if (!isCallExpression) {
-                while (container && container.kind === 209) {
+                while (container && container.kind === 213) {
                     container = ts.getSuperContainer(container, true);
                     needToCaptureLexicalThis = languageVersion < 2;
                 }
@@ -54677,14 +58483,14 @@ var ts;
             var canUseSuperExpression = isLegalUsageOfSuperExpression(container);
             var nodeCheckFlag = 0;
             if (!canUseSuperExpression) {
-                var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 158; });
-                if (current && current.kind === 158) {
+                var current = ts.findAncestor(node, function (n) { return n === container ? "quit" : n.kind === 161; });
+                if (current && current.kind === 161) {
                     error(node, ts.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name);
                 }
                 else if (isCallExpression) {
                     error(node, ts.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors);
                 }
-                else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 200)) {
+                else if (!container || !container.parent || !(ts.isClassLike(container.parent) || container.parent.kind === 204)) {
                     error(node, ts.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions);
                 }
                 else {
@@ -54692,17 +58498,26 @@ var ts;
                 }
                 return errorType;
             }
-            if (!isCallExpression && immediateContainer.kind === 166) {
+            if (!isCallExpression && immediateContainer.kind === 170) {
                 checkThisBeforeSuper(node, container, ts.Diagnostics.super_must_be_called_before_accessing_a_property_of_super_in_the_constructor_of_a_derived_class);
             }
-            if (ts.hasSyntacticModifier(container, 32) || isCallExpression) {
+            if (ts.isStatic(container) || isCallExpression) {
                 nodeCheckFlag = 512;
+                if (!isCallExpression &&
+                    languageVersion >= 2 && languageVersion <= 8 &&
+                    (ts.isPropertyDeclaration(container) || ts.isClassStaticBlockDeclaration(container))) {
+                    ts.forEachEnclosingBlockScopeContainer(node.parent, function (current) {
+                        if (!ts.isSourceFile(current) || ts.isExternalOrCommonJsModule(current)) {
+                            getNodeLinks(current).flags |= 134217728;
+                        }
+                    });
+                }
             }
             else {
                 nodeCheckFlag = 256;
             }
             getNodeLinks(node).flags |= nodeCheckFlag;
-            if (container.kind === 165 && ts.hasSyntacticModifier(container, 256)) {
+            if (container.kind === 168 && ts.hasSyntacticModifier(container, 256)) {
                 if (ts.isSuperProperty(node.parent) && ts.isAssignmentTarget(node.parent)) {
                     getNodeLinks(container).flags |= 4096;
                 }
@@ -54713,7 +58528,7 @@ var ts;
             if (needToCaptureLexicalThis) {
                 captureLexicalThis(node.parent, container);
             }
-            if (container.parent.kind === 200) {
+            if (container.parent.kind === 204) {
                 if (languageVersion < 2) {
                     error(node, ts.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher);
                     return errorType;
@@ -54732,7 +58547,7 @@ var ts;
             if (!baseClassType) {
                 return errorType;
             }
-            if (container.kind === 166 && isInConstructorArgumentInitializer(node, container)) {
+            if (container.kind === 170 && isInConstructorArgumentInitializer(node, container)) {
                 error(node, ts.Diagnostics.super_cannot_be_referenced_in_constructor_arguments);
                 return errorType;
             }
@@ -54744,24 +58559,26 @@ var ts;
                     return false;
                 }
                 if (isCallExpression) {
-                    return container.kind === 166;
+                    return container.kind === 170;
                 }
                 else {
-                    if (ts.isClassLike(container.parent) || container.parent.kind === 200) {
-                        if (ts.hasSyntacticModifier(container, 32)) {
-                            return container.kind === 165 ||
-                                container.kind === 164 ||
+                    if (ts.isClassLike(container.parent) || container.parent.kind === 204) {
+                        if (ts.isStatic(container)) {
+                            return container.kind === 168 ||
                                 container.kind === 167 ||
-                                container.kind === 168;
+                                container.kind === 171 ||
+                                container.kind === 172 ||
+                                container.kind === 166 ||
+                                container.kind === 169;
                         }
                         else {
-                            return container.kind === 165 ||
-                                container.kind === 164 ||
+                            return container.kind === 168 ||
                                 container.kind === 167 ||
-                                container.kind === 168 ||
-                                container.kind === 163 ||
-                                container.kind === 162 ||
-                                container.kind === 166;
+                                container.kind === 171 ||
+                                container.kind === 172 ||
+                                container.kind === 166 ||
+                                container.kind === 165 ||
+                                container.kind === 170;
                         }
                     }
                 }
@@ -54769,10 +58586,10 @@ var ts;
             }
         }
         function getContainingObjectLiteral(func) {
-            return (func.kind === 165 ||
-                func.kind === 167 ||
-                func.kind === 168) && func.parent.kind === 200 ? func.parent :
-                func.kind === 208 && func.parent.kind === 288 ? func.parent.parent :
+            return (func.kind === 168 ||
+                func.kind === 171 ||
+                func.kind === 172) && func.parent.kind === 204 ? func.parent :
+                func.kind === 212 && func.parent.kind === 294 ? func.parent.parent :
                     undefined;
         }
         function getThisTypeArgument(type) {
@@ -54784,7 +58601,7 @@ var ts;
             });
         }
         function getContextualThisParameterType(func) {
-            if (func.kind === 209) {
+            if (func.kind === 213) {
                 return undefined;
             }
             if (isContextSensitiveFunctionOrObjectLiteralMethod(func)) {
@@ -54808,7 +58625,7 @@ var ts;
                         if (thisType) {
                             return instantiateType(thisType, getMapperFromContext(getInferenceContext(containingLiteral)));
                         }
-                        if (literal.parent.kind !== 288) {
+                        if (literal.parent.kind !== 294) {
                             break;
                         }
                         literal = literal.parent.parent;
@@ -54817,7 +58634,7 @@ var ts;
                     return getWidenedType(contextualType ? getNonNullableType(contextualType) : checkExpressionCached(containingLiteral));
                 }
                 var parent = ts.walkUpParenthesizedExpressions(func.parent);
-                if (parent.kind === 216 && parent.operatorToken.kind === 62) {
+                if (parent.kind === 220 && parent.operatorToken.kind === 63) {
                     var target = parent.left;
                     if (ts.isAccessExpression(target)) {
                         var expression = target.expression;
@@ -54868,12 +58685,12 @@ var ts;
                 return getTypeFromTypeNode(typeNode);
             }
             switch (declaration.kind) {
-                case 160:
+                case 163:
                     return getContextuallyTypedParameterType(declaration);
-                case 198:
+                case 202:
                     return getContextualTypeForBindingElement(declaration);
-                case 163:
-                    if (ts.hasSyntacticModifier(declaration, 32)) {
+                case 166:
+                    if (ts.isStatic(declaration)) {
                         return getContextualTypeForStaticPropertyDeclaration(declaration);
                     }
             }
@@ -54882,10 +58699,10 @@ var ts;
             var parent = declaration.parent.parent;
             var name = declaration.propertyName || declaration.name;
             var parentType = getContextualTypeForVariableLikeDeclaration(parent) ||
-                parent.kind !== 198 && parent.initializer && checkDeclarationInitializer(parent);
+                parent.kind !== 202 && parent.initializer && checkDeclarationInitializer(parent);
             if (!parentType || ts.isBindingPattern(name) || ts.isComputedNonLiteralName(name))
                 return undefined;
-            if (parent.name.kind === 197) {
+            if (parent.name.kind === 201) {
                 var index = ts.indexOfNode(declaration.parent.elements, declaration);
                 if (index < 0)
                     return undefined;
@@ -54931,7 +58748,7 @@ var ts;
                         contextualReturnType = iterationTypes.returnType;
                     }
                     if (functionFlags & 2) {
-                        var contextualAwaitedType = mapType(contextualReturnType, getAwaitedType);
+                        var contextualAwaitedType = mapType(contextualReturnType, getAwaitedTypeNoAlias);
                         return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]);
                     }
                     return contextualReturnType;
@@ -54942,7 +58759,7 @@ var ts;
         function getContextualTypeForAwaitOperand(node, contextFlags) {
             var contextualType = getContextualType(node, contextFlags);
             if (contextualType) {
-                var contextualAwaitedType = getAwaitedType(contextualType);
+                var contextualAwaitedType = getAwaitedTypeNoAlias(contextualType);
                 return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]);
             }
             return undefined;
@@ -54991,6 +58808,10 @@ var ts;
             if (signature && !isResolvingReturnTypeOfSignature(signature)) {
                 return getReturnTypeOfSignature(signature);
             }
+            var iife = ts.getImmediatelyInvokedFunctionExpression(functionDecl);
+            if (iife) {
+                return getContextualType(iife);
+            }
             return undefined;
         }
         function getContextualTypeForArgument(callTarget, arg) {
@@ -54999,14 +58820,22 @@ var ts;
             return argIndex === -1 ? undefined : getContextualTypeForArgumentAtIndex(callTarget, argIndex);
         }
         function getContextualTypeForArgumentAtIndex(callTarget, argIndex) {
+            if (ts.isImportCall(callTarget)) {
+                return argIndex === 0 ? stringType :
+                    argIndex === 1 ? getGlobalImportCallOptionsType(false) :
+                        anyType;
+            }
             var signature = getNodeLinks(callTarget).resolvedSignature === resolvingSignature ? resolvingSignature : getResolvedSignature(callTarget);
             if (ts.isJsxOpeningLikeElement(callTarget) && argIndex === 0) {
                 return getEffectiveFirstArgumentForJsxSignature(signature, callTarget);
             }
-            return getTypeAtPosition(signature, argIndex);
+            var restIndex = signature.parameters.length - 1;
+            return signatureHasRestParameter(signature) && argIndex >= restIndex ?
+                getIndexedAccessType(getTypeOfSymbol(signature.parameters[restIndex]), getNumberLiteralType(argIndex - restIndex), 256) :
+                getTypeAtPosition(signature, argIndex);
         }
         function getContextualTypeForSubstitutionExpression(template, substitutionExpression) {
-            if (template.parent.kind === 205) {
+            if (template.parent.kind === 209) {
                 return getContextualTypeForArgument(template.parent, substitutionExpression);
             }
             return undefined;
@@ -55015,10 +58844,10 @@ var ts;
             var binaryExpression = node.parent;
             var left = binaryExpression.left, operatorToken = binaryExpression.operatorToken, right = binaryExpression.right;
             switch (operatorToken.kind) {
-                case 62:
-                case 75:
-                case 74:
+                case 63:
                 case 76:
+                case 75:
+                case 77:
                     return node === right ? getContextualTypeForAssignmentDeclaration(binaryExpression) : undefined;
                 case 56:
                 case 60:
@@ -55032,28 +58861,54 @@ var ts;
                     return undefined;
             }
         }
+        function getSymbolForExpression(e) {
+            if (e.symbol) {
+                return e.symbol;
+            }
+            if (ts.isIdentifier(e)) {
+                return getResolvedSymbol(e);
+            }
+            if (ts.isPropertyAccessExpression(e)) {
+                var lhsType = getTypeOfExpression(e.expression);
+                return ts.isPrivateIdentifier(e.name) ? tryGetPrivateIdentifierPropertyOfType(lhsType, e.name) : getPropertyOfType(lhsType, e.name.escapedText);
+            }
+            return undefined;
+            function tryGetPrivateIdentifierPropertyOfType(type, id) {
+                var lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(id.escapedText, id);
+                return lexicallyScopedSymbol && getPrivateIdentifierPropertyOfType(type, lexicallyScopedSymbol);
+            }
+        }
         function getContextualTypeForAssignmentDeclaration(binaryExpression) {
+            var _a, _b;
             var kind = ts.getAssignmentDeclarationKind(binaryExpression);
             switch (kind) {
                 case 0:
-                    return getTypeOfExpression(binaryExpression.left);
+                case 4:
+                    var lhsSymbol = getSymbolForExpression(binaryExpression.left);
+                    var decl = lhsSymbol && lhsSymbol.valueDeclaration;
+                    if (decl && (ts.isPropertyDeclaration(decl) || ts.isPropertySignature(decl))) {
+                        var overallAnnotation = ts.getEffectiveTypeAnnotationNode(decl);
+                        return (overallAnnotation && instantiateType(getTypeFromTypeNode(overallAnnotation), getSymbolLinks(lhsSymbol).mapper)) ||
+                            (decl.initializer && getTypeOfExpression(binaryExpression.left));
+                    }
+                    if (kind === 0) {
+                        return getTypeOfExpression(binaryExpression.left);
+                    }
+                    return getContextualTypeForThisPropertyAssignment(binaryExpression);
                 case 5:
-                case 1:
-                case 6:
-                case 3:
                     if (isPossiblyAliasedThisProperty(binaryExpression, kind)) {
-                        return getContextualTypeForThisPropertyAssignment(binaryExpression, kind);
+                        return getContextualTypeForThisPropertyAssignment(binaryExpression);
                     }
                     else if (!binaryExpression.left.symbol) {
                         return getTypeOfExpression(binaryExpression.left);
                     }
                     else {
-                        var decl = binaryExpression.left.symbol.valueDeclaration;
-                        if (!decl) {
+                        var decl_1 = binaryExpression.left.symbol.valueDeclaration;
+                        if (!decl_1) {
                             return undefined;
                         }
                         var lhs = ts.cast(binaryExpression.left, ts.isAccessExpression);
-                        var overallAnnotation = ts.getEffectiveTypeAnnotationNode(decl);
+                        var overallAnnotation = ts.getEffectiveTypeAnnotationNode(decl_1);
                         if (overallAnnotation) {
                             return getTypeFromTypeNode(overallAnnotation);
                         }
@@ -55061,21 +58916,26 @@ var ts;
                             var id = lhs.expression;
                             var parentSymbol = resolveName(id, id.escapedText, 111551, undefined, id.escapedText, true);
                             if (parentSymbol) {
-                                var annotated = parentSymbol.valueDeclaration && ts.getEffectiveTypeAnnotationNode(parentSymbol.valueDeclaration);
-                                if (annotated) {
+                                var annotated_1 = parentSymbol.valueDeclaration && ts.getEffectiveTypeAnnotationNode(parentSymbol.valueDeclaration);
+                                if (annotated_1) {
                                     var nameStr = ts.getElementOrPropertyAccessName(lhs);
                                     if (nameStr !== undefined) {
-                                        return getTypeOfPropertyOfContextualType(getTypeFromTypeNode(annotated), nameStr);
+                                        return getTypeOfPropertyOfContextualType(getTypeFromTypeNode(annotated_1), nameStr);
                                     }
                                 }
                                 return undefined;
                             }
                         }
-                        return ts.isInJSFile(decl) ? undefined : getTypeOfExpression(binaryExpression.left);
+                        return ts.isInJSFile(decl_1) ? undefined : getTypeOfExpression(binaryExpression.left);
                     }
+                case 1:
+                case 6:
+                case 3:
+                    var valueDeclaration = (_a = binaryExpression.left.symbol) === null || _a === void 0 ? void 0 : _a.valueDeclaration;
                 case 2:
-                case 4:
-                    return getContextualTypeForThisPropertyAssignment(binaryExpression, kind);
+                    valueDeclaration || (valueDeclaration = (_b = binaryExpression.symbol) === null || _b === void 0 ? void 0 : _b.valueDeclaration);
+                    var annotated = valueDeclaration && ts.getEffectiveTypeAnnotationNode(valueDeclaration);
+                    return annotated ? getTypeFromTypeNode(annotated) : undefined;
                 case 7:
                 case 8:
                 case 9:
@@ -55096,7 +58956,7 @@ var ts;
             var symbol = resolveName(declaration.left, name, 111551, undefined, undefined, true, true);
             return ts.isThisInitializedDeclaration(symbol === null || symbol === void 0 ? void 0 : symbol.valueDeclaration);
         }
-        function getContextualTypeForThisPropertyAssignment(binaryExpression, kind) {
+        function getContextualTypeForThisPropertyAssignment(binaryExpression) {
             if (!binaryExpression.symbol)
                 return getTypeOfExpression(binaryExpression.left);
             if (binaryExpression.symbol.valueDeclaration) {
@@ -55108,8 +58968,6 @@ var ts;
                     }
                 }
             }
-            if (kind === 2)
-                return undefined;
             var thisAccess = ts.cast(binaryExpression.left, ts.isAccessExpression);
             if (!ts.isObjectLiteralMethod(ts.getThisContainer(thisAccess.expression, false))) {
                 return undefined;
@@ -55123,10 +58981,11 @@ var ts;
         }
         function getTypeOfPropertyOfContextualType(type, name) {
             return mapType(type, function (t) {
+                var _a;
                 if (isGenericMappedType(t)) {
                     var constraint = getConstraintTypeFromMappedType(t);
                     var constraintOfConstraint = getBaseConstraintOfType(constraint) || constraint;
-                    var propertyNameType = getLiteralType(ts.unescapeLeadingUnderscores(name));
+                    var propertyNameType = getStringLiteralType(ts.unescapeLeadingUnderscores(name));
                     if (isTypeAssignableTo(propertyNameType, constraintOfConstraint)) {
                         return substituteIndexedMappedType(t, propertyNameType);
                     }
@@ -55142,15 +59001,11 @@ var ts;
                             return restType;
                         }
                     }
-                    return isNumericLiteralName(name) && getIndexTypeOfContextualType(t, 1) ||
-                        getIndexTypeOfContextualType(t, 0);
+                    return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), getStringLiteralType(ts.unescapeLeadingUnderscores(name)))) === null || _a === void 0 ? void 0 : _a.type;
                 }
                 return undefined;
             }, true);
         }
-        function getIndexTypeOfContextualType(type, kind) {
-            return mapType(type, function (t) { return getIndexTypeOfStructuredType(t, kind); }, true);
-        }
         function getContextualTypeForObjectLiteralMethod(node, contextFlags) {
             ts.Debug.assert(ts.isObjectLiteralMethod(node));
             if (node.flags & 16777216) {
@@ -55160,17 +59015,19 @@ var ts;
         }
         function getContextualTypeForObjectLiteralElement(element, contextFlags) {
             var objectLiteral = element.parent;
+            var propertyAssignmentType = ts.isPropertyAssignment(element) && getContextualTypeForVariableLikeDeclaration(element);
+            if (propertyAssignmentType) {
+                return propertyAssignmentType;
+            }
             var type = getApparentTypeOfContextualType(objectLiteral, contextFlags);
             if (type) {
                 if (hasBindableName(element)) {
-                    var symbolName_3 = getSymbolOfNode(element).escapedName;
-                    var propertyType = getTypeOfPropertyOfContextualType(type, symbolName_3);
-                    if (propertyType) {
-                        return propertyType;
-                    }
+                    return getTypeOfPropertyOfContextualType(type, getSymbolOfNode(element).escapedName);
+                }
+                if (element.name) {
+                    var nameType_2 = getLiteralTypeFromPropertyName(element.name);
+                    return mapType(type, function (t) { var _a; return (_a = findApplicableIndexInfo(getIndexInfosOfStructuredType(t), nameType_2)) === null || _a === void 0 ? void 0 : _a.type; }, true);
                 }
-                return isNumericName(element.name) && getIndexTypeOfContextualType(type, 1) ||
-                    getIndexTypeOfContextualType(type, 0);
             }
             return undefined;
         }
@@ -55193,7 +59050,7 @@ var ts;
             var childFieldType = getTypeOfPropertyOfContextualType(attributesType, jsxChildrenPropertyName);
             return childFieldType && (realChildren.length === 1 ? childFieldType : mapType(childFieldType, function (t) {
                 if (isArrayLikeType(t)) {
-                    return getIndexedAccessType(t, getLiteralType(childIndex));
+                    return getIndexedAccessType(t, getNumberLiteralType(childIndex));
                 }
                 else {
                     return t;
@@ -55226,25 +59083,25 @@ var ts;
                 case 8:
                 case 9:
                 case 14:
-                case 109:
-                case 94:
-                case 103:
-                case 78:
-                case 150:
+                case 110:
+                case 95:
+                case 104:
+                case 79:
+                case 152:
                     return true;
-                case 201:
-                case 207:
+                case 205:
+                case 211:
                     return isPossiblyDiscriminantValue(node.expression);
-                case 283:
+                case 287:
                     return !node.expression || isPossiblyDiscriminantValue(node.expression);
             }
             return false;
         }
         function discriminateContextualTypeByObjectMembers(node, contextualType) {
-            return discriminateTypeByDiscriminableItems(contextualType, ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 288 && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return checkExpression(prop.initializer); }, prop.symbol.escapedName]; }), isTypeAssignableTo, contextualType);
+            return getMatchingUnionConstituentForObjectLiteral(contextualType, node) || discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 294 && isPossiblyDiscriminantValue(p.initializer) && isDiscriminantProperty(contextualType, p.symbol.escapedName); }), function (prop) { return [function () { return getContextFreeTypeOfExpression(prop.initializer); }, prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
         }
         function discriminateContextualTypeByJSXAttributes(node, contextualType) {
-            return discriminateTypeByDiscriminableItems(contextualType, ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 280 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return checkExpression(prop.initializer); }), prop.symbol.escapedName]; }), isTypeAssignableTo, contextualType);
+            return discriminateTypeByDiscriminableItems(contextualType, ts.concatenate(ts.map(ts.filter(node.properties, function (p) { return !!p.symbol && p.kind === 284 && isDiscriminantProperty(contextualType, p.symbol.escapedName) && (!p.initializer || isPossiblyDiscriminantValue(p.initializer)); }), function (prop) { return [!prop.initializer ? (function () { return trueType; }) : (function () { return getContextFreeTypeOfExpression(prop.initializer); }), prop.symbol.escapedName]; }), ts.map(ts.filter(getPropertiesOfType(contextualType), function (s) { var _a; return !!(s.flags & 16777216) && !!((_a = node === null || node === void 0 ? void 0 : node.symbol) === null || _a === void 0 ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName); }), function (s) { return [function () { return undefinedType; }, s.escapedName]; })), isTypeAssignableTo, contextualType);
         }
         function getApparentTypeOfContextualType(node, contextFlags) {
             var contextualType = ts.isObjectLiteralMethod(node) ?
@@ -55253,15 +59110,9 @@ var ts;
             var instantiatedType = instantiateContextualType(contextualType, node, contextFlags);
             if (instantiatedType && !(contextFlags && contextFlags & 2 && instantiatedType.flags & 8650752)) {
                 var apparentType = mapType(instantiatedType, getApparentType, true);
-                if (apparentType.flags & 1048576) {
-                    if (ts.isObjectLiteralExpression(node)) {
-                        return discriminateContextualTypeByObjectMembers(node, apparentType);
-                    }
-                    else if (ts.isJsxAttributes(node)) {
-                        return discriminateContextualTypeByJSXAttributes(node, apparentType);
-                    }
-                }
-                return apparentType;
+                return apparentType.flags & 1048576 && ts.isObjectLiteralExpression(node) ? discriminateContextualTypeByObjectMembers(node, apparentType) :
+                    apparentType.flags & 1048576 && ts.isJsxAttributes(node) ? discriminateContextualTypeByJSXAttributes(node, apparentType) :
+                        apparentType;
             }
         }
         function instantiateContextualType(contextualType, node, contextFlags) {
@@ -55299,58 +59150,57 @@ var ts;
             }
             var parent = node.parent;
             switch (parent.kind) {
-                case 249:
-                case 160:
+                case 253:
                 case 163:
-                case 162:
-                case 198:
+                case 166:
+                case 165:
+                case 202:
                     return getContextualTypeForInitializerExpression(node, contextFlags);
-                case 209:
-                case 242:
+                case 213:
+                case 246:
                     return getContextualTypeForReturnExpression(node);
-                case 219:
+                case 223:
                     return getContextualTypeForYieldOperand(parent);
-                case 213:
+                case 217:
                     return getContextualTypeForAwaitOperand(parent, contextFlags);
-                case 203:
-                    if (parent.expression.kind === 99) {
-                        return stringType;
-                    }
-                case 204:
+                case 207:
+                case 208:
                     return getContextualTypeForArgument(parent, node);
-                case 206:
-                case 224:
+                case 210:
+                case 228:
                     return ts.isConstTypeReference(parent.type) ? tryFindWhenConstTypeReference(parent) : getTypeFromTypeNode(parent.type);
-                case 216:
+                case 220:
                     return getContextualTypeForBinaryOperand(node, contextFlags);
-                case 288:
-                case 289:
+                case 294:
+                case 295:
                     return getContextualTypeForObjectLiteralElement(parent, contextFlags);
-                case 290:
-                    return getApparentTypeOfContextualType(parent.parent, contextFlags);
-                case 199: {
+                case 296:
+                    return getContextualType(parent.parent, contextFlags);
+                case 203: {
                     var arrayLiteral = parent;
                     var type = getApparentTypeOfContextualType(arrayLiteral, contextFlags);
                     return getContextualTypeForElementExpression(type, ts.indexOfNode(arrayLiteral.elements, node));
                 }
-                case 217:
+                case 221:
                     return getContextualTypeForConditionalOperand(node, contextFlags);
-                case 228:
-                    ts.Debug.assert(parent.parent.kind === 218);
+                case 232:
+                    ts.Debug.assert(parent.parent.kind === 222);
                     return getContextualTypeForSubstitutionExpression(parent.parent, node);
-                case 207: {
+                case 211: {
                     var tag = ts.isInJSFile(parent) ? ts.getJSDocTypeTag(parent) : undefined;
-                    return tag ? getTypeFromTypeNode(tag.typeExpression.type) : getContextualType(parent, contextFlags);
+                    return !tag ? getContextualType(parent, contextFlags) :
+                        ts.isJSDocTypeTag(tag) && ts.isConstTypeReference(tag.typeExpression.type) ? tryFindWhenConstTypeReference(parent) :
+                            getTypeFromTypeNode(tag.typeExpression.type);
                 }
-                case 225:
+                case 229:
                     return getContextualType(parent, contextFlags);
-                case 283:
+                case 287:
                     return getContextualTypeForJsxExpression(parent);
-                case 280:
-                case 282:
+                case 284:
+                case 286:
                     return getContextualTypeForJsxAttribute(parent);
-                case 275:
-                case 274:
+                case 279:
+                case 278:
                     return getContextualJsxElementAttributesType(parent, contextFlags);
             }
             return undefined;
@@ -55377,15 +59227,15 @@ var ts;
             var propsType = getTypeOfFirstParameterOfSignatureWithFallback(sig, unknownType);
             propsType = getJsxManagedAttributesFromLocatedAttributes(context, getJsxNamespaceAt(context), propsType);
             var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
-            if (intrinsicAttribs !== errorType) {
+            if (!isErrorType(intrinsicAttribs)) {
                 propsType = intersectTypes(intrinsicAttribs, propsType);
             }
             return propsType;
         }
         function getJsxPropsTypeForSignatureFromMember(sig, forcedLookupLocation) {
-            if (sig.unionSignatures) {
+            if (sig.compositeSignatures) {
                 var results = [];
-                for (var _i = 0, _a = sig.unionSignatures; _i < _a.length; _i++) {
+                for (var _i = 0, _a = sig.compositeSignatures; _i < _a.length; _i++) {
                     var signature = _a[_i];
                     var instance = getReturnTypeOfSignature(signature);
                     if (isTypeAny(instance)) {
@@ -55459,7 +59309,7 @@ var ts;
             else {
                 var apparentAttributesType = attributesType;
                 var intrinsicClassAttribs = getJsxType(JsxNames.IntrinsicClassAttributes, context);
-                if (intrinsicClassAttribs !== errorType) {
+                if (!isErrorType(intrinsicClassAttribs)) {
                     var typeParams = getLocalTypeParametersOfClassOrInterfaceOrTypeAlias(intrinsicClassAttribs.symbol);
                     var hostClassType = getReturnTypeOfSignature(sig);
                     apparentAttributesType = intersectTypes(typeParams
@@ -55467,20 +59317,91 @@ var ts;
                         : intrinsicClassAttribs, apparentAttributesType);
                 }
                 var intrinsicAttribs = getJsxType(JsxNames.IntrinsicAttributes, context);
-                if (intrinsicAttribs !== errorType) {
+                if (!isErrorType(intrinsicAttribs)) {
                     apparentAttributesType = intersectTypes(intrinsicAttribs, apparentAttributesType);
                 }
                 return apparentAttributesType;
             }
         }
-        function getContextualCallSignature(type, node) {
-            var signatures = getSignaturesOfType(type, 0);
-            if (signatures.length === 1) {
-                var signature = signatures[0];
-                if (!isAritySmaller(signature, node)) {
-                    return signature;
+        function getIntersectedSignatures(signatures) {
+            return ts.getStrictOptionValue(compilerOptions, "noImplicitAny")
+                ? ts.reduceLeft(signatures, function (left, right) {
+                    return left === right || !left ? left
+                        : compareTypeParametersIdentical(left.typeParameters, right.typeParameters) ? combineSignaturesOfIntersectionMembers(left, right)
+                            : undefined;
+                })
+                : undefined;
+        }
+        function combineIntersectionThisParam(left, right, mapper) {
+            if (!left || !right) {
+                return left || right;
+            }
+            var thisType = getUnionType([getTypeOfSymbol(left), instantiateType(getTypeOfSymbol(right), mapper)]);
+            return createSymbolWithType(left, thisType);
+        }
+        function combineIntersectionParameters(left, right, mapper) {
+            var leftCount = getParameterCount(left);
+            var rightCount = getParameterCount(right);
+            var longest = leftCount >= rightCount ? left : right;
+            var shorter = longest === left ? right : left;
+            var longestCount = longest === left ? leftCount : rightCount;
+            var eitherHasEffectiveRest = (hasEffectiveRestParameter(left) || hasEffectiveRestParameter(right));
+            var needsExtraRestElement = eitherHasEffectiveRest && !hasEffectiveRestParameter(longest);
+            var params = new Array(longestCount + (needsExtraRestElement ? 1 : 0));
+            for (var i = 0; i < longestCount; i++) {
+                var longestParamType = tryGetTypeAtPosition(longest, i);
+                if (longest === right) {
+                    longestParamType = instantiateType(longestParamType, mapper);
+                }
+                var shorterParamType = tryGetTypeAtPosition(shorter, i) || unknownType;
+                if (shorter === right) {
+                    shorterParamType = instantiateType(shorterParamType, mapper);
                 }
+                var unionParamType = getUnionType([longestParamType, shorterParamType]);
+                var isRestParam = eitherHasEffectiveRest && !needsExtraRestElement && i === (longestCount - 1);
+                var isOptional = i >= getMinArgumentCount(longest) && i >= getMinArgumentCount(shorter);
+                var leftName = i >= leftCount ? undefined : getParameterNameAtPosition(left, i);
+                var rightName = i >= rightCount ? undefined : getParameterNameAtPosition(right, i);
+                var paramName = leftName === rightName ? leftName :
+                    !leftName ? rightName :
+                        !rightName ? leftName :
+                            undefined;
+                var paramSymbol = createSymbol(1 | (isOptional && !isRestParam ? 16777216 : 0), paramName || "arg".concat(i));
+                paramSymbol.type = isRestParam ? createArrayType(unionParamType) : unionParamType;
+                params[i] = paramSymbol;
+            }
+            if (needsExtraRestElement) {
+                var restParamSymbol = createSymbol(1, "args");
+                restParamSymbol.type = createArrayType(getTypeAtPosition(shorter, longestCount));
+                if (shorter === right) {
+                    restParamSymbol.type = instantiateType(restParamSymbol.type, mapper);
+                }
+                params[longestCount] = restParamSymbol;
+            }
+            return params;
+        }
+        function combineSignaturesOfIntersectionMembers(left, right) {
+            var typeParams = left.typeParameters || right.typeParameters;
+            var paramMapper;
+            if (left.typeParameters && right.typeParameters) {
+                paramMapper = createTypeMapper(right.typeParameters, left.typeParameters);
+            }
+            var declaration = left.declaration;
+            var params = combineIntersectionParameters(left, right, paramMapper);
+            var thisParam = combineIntersectionThisParam(left.thisParameter, right.thisParameter, paramMapper);
+            var minArgCount = Math.max(left.minArgumentCount, right.minArgumentCount);
+            var result = createSignature(declaration, typeParams, thisParam, params, undefined, undefined, minArgCount, (left.flags | right.flags) & 39);
+            result.compositeKind = 2097152;
+            result.compositeSignatures = ts.concatenate(left.compositeKind === 2097152 && left.compositeSignatures || [left], [right]);
+            if (paramMapper) {
+                result.mapper = left.compositeKind === 2097152 && left.mapper && left.compositeSignatures ? combineTypeMappers(left.mapper, paramMapper) : paramMapper;
             }
+            return result;
+        }
+        function getContextualCallSignature(type, node) {
+            var signatures = getSignaturesOfType(type, 0);
+            var applicableByArity = ts.filter(signatures, function (s) { return !isAritySmaller(s, node); });
+            return applicableByArity.length === 1 ? applicableByArity[0] : getIntersectedSignatures(applicableByArity);
         }
         function isAritySmaller(signature, target) {
             var targetParameterCount = 0;
@@ -55495,16 +59416,13 @@ var ts;
             }
             return !hasEffectiveRestParameter(signature) && getParameterCount(signature) < targetParameterCount;
         }
-        function isFunctionExpressionOrArrowFunction(node) {
-            return node.kind === 208 || node.kind === 209;
-        }
         function getContextualSignatureForFunctionLikeDeclaration(node) {
-            return isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node)
+            return ts.isFunctionExpressionOrArrowFunction(node) || ts.isObjectLiteralMethod(node)
                 ? getContextualSignature(node)
                 : undefined;
         }
         function getContextualSignature(node) {
-            ts.Debug.assert(node.kind !== 165 || ts.isObjectLiteralMethod(node));
+            ts.Debug.assert(node.kind !== 168 || ts.isObjectLiteralMethod(node));
             var typeTagSignature = getSignatureOfTypeTag(node);
             if (typeTagSignature) {
                 return typeTagSignature;
@@ -55518,8 +59436,8 @@ var ts;
             }
             var signatureList;
             var types = type.types;
-            for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
-                var current = types_20[_i];
+            for (var _i = 0, types_19 = types; _i < types_19.length; _i++) {
+                var current = types_19[_i];
                 var signature = getContextualCallSignature(current, node);
                 if (signature) {
                     if (!signatureList) {
@@ -55548,8 +59466,8 @@ var ts;
             return node.isSpread ? getIndexedAccessType(node.type, numberType) : node.type;
         }
         function hasDefaultValue(node) {
-            return (node.kind === 198 && !!node.initializer) ||
-                (node.kind === 216 && node.operatorToken.kind === 62);
+            return (node.kind === 202 && !!node.initializer) ||
+                (node.kind === 220 && node.operatorToken.kind === 63);
         }
         function checkArrayLiteral(node, checkMode, forceTuple) {
             var elements = node.elements;
@@ -55559,9 +59477,10 @@ var ts;
             var contextualType = getApparentTypeOfContextualType(node);
             var inDestructuringPattern = ts.isAssignmentTarget(node);
             var inConstContext = isConstContext(node);
+            var hasOmittedExpression = false;
             for (var i = 0; i < elementCount; i++) {
                 var e = elements[i];
-                if (e.kind === 220) {
+                if (e.kind === 224) {
                     if (languageVersion < 2) {
                         checkExternalEmitHelpers(e, compilerOptions.downlevelIteration ? 1536 : 1024);
                     }
@@ -55571,7 +59490,7 @@ var ts;
                         elementFlags.push(8);
                     }
                     else if (inDestructuringPattern) {
-                        var restElementType = getIndexTypeOfType(spreadType, 1) ||
+                        var restElementType = getIndexTypeOfType(spreadType, numberType) ||
                             getIteratedTypeOrElementType(65, spreadType, undefinedType, undefined, false) ||
                             unknownType;
                         elementTypes.push(restElementType);
@@ -55582,17 +59501,22 @@ var ts;
                         elementFlags.push(4);
                     }
                 }
+                else if (exactOptionalPropertyTypes && e.kind === 226) {
+                    hasOmittedExpression = true;
+                    elementTypes.push(missingType);
+                    elementFlags.push(2);
+                }
                 else {
                     var elementContextualType = getContextualTypeForElementExpression(contextualType, elementTypes.length);
                     var type = checkExpressionForMutableLocation(e, checkMode, elementContextualType, forceTuple);
-                    elementTypes.push(type);
-                    elementFlags.push(1);
+                    elementTypes.push(addOptionality(type, true, hasOmittedExpression));
+                    elementFlags.push(hasOmittedExpression ? 2 : 1);
                 }
             }
             if (inDestructuringPattern) {
                 return createTupleType(elementTypes, elementFlags);
             }
-            if (forceTuple || inConstContext || contextualType && forEachType(contextualType, isTupleLikeType)) {
+            if (forceTuple || inConstContext || contextualType && someType(contextualType, isTupleLikeType)) {
                 return createArrayLiteralType(createTupleType(elementTypes, elementFlags, inConstContext));
             }
             return createArrayLiteralType(createArrayType(elementTypes.length ?
@@ -55606,15 +59530,15 @@ var ts;
             var literalType = type.literalType;
             if (!literalType) {
                 literalType = type.literalType = cloneTypeReference(type);
-                literalType.objectFlags |= 65536 | 1048576;
+                literalType.objectFlags |= 32768 | 262144;
             }
             return literalType;
         }
         function isNumericName(name) {
             switch (name.kind) {
-                case 158:
+                case 161:
                     return isNumericComputedName(name);
-                case 78:
+                case 79:
                     return isNumericLiteralName(name.escapedText);
                 case 8:
                 case 10:
@@ -55626,24 +59550,31 @@ var ts;
         function isNumericComputedName(name) {
             return isTypeAssignableToKind(checkComputedPropertyName(name), 296);
         }
-        function isInfinityOrNaNString(name) {
-            return name === "Infinity" || name === "-Infinity" || name === "NaN";
-        }
         function isNumericLiteralName(name) {
             return (+name).toString() === name;
         }
         function checkComputedPropertyName(node) {
             var links = getNodeLinks(node.expression);
             if (!links.resolvedType) {
+                if ((ts.isTypeLiteralNode(node.parent.parent) || ts.isClassLike(node.parent.parent) || ts.isInterfaceDeclaration(node.parent.parent))
+                    && ts.isBinaryExpression(node.expression) && node.expression.operatorToken.kind === 101) {
+                    return links.resolvedType = errorType;
+                }
                 links.resolvedType = checkExpression(node.expression);
+                if (ts.isPropertyDeclaration(node.parent) && !ts.hasStaticModifier(node.parent) && ts.isClassExpression(node.parent.parent)) {
+                    var container = ts.getEnclosingBlockScopeContainer(node.parent.parent);
+                    var enclosingIterationStatement = getEnclosingIterationStatement(container);
+                    if (enclosingIterationStatement) {
+                        getNodeLinks(enclosingIterationStatement).flags |= 65536;
+                        getNodeLinks(node).flags |= 524288;
+                        getNodeLinks(node.parent.parent).flags |= 524288;
+                    }
+                }
                 if (links.resolvedType.flags & 98304 ||
                     !isTypeAssignableToKind(links.resolvedType, 402653316 | 296 | 12288) &&
                         !isTypeAssignableTo(links.resolvedType, stringNumberSymbolType)) {
                     error(node, ts.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
                 }
-                else {
-                    checkThatExpressionIsProperSymbolReference(node.expression, links.resolvedType, true);
-                }
             }
             return links.resolvedType;
         }
@@ -55652,15 +59583,24 @@ var ts;
             var firstDecl = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a[0];
             return isNumericLiteralName(symbol.escapedName) || (firstDecl && ts.isNamedDeclaration(firstDecl) && isNumericName(firstDecl.name));
         }
-        function getObjectLiteralIndexInfo(node, offset, properties, kind) {
+        function isSymbolWithSymbolName(symbol) {
+            var _a;
+            var firstDecl = (_a = symbol.declarations) === null || _a === void 0 ? void 0 : _a[0];
+            return ts.isKnownSymbol(symbol) || (firstDecl && ts.isNamedDeclaration(firstDecl) && ts.isComputedPropertyName(firstDecl.name) &&
+                isTypeAssignableToKind(checkComputedPropertyName(firstDecl.name), 4096));
+        }
+        function getObjectLiteralIndexInfo(node, offset, properties, keyType) {
             var propTypes = [];
             for (var i = offset; i < properties.length; i++) {
-                if (kind === 0 || isSymbolWithNumericName(properties[i])) {
+                var prop = properties[i];
+                if (keyType === stringType && !isSymbolWithSymbolName(prop) ||
+                    keyType === numberType && isSymbolWithNumericName(prop) ||
+                    keyType === esSymbolType && isSymbolWithSymbolName(prop)) {
                     propTypes.push(getTypeOfSymbol(properties[i]));
                 }
             }
             var unionType = propTypes.length ? getUnionType(propTypes, 2) : undefinedType;
-            return createIndexInfo(unionType, isConstContext(node));
+            return createIndexInfo(keyType, unionType, isConstContext(node));
         }
         function getImmediateAliasedSymbol(symbol) {
             ts.Debug.assert((symbol.flags & 2097152) !== 0, "Should only get Alias here.");
@@ -55682,7 +59622,7 @@ var ts;
             var spread = emptyObjectType;
             var contextualType = getApparentTypeOfContextualType(node);
             var contextualTypeHasPattern = contextualType && contextualType.pattern &&
-                (contextualType.pattern.kind === 196 || contextualType.pattern.kind === 200);
+                (contextualType.pattern.kind === 200 || contextualType.pattern.kind === 204);
             var inConstContext = isConstContext(node);
             var checkFlags = inConstContext ? 8 : 0;
             var isInJavascript = ts.isInJSFile(node) && !ts.isInJsonFile(node);
@@ -55692,9 +59632,10 @@ var ts;
             var patternWithComputedProperties = false;
             var hasComputedStringProperty = false;
             var hasComputedNumberProperty = false;
+            var hasComputedSymbolProperty = false;
             for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
                 var elem = _a[_i];
-                if (elem.name && ts.isComputedPropertyName(elem.name) && !ts.isWellKnownSymbolSyntactically(elem.name)) {
+                if (elem.name && ts.isComputedPropertyName(elem.name)) {
                     checkComputedPropertyName(elem.name);
                 }
             }
@@ -55702,13 +59643,13 @@ var ts;
             for (var _b = 0, _c = node.properties; _b < _c.length; _b++) {
                 var memberDecl = _c[_b];
                 var member = getSymbolOfNode(memberDecl);
-                var computedNameType = memberDecl.name && memberDecl.name.kind === 158 && !ts.isWellKnownSymbolSyntactically(memberDecl.name.expression) ?
+                var computedNameType = memberDecl.name && memberDecl.name.kind === 161 ?
                     checkComputedPropertyName(memberDecl.name) : undefined;
-                if (memberDecl.kind === 288 ||
-                    memberDecl.kind === 289 ||
+                if (memberDecl.kind === 294 ||
+                    memberDecl.kind === 295 ||
                     ts.isObjectLiteralMethod(memberDecl)) {
-                    var type = memberDecl.kind === 288 ? checkPropertyAssignment(memberDecl, checkMode) :
-                        memberDecl.kind === 289 ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
+                    var type = memberDecl.kind === 294 ? checkPropertyAssignment(memberDecl, checkMode) :
+                        memberDecl.kind === 295 ? checkExpressionForMutableLocation(!inDestructuringPattern && memberDecl.objectAssignmentInitializer ? memberDecl.objectAssignmentInitializer : memberDecl.name, checkMode) :
                             checkObjectLiteralMethod(memberDecl, checkMode);
                     if (isInJavascript) {
                         var jsDocType = getTypeForDeclarationFromJSDocComment(memberDecl);
@@ -55720,7 +59661,7 @@ var ts;
                             checkTypeAssignableTo(type, getTypeFromTypeNode(enumTag.typeExpression), memberDecl);
                         }
                     }
-                    objectFlags |= ts.getObjectFlags(type) & 3670016;
+                    objectFlags |= ts.getObjectFlags(type) & 917504;
                     var nameType = computedNameType && isTypeUsableAsPropertyName(computedNameType) ? computedNameType : undefined;
                     var prop = nameType ?
                         createSymbol(4 | member.flags, getPropertyNameFromType(nameType), checkFlags | 4096) :
@@ -55729,8 +59670,8 @@ var ts;
                         prop.nameType = nameType;
                     }
                     if (inDestructuringPattern) {
-                        var isOptional = (memberDecl.kind === 288 && hasDefaultValue(memberDecl.initializer)) ||
-                            (memberDecl.kind === 289 && memberDecl.objectAssignmentInitializer);
+                        var isOptional = (memberDecl.kind === 294 && hasDefaultValue(memberDecl.initializer)) ||
+                            (memberDecl.kind === 295 && memberDecl.objectAssignmentInitializer);
                         if (isOptional) {
                             prop.flags |= 16777216;
                         }
@@ -55740,7 +59681,7 @@ var ts;
                         if (impliedProp) {
                             prop.flags |= impliedProp.flags & 16777216;
                         }
-                        else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, 0)) {
+                        else if (!compilerOptions.suppressExcessPropertyErrors && !getIndexInfoOfType(contextualType, stringType)) {
                             error(memberDecl.name, ts.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1, symbolToString(member), typeToString(contextualType));
                         }
                     }
@@ -55754,7 +59695,7 @@ var ts;
                     member = prop;
                     allPropertiesTable === null || allPropertiesTable === void 0 ? void 0 : allPropertiesTable.set(prop.escapedName, prop);
                 }
-                else if (memberDecl.kind === 290) {
+                else if (memberDecl.kind === 296) {
                     if (languageVersion < 2) {
                         checkExternalEmitHelpers(memberDecl, 2);
                     }
@@ -55764,21 +59705,28 @@ var ts;
                         propertiesTable = ts.createSymbolTable();
                         hasComputedStringProperty = false;
                         hasComputedNumberProperty = false;
+                        hasComputedSymbolProperty = false;
                     }
                     var type = getReducedType(checkExpression(memberDecl.expression));
-                    if (!isValidSpreadType(type)) {
-                        error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
-                        return errorType;
+                    if (isValidSpreadType(type)) {
+                        var mergedType = tryMergeUnionOfObjectTypeAndEmptyObject(type, inConstContext);
+                        if (allPropertiesTable) {
+                            checkSpreadPropOverrides(mergedType, allPropertiesTable, memberDecl);
+                        }
+                        offset = propertiesArray.length;
+                        if (isErrorType(spread)) {
+                            continue;
+                        }
+                        spread = getSpreadType(spread, mergedType, node.symbol, objectFlags, inConstContext);
                     }
-                    if (allPropertiesTable) {
-                        checkSpreadPropOverrides(type, allPropertiesTable, memberDecl);
+                    else {
+                        error(memberDecl, ts.Diagnostics.Spread_types_may_only_be_created_from_object_types);
+                        spread = errorType;
                     }
-                    spread = getSpreadType(spread, type, node.symbol, objectFlags, inConstContext);
-                    offset = propertiesArray.length;
                     continue;
                 }
                 else {
-                    ts.Debug.assert(memberDecl.kind === 167 || memberDecl.kind === 168);
+                    ts.Debug.assert(memberDecl.kind === 171 || memberDecl.kind === 172);
                     checkNodeDeferred(memberDecl);
                 }
                 if (computedNameType && !(computedNameType.flags & 8576)) {
@@ -55786,6 +59734,9 @@ var ts;
                         if (isTypeAssignableTo(computedNameType, numberType)) {
                             hasComputedNumberProperty = true;
                         }
+                        else if (isTypeAssignableTo(computedNameType, esSymbolType)) {
+                            hasComputedSymbolProperty = true;
+                        }
                         else {
                             hasComputedStringProperty = true;
                         }
@@ -55799,7 +59750,7 @@ var ts;
                 }
                 propertiesArray.push(member);
             }
-            if (contextualTypeHasPattern && node.parent.kind !== 290) {
+            if (contextualTypeHasPattern && node.parent.kind !== 296) {
                 for (var _d = 0, _e = getPropertiesOfType(contextualType); _d < _e.length; _d++) {
                     var prop = _e[_d];
                     if (!propertiesTable.get(prop.escapedName) && !getPropertyOfType(spread, prop.escapedName)) {
@@ -55811,6 +59762,9 @@ var ts;
                     }
                 }
             }
+            if (isErrorType(spread)) {
+                return errorType;
+            }
             if (spread !== emptyObjectType) {
                 if (propertiesArray.length > 0) {
                     spread = getSpreadType(spread, createObjectLiteralType(), node.symbol, objectFlags, inConstContext);
@@ -55823,12 +59777,17 @@ var ts;
             }
             return createObjectLiteralType();
             function createObjectLiteralType() {
-                var stringIndexInfo = hasComputedStringProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 0) : undefined;
-                var numberIndexInfo = hasComputedNumberProperty ? getObjectLiteralIndexInfo(node, offset, propertiesArray, 1) : undefined;
-                var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, stringIndexInfo, numberIndexInfo);
-                result.objectFlags |= objectFlags | 128 | 1048576;
+                var indexInfos = [];
+                if (hasComputedStringProperty)
+                    indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, stringType));
+                if (hasComputedNumberProperty)
+                    indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, numberType));
+                if (hasComputedSymbolProperty)
+                    indexInfos.push(getObjectLiteralIndexInfo(node, offset, propertiesArray, esSymbolType));
+                var result = createAnonymousType(node.symbol, propertiesTable, ts.emptyArray, ts.emptyArray, indexInfos);
+                result.objectFlags |= objectFlags | 128 | 262144;
                 if (isJSObjectLiteral) {
-                    result.objectFlags |= 16384;
+                    result.objectFlags |= 8192;
                 }
                 if (patternWithComputedProperties) {
                     result.objectFlags |= 512;
@@ -55883,11 +59842,11 @@ var ts;
             checkJsxChildren(node);
             return getJsxElementTypeAt(node) || anyType;
         }
-        function isUnhyphenatedJsxName(name) {
-            return !ts.stringContains(name, "-");
+        function isHyphenatedJsxName(name) {
+            return ts.stringContains(name, "-");
         }
         function isJsxIntrinsicIdentifier(tagName) {
-            return tagName.kind === 78 && ts.isIntrinsicJsxName(tagName.escapedText);
+            return tagName.kind === 79 && ts.isIntrinsicJsxName(tagName.escapedText);
         }
         function checkJsxAttribute(node, checkMode) {
             return node.initializer
@@ -55902,14 +59861,14 @@ var ts;
             var hasSpreadAnyType = false;
             var typeToIntersect;
             var explicitlySpecifyChildrenAttribute = false;
-            var objectFlags = 4096;
+            var objectFlags = 2048;
             var jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(openingLikeElement));
             for (var _i = 0, _a = attributes.properties; _i < _a.length; _i++) {
                 var attributeDecl = _a[_i];
                 var member = attributeDecl.symbol;
                 if (ts.isJsxAttribute(attributeDecl)) {
                     var exprType = checkJsxAttribute(attributeDecl, checkMode);
-                    objectFlags |= ts.getObjectFlags(exprType) & 3670016;
+                    objectFlags |= ts.getObjectFlags(exprType) & 917504;
                     var attributeSymbol = createSymbol(4 | member.flags, member.escapedName);
                     attributeSymbol.declarations = member.declarations;
                     attributeSymbol.parent = member.parent;
@@ -55925,7 +59884,7 @@ var ts;
                     }
                 }
                 else {
-                    ts.Debug.assert(attributeDecl.kind === 282);
+                    ts.Debug.assert(attributeDecl.kind === 286);
                     if (attributesTable.size > 0) {
                         spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false);
                         attributesTable = ts.createSymbolTable();
@@ -55950,7 +59909,7 @@ var ts;
                     spread = getSpreadType(spread, createJsxAttributesType(), attributes.symbol, objectFlags, false);
                 }
             }
-            var parent = openingLikeElement.parent.kind === 273 ? openingLikeElement.parent : undefined;
+            var parent = openingLikeElement.parent.kind === 277 ? openingLikeElement.parent : undefined;
             if (parent && parent.openingElement === openingLikeElement && parent.children.length > 0) {
                 var childrenTypes = checkJsxChildren(parent, checkMode);
                 if (!hasSpreadAnyType && jsxChildrenPropertyName && jsxChildrenPropertyName !== "") {
@@ -55961,14 +59920,14 @@ var ts;
                     var childrenContextualType = contextualType && getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName);
                     var childrenPropSymbol = createSymbol(4, jsxChildrenPropertyName);
                     childrenPropSymbol.type = childrenTypes.length === 1 ? childrenTypes[0] :
-                        childrenContextualType && forEachType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) :
+                        childrenContextualType && someType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) :
                             createArrayType(getUnionType(childrenTypes));
                     childrenPropSymbol.valueDeclaration = ts.factory.createPropertySignature(undefined, ts.unescapeLeadingUnderscores(jsxChildrenPropertyName), undefined, undefined);
                     ts.setParent(childrenPropSymbol.valueDeclaration, attributes);
                     childrenPropSymbol.valueDeclaration.symbol = childrenPropSymbol;
                     var childPropMap = ts.createSymbolTable();
                     childPropMap.set(jsxChildrenPropertyName, childrenPropSymbol);
-                    spread = getSpreadType(spread, createAnonymousType(attributes.symbol, childPropMap, ts.emptyArray, ts.emptyArray, undefined, undefined), attributes.symbol, objectFlags, false);
+                    spread = getSpreadType(spread, createAnonymousType(attributes.symbol, childPropMap, ts.emptyArray, ts.emptyArray, ts.emptyArray), attributes.symbol, objectFlags, false);
                 }
             }
             if (hasSpreadAnyType) {
@@ -55980,8 +59939,8 @@ var ts;
             return typeToIntersect || (spread === emptyJsxObjectType ? createJsxAttributesType() : spread);
             function createJsxAttributesType() {
                 objectFlags |= freshObjectLiteralFlag;
-                var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, undefined, undefined);
-                result.objectFlags |= objectFlags | 128 | 1048576;
+                var result = createAnonymousType(attributes.symbol, attributesTable, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+                result.objectFlags |= objectFlags | 128 | 262144;
                 return result;
             }
         }
@@ -55994,7 +59953,7 @@ var ts;
                         childrenTypes.push(stringType);
                     }
                 }
-                else if (child.kind === 283 && !child.expression) {
+                else if (child.kind === 287 && !child.expression) {
                     continue;
                 }
                 else {
@@ -56006,11 +59965,12 @@ var ts;
         function checkSpreadPropOverrides(type, props, spread) {
             for (var _i = 0, _a = getPropertiesOfType(type); _i < _a.length; _i++) {
                 var right = _a[_i];
-                var left = props.get(right.escapedName);
-                var rightType = getTypeOfSymbol(right);
-                if (left && !maybeTypeOfKind(rightType, 98304) && !(maybeTypeOfKind(rightType, 3) && right.flags & 16777216)) {
-                    var diagnostic = error(left.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(left.escapedName));
-                    ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(spread, ts.Diagnostics.This_spread_always_overwrites_this_property));
+                if (!(right.flags & 16777216)) {
+                    var left = props.get(right.escapedName);
+                    if (left) {
+                        var diagnostic = error(left.valueDeclaration, ts.Diagnostics._0_is_specified_more_than_once_so_this_usage_will_be_overwritten, ts.unescapeLeadingUnderscores(left.escapedName));
+                        ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(spread, ts.Diagnostics.This_spread_always_overwrites_this_property));
+                    }
                 }
             }
         }
@@ -56027,7 +59987,7 @@ var ts;
             var links = getNodeLinks(node);
             if (!links.resolvedSymbol) {
                 var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, node);
-                if (intrinsicElementsType !== errorType) {
+                if (!isErrorType(intrinsicElementsType)) {
                     if (!ts.isIdentifier(node.tagName))
                         return ts.Debug.fail();
                     var intrinsicProp = getPropertyOfType(intrinsicElementsType, node.tagName.escapedText);
@@ -56035,7 +59995,7 @@ var ts;
                         links.jsxFlags |= 1;
                         return links.resolvedSymbol = intrinsicProp;
                     }
-                    var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, 0);
+                    var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType);
                     if (indexSignatureType) {
                         links.jsxFlags |= 2;
                         return links.resolvedSymbol = intrinsicElementsType.symbol;
@@ -56117,7 +60077,7 @@ var ts;
                 else if (propertiesOfJsxElementAttribPropInterface.length === 1) {
                     return propertiesOfJsxElementAttribPropInterface[0].escapedName;
                 }
-                else if (propertiesOfJsxElementAttribPropInterface.length > 1) {
+                else if (propertiesOfJsxElementAttribPropInterface.length > 1 && jsxElementAttribPropInterfaceSym.declarations) {
                     error(jsxElementAttribPropInterfaceSym.declarations[0], ts.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property, ts.unescapeLeadingUnderscores(nameOfAttribPropContainer));
                 }
             }
@@ -56159,13 +60119,13 @@ var ts;
         }
         function getIntrinsicAttributesTypeFromStringLiteralType(type, location) {
             var intrinsicElementsType = getJsxType(JsxNames.IntrinsicElements, location);
-            if (intrinsicElementsType !== errorType) {
+            if (!isErrorType(intrinsicElementsType)) {
                 var stringLiteralTypeName = type.value;
                 var intrinsicProp = getPropertyOfType(intrinsicElementsType, ts.escapeLeadingUnderscores(stringLiteralTypeName));
                 if (intrinsicProp) {
                     return getTypeOfSymbol(intrinsicProp);
                 }
-                var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, 0);
+                var indexSignatureType = getIndexTypeOfType(intrinsicElementsType, stringType);
                 if (indexSignatureType) {
                     return indexSignatureType;
                 }
@@ -56206,11 +60166,11 @@ var ts;
             if (!links.resolvedJsxElementAttributesType) {
                 var symbol = getIntrinsicTagSymbol(node);
                 if (links.jsxFlags & 1) {
-                    return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol);
+                    return links.resolvedJsxElementAttributesType = getTypeOfSymbol(symbol) || errorType;
                 }
                 else if (links.jsxFlags & 2) {
                     return links.resolvedJsxElementAttributesType =
-                        getIndexTypeOfType(getDeclaredTypeOfSymbol(symbol), 0);
+                        getIndexTypeOfType(getJsxType(JsxNames.IntrinsicElements, node), stringType) || errorType;
                 }
                 else {
                     return links.resolvedJsxElementAttributesType = errorType;
@@ -56220,7 +60180,7 @@ var ts;
         }
         function getJsxElementClassTypeAt(location) {
             var type = getJsxType(JsxNames.ElementClass, location);
-            if (type === errorType)
+            if (isErrorType(type))
                 return undefined;
             return type;
         }
@@ -56267,6 +60227,13 @@ var ts;
                         markAliasSymbolAsReferenced(jsxFactorySym);
                     }
                 }
+                if (ts.isJsxOpeningFragment(node)) {
+                    var file = ts.getSourceFileOfNode(node);
+                    var localJsxNamespace = getLocalJsxNamespace(file);
+                    if (localJsxNamespace) {
+                        resolveName(jsxFactoryLocation, localJsxNamespace, 111551, jsxFactoryRefErr, localJsxNamespace, true);
+                    }
+                }
             }
             if (isNodeOpeningLikeElement) {
                 var jsxOpeningLikeNode = node;
@@ -56277,11 +60244,10 @@ var ts;
         }
         function isKnownProperty(targetType, name, isComparingJsxAttributes) {
             if (targetType.flags & 524288) {
-                var resolved = resolveStructuredTypeMembers(targetType);
-                if (resolved.stringIndexInfo ||
-                    resolved.numberIndexInfo && isNumericLiteralName(name) ||
-                    getPropertyOfObjectType(targetType, name) ||
-                    isComparingJsxAttributes && !isUnhyphenatedJsxName(name)) {
+                if (getPropertyOfObjectType(targetType, name) ||
+                    getApplicableIndexInfoForName(targetType, name) ||
+                    isLateBoundName(name) && getIndexInfoOfType(targetType, stringType) ||
+                    isComparingJsxAttributes && isHyphenatedJsxName(name)) {
                     return true;
                 }
             }
@@ -56327,42 +60293,51 @@ var ts;
                     ts.getAssignmentDeclarationKind(parent) === 3;
             }
         }
-        function checkPropertyAccessibility(node, isSuper, type, prop) {
-            var flags = ts.getDeclarationModifierFlagsFromSymbol(prop);
-            var errorNode = node.kind === 157 ? node.right : node.kind === 195 ? node : node.name;
+        function checkPropertyAccessibility(node, isSuper, writing, type, prop, reportError) {
+            if (reportError === void 0) { reportError = true; }
+            var errorNode = !reportError ? undefined :
+                node.kind === 160 ? node.right :
+                    node.kind === 199 ? node :
+                        node.kind === 202 && node.propertyName ? node.propertyName : node.name;
+            return checkPropertyAccessibilityAtLocation(node, isSuper, writing, type, prop, errorNode);
+        }
+        function checkPropertyAccessibilityAtLocation(location, isSuper, writing, containingType, prop, errorNode) {
+            var flags = ts.getDeclarationModifierFlagsFromSymbol(prop, writing);
             if (isSuper) {
                 if (languageVersion < 2) {
                     if (symbolHasNonMethodDeclaration(prop)) {
-                        error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+                        if (errorNode) {
+                            error(errorNode, ts.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword);
+                        }
                         return false;
                     }
                 }
                 if (flags & 128) {
-                    error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
+                    if (errorNode) {
+                        error(errorNode, ts.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression, symbolToString(prop), typeToString(getDeclaringClass(prop)));
+                    }
                     return false;
                 }
             }
-            if ((flags & 128) && ts.isThisProperty(node) && symbolHasNonMethodDeclaration(prop)) {
+            if ((flags & 128) && symbolHasNonMethodDeclaration(prop) &&
+                (ts.isThisProperty(location) || ts.isThisInitializedObjectBindingExpression(location) || ts.isObjectBindingPattern(location.parent) && ts.isThisInitializedDeclaration(location.parent.parent))) {
                 var declaringClassDeclaration = ts.getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
-                if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(node)) {
-                    error(errorNode, ts.Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), ts.getTextOfIdentifierOrLiteral(declaringClassDeclaration.name));
-                    return false;
-                }
-            }
-            if (ts.isPropertyAccessExpression(node) && ts.isPrivateIdentifier(node.name)) {
-                if (!ts.getContainingClass(node)) {
-                    error(errorNode, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
+                if (declaringClassDeclaration && isNodeUsedDuringClassInitialization(location)) {
+                    if (errorNode) {
+                        error(errorNode, ts.Diagnostics.Abstract_property_0_in_class_1_cannot_be_accessed_in_the_constructor, symbolToString(prop), ts.getTextOfIdentifierOrLiteral(declaringClassDeclaration.name));
+                    }
                     return false;
                 }
-                return true;
             }
             if (!(flags & 24)) {
                 return true;
             }
             if (flags & 8) {
                 var declaringClassDeclaration = ts.getClassLikeDeclarationOfSymbol(getParentOfSymbol(prop));
-                if (!isNodeWithinClass(node, declaringClassDeclaration)) {
-                    error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
+                if (!isNodeWithinClass(location, declaringClassDeclaration)) {
+                    if (errorNode) {
+                        error(errorNode, ts.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1, symbolToString(prop), typeToString(getDeclaringClass(prop)));
+                    }
                     return false;
                 }
                 return true;
@@ -56370,14 +60345,16 @@ var ts;
             if (isSuper) {
                 return true;
             }
-            var enclosingClass = forEachEnclosingClass(node, function (enclosingDeclaration) {
+            var enclosingClass = forEachEnclosingClass(location, function (enclosingDeclaration) {
                 var enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfNode(enclosingDeclaration));
-                return isClassDerivedFromDeclaringClasses(enclosingClass, prop) ? enclosingClass : undefined;
+                return isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing) ? enclosingClass : undefined;
             });
             if (!enclosingClass) {
                 var thisParameter = void 0;
-                if (flags & 32 || !(thisParameter = getThisParameterFromNodeContext(node)) || !thisParameter.type) {
-                    error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || type));
+                if (flags & 32 || !(thisParameter = getThisParameterFromNodeContext(location)) || !thisParameter.type) {
+                    if (errorNode) {
+                        error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses, symbolToString(prop), typeToString(getDeclaringClass(prop) || containingType));
+                    }
                     return false;
                 }
                 var thisType = getTypeFromTypeNode(thisParameter.type);
@@ -56386,11 +60363,13 @@ var ts;
             if (flags & 32) {
                 return true;
             }
-            if (type.flags & 262144) {
-                type = type.isThisType ? getConstraintOfTypeParameter(type) : getBaseConstraintOfType(type);
+            if (containingType.flags & 262144) {
+                containingType = containingType.isThisType ? getConstraintOfTypeParameter(containingType) : getBaseConstraintOfType(containingType);
             }
-            if (!type || !hasBaseType(type, enclosingClass)) {
-                error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass));
+            if (!containingType || !hasBaseType(containingType, enclosingClass)) {
+                if (errorNode) {
+                    error(errorNode, ts.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_This_is_an_instance_of_class_2, symbolToString(prop), typeToString(enclosingClass), typeToString(containingType));
+                }
                 return false;
             }
             return true;
@@ -56441,25 +60420,26 @@ var ts;
         }
         function checkNonNullNonVoidType(type, node) {
             var nonNullType = checkNonNullType(type, node);
-            if (nonNullType !== errorType && nonNullType.flags & 16384) {
+            if (nonNullType.flags & 16384) {
                 error(node, ts.Diagnostics.Object_is_possibly_undefined);
             }
             return nonNullType;
         }
-        function checkPropertyAccessExpression(node) {
-            return node.flags & 32 ? checkPropertyAccessChain(node) :
-                checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name);
+        function checkPropertyAccessExpression(node, checkMode) {
+            return node.flags & 32 ? checkPropertyAccessChain(node, checkMode) :
+                checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode);
         }
-        function checkPropertyAccessChain(node) {
+        function checkPropertyAccessChain(node, checkMode) {
             var leftType = checkExpression(node.expression);
             var nonOptionalType = getOptionalExpressionType(leftType, node.expression);
-            return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name), node, nonOptionalType !== leftType);
+            return propagateOptionalTypeMarker(checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullType(nonOptionalType, node.expression), node.name, checkMode), node, nonOptionalType !== leftType);
         }
-        function checkQualifiedName(node) {
-            return checkPropertyAccessExpressionOrQualifiedName(node, node.left, checkNonNullExpression(node.left), node.right);
+        function checkQualifiedName(node, checkMode) {
+            var leftType = ts.isPartOfTypeQuery(node) && ts.isThisIdentifier(node.left) ? checkNonNullType(checkThisExpression(node.left), node.left) : checkNonNullExpression(node.left);
+            return checkPropertyAccessExpressionOrQualifiedName(node, node.left, leftType, node.right, checkMode);
         }
         function isMethodAccessForCall(node) {
-            while (node.parent.kind === 207) {
+            while (node.parent.kind === 211) {
                 node = node.parent;
             }
             return ts.isCallOrNewExpression(node.parent) && node.parent.expression === node;
@@ -56474,6 +60454,36 @@ var ts;
                 }
             }
         }
+        function checkGrammarPrivateIdentifierExpression(privId) {
+            if (!ts.getContainingClass(privId)) {
+                return grammarErrorOnNode(privId, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
+            }
+            if (!ts.isExpressionNode(privId)) {
+                return grammarErrorOnNode(privId, ts.Diagnostics.Private_identifiers_are_only_allowed_in_class_bodies_and_may_only_be_used_as_part_of_a_class_member_declaration_property_access_or_on_the_left_hand_side_of_an_in_expression);
+            }
+            if (!getSymbolForPrivateIdentifierExpression(privId)) {
+                return grammarErrorOnNode(privId, ts.Diagnostics.Cannot_find_name_0, ts.idText(privId));
+            }
+            return false;
+        }
+        function checkPrivateIdentifierExpression(privId) {
+            checkGrammarPrivateIdentifierExpression(privId);
+            var symbol = getSymbolForPrivateIdentifierExpression(privId);
+            if (symbol) {
+                markPropertyAsReferenced(symbol, undefined, false);
+            }
+            return anyType;
+        }
+        function getSymbolForPrivateIdentifierExpression(privId) {
+            if (!ts.isExpressionNode(privId)) {
+                return undefined;
+            }
+            var links = getNodeLinks(privId);
+            if (links.resolvedSymbol === undefined) {
+                links.resolvedSymbol = lookupSymbolForPrivateIdentifierDeclaration(privId.escapedText, privId);
+            }
+            return links.resolvedSymbol;
+        }
         function getPrivateIdentifierPropertyOfType(leftType, lexicallyScopedIdentifier) {
             return getPropertyOfType(leftType, lexicallyScopedIdentifier.escapedName);
         }
@@ -56491,10 +60501,9 @@ var ts;
             }
             var diagName = diagnosticName(right);
             if (propertyOnType) {
-                var typeValueDecl = propertyOnType.valueDeclaration;
-                var typeClass_1 = ts.getContainingClass(typeValueDecl);
-                ts.Debug.assert(!!typeClass_1);
-                if (lexicallyScopedIdentifier) {
+                var typeValueDecl = ts.Debug.checkDefined(propertyOnType.valueDeclaration);
+                var typeClass_1 = ts.Debug.checkDefined(ts.getContainingClass(typeValueDecl));
+                if (lexicallyScopedIdentifier === null || lexicallyScopedIdentifier === void 0 ? void 0 : lexicallyScopedIdentifier.valueDeclaration) {
                     var lexicalValueDecl = lexicallyScopedIdentifier.valueDeclaration;
                     var lexicalClass = ts.getContainingClass(lexicalValueDecl);
                     ts.Debug.assert(!!lexicalClass);
@@ -56513,20 +60522,45 @@ var ts;
             return (isConstructorDeclaredProperty(prop) || ts.isThisProperty(node) && isAutoTypedProperty(prop))
                 && ts.getThisContainer(node, true) === getDeclaringConstructor(prop);
         }
-        function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right) {
+        function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode) {
             var parentSymbol = getNodeLinks(left).resolvedSymbol;
             var assignmentKind = ts.getAssignmentTargetKind(node);
             var apparentType = getApparentType(assignmentKind !== 0 || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType);
-            if (ts.isPrivateIdentifier(right)) {
-                checkExternalEmitHelpers(node, 524288);
-            }
             var isAnyLike = isTypeAny(apparentType) || apparentType === silentNeverType;
             var prop;
             if (ts.isPrivateIdentifier(right)) {
+                if (languageVersion < 99) {
+                    if (assignmentKind !== 0) {
+                        checkExternalEmitHelpers(node, 1048576);
+                    }
+                    if (assignmentKind !== 1) {
+                        checkExternalEmitHelpers(node, 524288);
+                    }
+                }
                 var lexicallyScopedSymbol = lookupSymbolForPrivateIdentifierDeclaration(right.escapedText, right);
+                if (assignmentKind && lexicallyScopedSymbol && lexicallyScopedSymbol.valueDeclaration && ts.isMethodDeclaration(lexicallyScopedSymbol.valueDeclaration)) {
+                    grammarErrorOnNode(right, ts.Diagnostics.Cannot_assign_to_private_method_0_Private_methods_are_not_writable, ts.idText(right));
+                }
+                if ((lexicallyScopedSymbol === null || lexicallyScopedSymbol === void 0 ? void 0 : lexicallyScopedSymbol.valueDeclaration) && (ts.getEmitScriptTarget(compilerOptions) === 99 && !useDefineForClassFields)) {
+                    var lexicalClass_1 = ts.getContainingClass(lexicallyScopedSymbol.valueDeclaration);
+                    var parentStaticFieldInitializer = ts.findAncestor(node, function (n) {
+                        if (n === lexicalClass_1)
+                            return "quit";
+                        if (ts.isPropertyDeclaration(n.parent) && ts.hasStaticModifier(n.parent) && n.parent.initializer === n && n.parent.parent === lexicalClass_1) {
+                            return true;
+                        }
+                        return false;
+                    });
+                    if (parentStaticFieldInitializer) {
+                        var parentStaticFieldInitializerSymbol = getSymbolOfNode(parentStaticFieldInitializer.parent);
+                        ts.Debug.assert(parentStaticFieldInitializerSymbol, "Initializer without declaration symbol");
+                        var diagnostic = error(node, ts.Diagnostics.Property_0_may_not_be_used_in_a_static_property_s_initializer_in_the_same_class_when_target_is_esnext_and_useDefineForClassFields_is_false, ts.symbolName(lexicallyScopedSymbol));
+                        ts.addRelatedInfo(diagnostic, ts.createDiagnosticForNode(parentStaticFieldInitializer.parent, ts.Diagnostics.Initializer_for_property_0, ts.symbolName(parentStaticFieldInitializerSymbol)));
+                    }
+                }
                 if (isAnyLike) {
                     if (lexicallyScopedSymbol) {
-                        return apparentType;
+                        return isErrorType(apparentType) ? errorType : apparentType;
                     }
                     if (!ts.getContainingClass(right)) {
                         grammarErrorOnNode(right, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
@@ -56537,13 +60571,20 @@ var ts;
                 if (!prop && checkPrivateIdentifierPropertyAccess(leftType, right, lexicallyScopedSymbol)) {
                     return errorType;
                 }
+                else {
+                    var isSetonlyAccessor = prop && prop.flags & 65536 && !(prop.flags & 32768);
+                    if (isSetonlyAccessor && assignmentKind !== 1) {
+                        error(node, ts.Diagnostics.Private_accessor_was_defined_without_a_getter);
+                    }
+                }
             }
             else {
                 if (isAnyLike) {
                     if (ts.isIdentifier(left) && parentSymbol) {
                         markAliasReferenced(parentSymbol, node);
                     }
-                    return apparentType;
+                    return isErrorType(apparentType) ? errorType : apparentType;
+                    ;
                 }
                 prop = getPropertyOfType(apparentType, right.escapedText);
             }
@@ -56552,9 +60593,11 @@ var ts;
             }
             var propType;
             if (!prop) {
-                var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ? getIndexInfoOfType(apparentType, 0) : undefined;
+                var indexInfo = !ts.isPrivateIdentifier(right) && (assignmentKind === 0 || !isGenericObjectType(leftType) || isThisTypeParameter(leftType)) ?
+                    getApplicableIndexInfoForName(apparentType, right.escapedText) : undefined;
                 if (!(indexInfo && indexInfo.type)) {
-                    if (isJSLiteralType(leftType)) {
+                    var isUncheckedJS = isUncheckedJSSuggestion(node, leftType.symbol, true);
+                    if (!isUncheckedJS && isJSLiteralType(leftType)) {
                         return anyType;
                     }
                     if (leftType.symbol === globalThisSymbol) {
@@ -56567,7 +60610,7 @@ var ts;
                         return anyType;
                     }
                     if (right.escapedText && !checkAndReportErrorForExtendingInterface(node)) {
-                        reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType);
+                        reportNonexistentProperty(right, isThisTypeParameter(leftType) ? apparentType : leftType, isUncheckedJS);
                     }
                     return errorType;
                 }
@@ -56580,37 +60623,58 @@ var ts;
                 }
             }
             else {
-                if (getDeclarationNodeFlagsFromSymbol(prop) & 134217728 && isUncalledFunctionReference(node, prop)) {
+                if (prop.declarations && getDeclarationNodeFlagsFromSymbol(prop) & 134217728 && isUncalledFunctionReference(node, prop)) {
                     addDeprecatedSuggestion(right, prop.declarations, right.escapedText);
                 }
                 checkPropertyNotUsedBeforeDeclaration(prop, node, right);
-                markPropertyAsReferenced(prop, node, left.kind === 107);
+                markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol));
                 getNodeLinks(node).resolvedSymbol = prop;
-                checkPropertyAccessibility(node, left.kind === 105, apparentType, prop);
+                var writing = ts.isWriteAccess(node);
+                checkPropertyAccessibility(node, left.kind === 106, writing, apparentType, prop);
                 if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) {
                     error(right, ts.Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, ts.idText(right));
                     return errorType;
                 }
-                propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : getConstraintForLocation(getTypeOfSymbol(prop), node);
+                propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getSetAccessorTypeOfSymbol(prop) : getTypeOfSymbol(prop);
             }
-            return getFlowTypeOfAccessExpression(node, prop, propType, right);
+            return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);
         }
-        function getFlowTypeOfAccessExpression(node, prop, propType, errorNode) {
+        function isUncheckedJSSuggestion(node, suggestion, excludeClasses) {
+            var file = ts.getSourceFileOfNode(node);
+            if (file) {
+                if (compilerOptions.checkJs === undefined && file.checkJsDirective === undefined && (file.scriptKind === 1 || file.scriptKind === 2)) {
+                    var declarationFile = ts.forEach(suggestion === null || suggestion === void 0 ? void 0 : suggestion.declarations, ts.getSourceFileOfNode);
+                    return !(file !== declarationFile && !!declarationFile && isGlobalSourceFile(declarationFile))
+                        && !(excludeClasses && suggestion && suggestion.flags & 32)
+                        && !(!!node && excludeClasses && ts.isPropertyAccessExpression(node) && node.expression.kind === 108);
+                }
+            }
+            return false;
+        }
+        function getFlowTypeOfAccessExpression(node, prop, propType, errorNode, checkMode) {
             var assignmentKind = ts.getAssignmentTargetKind(node);
-            if (assignmentKind === 1 ||
-                prop && !(prop.flags & (3 | 4 | 98304)) && !(prop.flags & 8192 && propType.flags & 1048576)) {
+            if (assignmentKind === 1) {
+                return removeMissingType(propType, !!(prop && prop.flags & 16777216));
+            }
+            if (prop &&
+                !(prop.flags & (3 | 4 | 98304))
+                && !(prop.flags & 8192 && propType.flags & 1048576)
+                && !isDuplicatedCommonJSExport(prop.declarations)) {
                 return propType;
             }
             if (propType === autoType) {
                 return getFlowTypeOfProperty(node, prop);
             }
+            propType = getNarrowableTypeForReference(propType, node, checkMode);
             var assumeUninitialized = false;
-            if (strictNullChecks && strictPropertyInitialization && ts.isAccessExpression(node) && node.expression.kind === 107) {
+            if (strictNullChecks && strictPropertyInitialization && ts.isAccessExpression(node) && node.expression.kind === 108) {
                 var declaration = prop && prop.valueDeclaration;
-                if (declaration && isInstancePropertyWithoutInitializer(declaration)) {
-                    var flowContainer = getControlFlowContainer(node);
-                    if (flowContainer.kind === 166 && flowContainer.parent === declaration.parent && !(declaration.flags & 8388608)) {
-                        assumeUninitialized = true;
+                if (declaration && isPropertyWithoutInitializer(declaration)) {
+                    if (!ts.isStatic(declaration)) {
+                        var flowContainer = getControlFlowContainer(node);
+                        if (flowContainer.kind === 170 && flowContainer.parent === declaration.parent && !(declaration.flags & 8388608)) {
+                            assumeUninitialized = true;
+                        }
                     }
                 }
             }
@@ -56634,14 +60698,15 @@ var ts;
             }
             var diagnosticMessage;
             var declarationName = ts.idText(right);
-            if (isInPropertyInitializer(node)
+            if (isInPropertyInitializerOrClassStaticBlock(node)
+                && !isOptionalPropertyDeclaration(valueDeclaration)
                 && !(ts.isAccessExpression(node) && ts.isAccessExpression(node.expression))
                 && !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)
-                && !isPropertyDeclaredInAncestorClass(prop)) {
+                && (compilerOptions.useDefineForClassFields || !isPropertyDeclaredInAncestorClass(prop))) {
                 diagnosticMessage = error(right, ts.Diagnostics.Property_0_is_used_before_its_initialization, declarationName);
             }
-            else if (valueDeclaration.kind === 252 &&
-                node.parent.kind !== 173 &&
+            else if (valueDeclaration.kind === 256 &&
+                node.parent.kind !== 177 &&
                 !(valueDeclaration.flags & 8388608) &&
                 !isBlockScopedNameDeclaredBeforeUse(valueDeclaration, right)) {
                 diagnosticMessage = error(right, ts.Diagnostics.Class_0_used_before_its_declaration, declarationName);
@@ -56650,26 +60715,29 @@ var ts;
                 ts.addRelatedInfo(diagnosticMessage, ts.createDiagnosticForNode(valueDeclaration, ts.Diagnostics._0_is_declared_here, declarationName));
             }
         }
-        function isInPropertyInitializer(node) {
+        function isInPropertyInitializerOrClassStaticBlock(node) {
             return !!ts.findAncestor(node, function (node) {
                 switch (node.kind) {
-                    case 163:
+                    case 166:
                         return true;
-                    case 288:
-                    case 165:
-                    case 167:
+                    case 294:
                     case 168:
-                    case 290:
-                    case 158:
-                    case 228:
-                    case 283:
-                    case 280:
-                    case 281:
-                    case 282:
-                    case 275:
-                    case 223:
+                    case 171:
+                    case 172:
+                    case 296:
+                    case 161:
+                    case 232:
+                    case 287:
+                    case 284:
+                    case 285:
                     case 286:
+                    case 279:
+                    case 227:
+                    case 290:
                         return false;
+                    case 213:
+                    case 237:
+                        return ts.isBlock(node.parent) && ts.isClassStaticBlockDeclaration(node.parent.parent) ? true : "quit";
                     default:
                         return ts.isExpressionNode(node) ? false : "quit";
                 }
@@ -56698,13 +60766,13 @@ var ts;
             }
             return getIntersectionType(x);
         }
-        function reportNonexistentProperty(propNode, containingType) {
+        function reportNonexistentProperty(propNode, containingType, isUncheckedJS) {
             var errorInfo;
             var relatedInfo;
             if (!ts.isPrivateIdentifier(propNode) && containingType.flags & 1048576 && !(containingType.flags & 131068)) {
                 for (var _i = 0, _a = containingType.types; _i < _a.length; _i++) {
                     var subtype = _a[_i];
-                    if (!getPropertyOfType(subtype, propNode.escapedText) && !getIndexInfoOfType(subtype, 0)) {
+                    if (!getPropertyOfType(subtype, propNode.escapedText) && !getApplicableIndexInfoForName(subtype, propNode.escapedText)) {
                         errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1, ts.declarationNameToString(propNode), typeToString(subtype));
                         break;
                     }
@@ -56732,11 +60800,15 @@ var ts;
                         var suggestion = getSuggestedSymbolForNonexistentProperty(propNode, containingType);
                         if (suggestion !== undefined) {
                             var suggestedName = ts.symbolName(suggestion);
-                            errorInfo = ts.chainDiagnosticMessages(errorInfo, ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, missingProperty, container, suggestedName);
+                            var message = isUncheckedJS ? ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2 : ts.Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2;
+                            errorInfo = ts.chainDiagnosticMessages(errorInfo, message, missingProperty, container, suggestedName);
                             relatedInfo = suggestion.valueDeclaration && ts.createDiagnosticForNode(suggestion.valueDeclaration, ts.Diagnostics._0_is_declared_here, suggestedName);
                         }
                         else {
-                            errorInfo = ts.chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), ts.Diagnostics.Property_0_does_not_exist_on_type_1, missingProperty, container);
+                            var diagnostic = containerSeemsToBeEmptyDomElement(containingType)
+                                ? ts.Diagnostics.Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom
+                                : ts.Diagnostics.Property_0_does_not_exist_on_type_1;
+                            errorInfo = ts.chainDiagnosticMessages(elaborateNeverIntersection(errorInfo, containingType), diagnostic, missingProperty, container);
                         }
                     }
                 }
@@ -56745,11 +60817,16 @@ var ts;
             if (relatedInfo) {
                 ts.addRelatedInfo(resultDiagnostic, relatedInfo);
             }
-            diagnostics.add(resultDiagnostic);
+            addErrorOrSuggestion(!isUncheckedJS || errorInfo.code !== ts.Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, resultDiagnostic);
+        }
+        function containerSeemsToBeEmptyDomElement(containingType) {
+            return (compilerOptions.lib && !compilerOptions.lib.includes("dom")) &&
+                everyContainedType(containingType, function (type) { return type.symbol && /^(EventTarget|Node|((HTML[a-zA-Z]*)?Element))$/.test(ts.unescapeLeadingUnderscores(type.symbol.escapedName)); }) &&
+                isEmptyObjectType(containingType);
         }
         function typeHasStaticProperty(propName, containingType) {
             var prop = containingType.symbol && getPropertyOfType(getTypeOfSymbol(containingType.symbol), propName);
-            return prop !== undefined && prop.valueDeclaration && ts.hasSyntacticModifier(prop.valueDeclaration, 32);
+            return prop !== undefined && !!prop.valueDeclaration && ts.isStatic(prop.valueDeclaration);
         }
         function getSuggestedLibForNonExistentName(name) {
             var missingName = diagnosticName(name);
@@ -56779,8 +60856,19 @@ var ts;
                 }
             }
         }
+        function getSuggestedSymbolForNonexistentClassMember(name, baseType) {
+            return getSpellingSuggestionForName(name, getPropertiesOfType(baseType), 106500);
+        }
         function getSuggestedSymbolForNonexistentProperty(name, containingType) {
-            return getSpellingSuggestionForName(ts.isString(name) ? name : ts.idText(name), getPropertiesOfType(containingType), 111551);
+            var props = getPropertiesOfType(containingType);
+            if (typeof name !== "string") {
+                var parent_2 = name.parent;
+                if (ts.isPropertyAccessExpression(parent_2)) {
+                    props = ts.filter(props, function (prop) { return isValidPropertyAccessForCompletions(parent_2, containingType, prop); });
+                }
+                name = ts.idText(name);
+            }
+            return getSpellingSuggestionForName(name, props, 111551);
         }
         function getSuggestedSymbolForNonexistentJSXAttribute(name, containingType) {
             var strName = ts.isString(name) ? name : ts.idText(name);
@@ -56799,7 +60887,19 @@ var ts;
             var result = resolveNameHelper(location, outerName, meaning, undefined, outerName, false, false, function (symbols, name, meaning) {
                 ts.Debug.assertEqual(outerName, name, "name should equal outerName");
                 var symbol = getSymbol(symbols, name, meaning);
-                return symbol || getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), ts.arrayFrom(symbols.values()), meaning);
+                if (symbol)
+                    return symbol;
+                var candidates;
+                if (symbols === globals) {
+                    var primitives = ts.mapDefined(["string", "number", "boolean", "object", "bigint", "symbol"], function (s) { return symbols.has((s.charAt(0).toUpperCase() + s.slice(1)))
+                        ? createSymbol(524288, s)
+                        : undefined; });
+                    candidates = primitives.concat(ts.arrayFrom(symbols.values()));
+                }
+                else {
+                    candidates = ts.arrayFrom(symbols.values());
+                }
+                return getSpellingSuggestionForName(ts.unescapeLeadingUnderscores(name), candidates, meaning);
             });
             return result;
         }
@@ -56837,6 +60937,10 @@ var ts;
             }
             return suggestion;
         }
+        function getSuggestedTypeForNonexistentStringLiteralType(source, target) {
+            var candidates = target.types.filter(function (type) { return !!(type.flags & 128); });
+            return ts.getSpellingSuggestion(source.value, candidates, function (type) { return type.value; });
+        }
         function getSpellingSuggestionForName(name, symbols, meaning) {
             return ts.getSpellingSuggestion(name, symbols, getCandidateName);
             function getCandidateName(candidate) {
@@ -56856,20 +60960,20 @@ var ts;
                 return undefined;
             }
         }
-        function markPropertyAsReferenced(prop, nodeForCheckWriteOnly, isThisAccess) {
+        function markPropertyAsReferenced(prop, nodeForCheckWriteOnly, isSelfTypeAccess) {
             var valueDeclaration = prop && (prop.flags & 106500) && prop.valueDeclaration;
             if (!valueDeclaration) {
                 return;
             }
             var hasPrivateModifier = ts.hasEffectiveModifier(valueDeclaration, 8);
-            var hasPrivateIdentifier = ts.isNamedDeclaration(prop.valueDeclaration) && ts.isPrivateIdentifier(prop.valueDeclaration.name);
+            var hasPrivateIdentifier = prop.valueDeclaration && ts.isNamedDeclaration(prop.valueDeclaration) && ts.isPrivateIdentifier(prop.valueDeclaration.name);
             if (!hasPrivateModifier && !hasPrivateIdentifier) {
                 return;
             }
             if (nodeForCheckWriteOnly && ts.isWriteOnlyAccess(nodeForCheckWriteOnly) && !(prop.flags & 65536)) {
                 return;
             }
-            if (isThisAccess) {
+            if (isSelfTypeAccess) {
                 var containingMethod = ts.findAncestor(nodeForCheckWriteOnly, ts.isFunctionLikeDeclaration);
                 if (containingMethod && containingMethod.symbol === prop) {
                     return;
@@ -56877,58 +60981,65 @@ var ts;
             }
             (ts.getCheckFlags(prop) & 1 ? getSymbolLinks(prop).target : prop).isReferenced = 67108863;
         }
+        function isSelfTypeAccess(name, parent) {
+            return name.kind === 108
+                || !!parent && ts.isEntityNameExpression(name) && parent === getResolvedSymbol(ts.getFirstIdentifier(name));
+        }
         function isValidPropertyAccess(node, propertyName) {
             switch (node.kind) {
-                case 201:
-                    return isValidPropertyAccessWithType(node, node.expression.kind === 105, propertyName, getWidenedType(checkExpression(node.expression)));
-                case 157:
+                case 205:
+                    return isValidPropertyAccessWithType(node, node.expression.kind === 106, propertyName, getWidenedType(checkExpression(node.expression)));
+                case 160:
                     return isValidPropertyAccessWithType(node, false, propertyName, getWidenedType(checkExpression(node.left)));
-                case 195:
+                case 199:
                     return isValidPropertyAccessWithType(node, false, propertyName, getTypeFromTypeNode(node));
             }
         }
         function isValidPropertyAccessForCompletions(node, type, property) {
-            return isValidPropertyAccessWithType(node, node.kind === 201 && node.expression.kind === 105, property.escapedName, type);
+            return isPropertyAccessible(node, node.kind === 205 && node.expression.kind === 106, false, type, property);
         }
         function isValidPropertyAccessWithType(node, isSuper, propertyName, type) {
-            if (type === errorType || isTypeAny(type)) {
+            if (isTypeAny(type)) {
                 return true;
             }
             var prop = getPropertyOfType(type, propertyName);
-            if (prop) {
-                if (ts.isPropertyAccessExpression(node) && prop.valueDeclaration && ts.isPrivateIdentifierPropertyDeclaration(prop.valueDeclaration)) {
-                    var declClass_1 = ts.getContainingClass(prop.valueDeclaration);
-                    return !ts.isOptionalChain(node) && !!ts.findAncestor(node, function (parent) { return parent === declClass_1; });
-                }
-                return checkPropertyAccessibility(node, isSuper, type, prop);
+            return !!prop && isPropertyAccessible(node, isSuper, false, type, prop);
+        }
+        function isPropertyAccessible(node, isSuper, isWrite, containingType, property) {
+            if (isTypeAny(containingType)) {
+                return true;
             }
-            return ts.isInJSFile(node) && (type.flags & 1048576) !== 0 && type.types.some(function (elementType) { return isValidPropertyAccessWithType(node, isSuper, propertyName, elementType); });
+            if (property.valueDeclaration && ts.isPrivateIdentifierClassElementDeclaration(property.valueDeclaration)) {
+                var declClass_1 = ts.getContainingClass(property.valueDeclaration);
+                return !ts.isOptionalChain(node) && !!ts.findAncestor(node, function (parent) { return parent === declClass_1; });
+            }
+            return checkPropertyAccessibilityAtLocation(node, isSuper, isWrite, containingType, property);
         }
         function getForInVariableSymbol(node) {
             var initializer = node.initializer;
-            if (initializer.kind === 250) {
+            if (initializer.kind === 254) {
                 var variable = initializer.declarations[0];
                 if (variable && !ts.isBindingPattern(variable.name)) {
                     return getSymbolOfNode(variable);
                 }
             }
-            else if (initializer.kind === 78) {
+            else if (initializer.kind === 79) {
                 return getResolvedSymbol(initializer);
             }
             return undefined;
         }
         function hasNumericPropertyNames(type) {
-            return getIndexTypeOfType(type, 1) && !getIndexTypeOfType(type, 0);
+            return getIndexInfosOfType(type).length === 1 && !!getIndexInfoOfType(type, numberType);
         }
         function isForInVariableForNumericPropertyNames(expr) {
             var e = ts.skipParentheses(expr);
-            if (e.kind === 78) {
+            if (e.kind === 79) {
                 var symbol = getResolvedSymbol(e);
                 if (symbol.flags & 3) {
                     var child = expr;
                     var node = expr.parent;
                     while (node) {
-                        if (node.kind === 238 &&
+                        if (node.kind === 242 &&
                             child === node.statement &&
                             getForInVariableSymbol(node) === symbol &&
                             hasNumericPropertyNames(getTypeOfExpression(node.expression))) {
@@ -56941,20 +61052,20 @@ var ts;
             }
             return false;
         }
-        function checkIndexedAccess(node) {
-            return node.flags & 32 ? checkElementAccessChain(node) :
-                checkElementAccessExpression(node, checkNonNullExpression(node.expression));
+        function checkIndexedAccess(node, checkMode) {
+            return node.flags & 32 ? checkElementAccessChain(node, checkMode) :
+                checkElementAccessExpression(node, checkNonNullExpression(node.expression), checkMode);
         }
-        function checkElementAccessChain(node) {
+        function checkElementAccessChain(node, checkMode) {
             var exprType = checkExpression(node.expression);
             var nonOptionalType = getOptionalExpressionType(exprType, node.expression);
-            return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression)), node, nonOptionalType !== exprType);
+            return propagateOptionalTypeMarker(checkElementAccessExpression(node, checkNonNullType(nonOptionalType, node.expression), checkMode), node, nonOptionalType !== exprType);
         }
-        function checkElementAccessExpression(node, exprType) {
+        function checkElementAccessExpression(node, exprType, checkMode) {
             var objectType = ts.getAssignmentTargetKind(node) !== 0 || isMethodAccessForCall(node) ? getWidenedType(exprType) : exprType;
             var indexExpression = node.argumentExpression;
             var indexType = checkExpression(indexExpression);
-            if (objectType === errorType || objectType === silentNeverType) {
+            if (isErrorType(objectType) || objectType === silentNeverType) {
                 return objectType;
             }
             if (isConstEnumObjectType(objectType) && !ts.isStringLiteralLike(indexExpression)) {
@@ -56963,40 +61074,10 @@ var ts;
             }
             var effectiveIndexType = isForInVariableForNumericPropertyNames(indexExpression) ? numberType : indexType;
             var accessFlags = ts.isAssignmentTarget(node) ?
-                2 | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 1 : 0) :
-                0;
-            var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, undefined, node, accessFlags | 16) || errorType;
-            return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node);
-        }
-        function checkThatExpressionIsProperSymbolReference(expression, expressionType, reportError) {
-            if (expressionType === errorType) {
-                return false;
-            }
-            if (!ts.isWellKnownSymbolSyntactically(expression)) {
-                return false;
-            }
-            if ((expressionType.flags & 12288) === 0) {
-                if (reportError) {
-                    error(expression, ts.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol, ts.getTextOfNode(expression));
-                }
-                return false;
-            }
-            var leftHandSide = expression.expression;
-            var leftHandSideSymbol = getResolvedSymbol(leftHandSide);
-            if (!leftHandSideSymbol) {
-                return false;
-            }
-            var globalESSymbol = getGlobalESSymbolConstructorSymbol(true);
-            if (!globalESSymbol) {
-                return false;
-            }
-            if (leftHandSideSymbol !== globalESSymbol) {
-                if (reportError) {
-                    error(leftHandSide, ts.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object);
-                }
-                return false;
-            }
-            return true;
+                4 | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? 2 : 0) :
+                32;
+            var indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, accessFlags, node) || errorType;
+            return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, getNodeLinks(node).resolvedSymbol, indexedAccessType, indexExpression, checkMode), node);
         }
         function callLikeExpressionMayHaveTypeArguments(node) {
             return ts.isCallOrNewExpression(node) || ts.isTaggedTemplateExpression(node) || ts.isJsxOpeningLikeElement(node);
@@ -57005,13 +61086,13 @@ var ts;
             if (callLikeExpressionMayHaveTypeArguments(node)) {
                 ts.forEach(node.typeArguments, checkSourceElement);
             }
-            if (node.kind === 205) {
+            if (node.kind === 209) {
                 checkExpression(node.template);
             }
             else if (ts.isJsxOpeningLikeElement(node)) {
                 checkExpression(node.attributes);
             }
-            else if (node.kind !== 161) {
+            else if (node.kind !== 164) {
                 ts.forEach(node.arguments, function (argument) {
                     checkExpression(argument);
                 });
@@ -57060,7 +61141,7 @@ var ts;
             }
         }
         function isSpreadArgument(arg) {
-            return !!arg && (arg.kind === 220 || arg.kind === 227 && arg.isSpread);
+            return !!arg && (arg.kind === 224 || arg.kind === 231 && arg.isSpread);
         }
         function getSpreadArgumentIndex(args) {
             return ts.findIndex(args, isSpreadArgument);
@@ -57077,9 +61158,9 @@ var ts;
             var callIsIncomplete = false;
             var effectiveParameterCount = getParameterCount(signature);
             var effectiveMinimumArguments = getMinArgumentCount(signature);
-            if (node.kind === 205) {
+            if (node.kind === 209) {
                 argCount = args.length;
-                if (node.template.kind === 218) {
+                if (node.template.kind === 222) {
                     var lastSpan = ts.last(node.template.templateSpans);
                     callIsIncomplete = ts.nodeIsMissing(lastSpan.literal) || !!lastSpan.literal.isUnterminated;
                 }
@@ -57089,7 +61170,7 @@ var ts;
                     callIsIncomplete = !!templateLiteral.isUnterminated;
                 }
             }
-            else if (node.kind === 161) {
+            else if (node.kind === 164) {
                 argCount = getDecoratorArgumentCount(node, signature);
             }
             else if (ts.isJsxOpeningLikeElement(node)) {
@@ -57102,7 +61183,7 @@ var ts;
                 effectiveMinimumArguments = Math.min(effectiveMinimumArguments, 1);
             }
             else if (!node.arguments) {
-                ts.Debug.assert(node.kind === 204);
+                ts.Debug.assert(node.kind === 208);
                 return getMinArgumentCount(signature) === 0;
             }
             else {
@@ -57143,7 +61224,7 @@ var ts;
         function getSingleSignature(type, kind, allowMembers) {
             if (type.flags & 524288) {
                 var resolved = resolveStructuredTypeMembers(type);
-                if (allowMembers || resolved.properties.length === 0 && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {
+                if (allowMembers || resolved.properties.length === 0 && resolved.indexInfos.length === 0) {
                     if (kind === 0 && resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0) {
                         return resolved.callSignatures[0];
                     }
@@ -57164,7 +61245,7 @@ var ts;
             });
             if (!inferenceContext) {
                 applyToReturnTypes(contextualSignature, signature, function (source, target) {
-                    inferTypes(context.inferences, source, target, 64);
+                    inferTypes(context.inferences, source, target, 128);
                 });
             }
             return getSignatureInstantiation(signature, getInferredTypes(context), ts.isInJSFile(contextualSignature.declaration));
@@ -57188,7 +61269,7 @@ var ts;
             if (ts.isJsxOpeningLikeElement(node)) {
                 return inferJsxTypeArguments(node, signature, checkMode, context);
             }
-            if (node.kind !== 161) {
+            if (node.kind !== 164) {
                 var contextualType = getContextualType(node, ts.every(signature.typeParameters, function (p) { return !!getDefaultFromTypeParameter(p); }) ? 8 : 0);
                 if (contextualType) {
                     var outerContext = getInferenceContext(node);
@@ -57199,7 +61280,7 @@ var ts;
                         getOrCreateTypeFromSignature(getSignatureInstantiationWithoutFillingInTypeArguments(contextualSignature, contextualSignature.typeParameters)) :
                         instantiatedType;
                     var inferenceTargetType = getReturnTypeOfSignature(signature);
-                    inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 64);
+                    inferTypes(context.inferences, inferenceSourceType, inferenceTargetType, 128);
                     var returnContext = createInferenceContext(signature.typeParameters, signature, context.flags);
                     var returnSourceType = instantiateType(contextualType, outerContext && outerContext.returnMapper);
                     inferTypes(returnContext.inferences, returnSourceType, inferenceTargetType);
@@ -57221,7 +61302,7 @@ var ts;
             }
             for (var i = 0; i < argCount; i++) {
                 var arg = args[i];
-                if (arg.kind !== 222) {
+                if (arg.kind !== 226) {
                     var paramType = getTypeAtPosition(signature, i);
                     var argType = checkExpressionWithContextualType(arg, paramType, context, checkMode);
                     inferTypes(context.inferences, argType, paramType);
@@ -57243,7 +61324,7 @@ var ts;
             if (index >= argCount - 1) {
                 var arg = args[argCount - 1];
                 if (isSpreadArgument(arg)) {
-                    return getMutableArrayOrTupleType(arg.kind === 227 ? arg.type :
+                    return getMutableArrayOrTupleType(arg.kind === 231 ? arg.type :
                         checkExpressionWithContextualType(arg.expression, restType, context, checkMode));
                 }
             }
@@ -57253,24 +61334,24 @@ var ts;
             for (var i = index; i < argCount; i++) {
                 var arg = args[i];
                 if (isSpreadArgument(arg)) {
-                    var spreadType = arg.kind === 227 ? arg.type : checkExpression(arg.expression);
+                    var spreadType = arg.kind === 231 ? arg.type : checkExpression(arg.expression);
                     if (isArrayLikeType(spreadType)) {
                         types.push(spreadType);
                         flags.push(8);
                     }
                     else {
-                        types.push(checkIteratedTypeOrElementType(33, spreadType, undefinedType, arg.kind === 220 ? arg.expression : arg));
+                        types.push(checkIteratedTypeOrElementType(33, spreadType, undefinedType, arg.kind === 224 ? arg.expression : arg));
                         flags.push(4);
                     }
                 }
                 else {
-                    var contextualType = getIndexedAccessType(restType, getLiteralType(i - index));
+                    var contextualType = getIndexedAccessType(restType, getNumberLiteralType(i - index), 256);
                     var argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode);
                     var hasPrimitiveContextualType = maybeTypeOfKind(contextualType, 131068 | 4194304 | 134217728 | 268435456);
                     types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType));
                     flags.push(1);
                 }
-                if (arg.kind === 227 && arg.tupleNameSource) {
+                if (arg.kind === 231 && arg.tupleNameSource) {
                     names.push(arg.tupleNameSource);
                 }
             }
@@ -57401,7 +61482,7 @@ var ts;
                 return undefined;
             }
             var thisType = getThisTypeOfSignature(signature);
-            if (thisType && thisType !== voidType && node.kind !== 204) {
+            if (thisType && thisType !== voidType && node.kind !== 208) {
                 var thisArgumentNode = getThisArgumentOfCall(node);
                 var thisArgumentType = getThisArgumentType(thisArgumentNode);
                 var errorNode = reportErrors ? (thisArgumentNode || node) : undefined;
@@ -57416,7 +61497,7 @@ var ts;
             var argCount = restType ? Math.min(getParameterCount(signature) - 1, args.length) : args.length;
             for (var i = 0; i < argCount; i++) {
                 var arg = args[i];
-                if (arg.kind !== 222) {
+                if (arg.kind !== 226) {
                     var paramType = getTypeAtPosition(signature, i);
                     var argType = checkExpressionWithContextualType(arg, paramType, undefined, checkMode);
                     var checkArgType = checkMode & 4 ? getRegularTypeOfObjectLiteral(argType) : argType;
@@ -57454,8 +61535,10 @@ var ts;
             }
         }
         function getThisArgumentOfCall(node) {
-            if (node.kind === 203) {
-                var callee = ts.skipOuterExpressions(node.expression);
+            var expression = node.kind === 207 ? node.expression :
+                node.kind === 209 ? node.tag : undefined;
+            if (expression) {
+                var callee = ts.skipOuterExpressions(expression);
                 if (ts.isAccessExpression(callee)) {
                     return callee.expression;
                 }
@@ -57468,17 +61551,17 @@ var ts;
             return result;
         }
         function getEffectiveCallArguments(node) {
-            if (node.kind === 205) {
+            if (node.kind === 209) {
                 var template = node.template;
                 var args_3 = [createSyntheticExpression(template, getGlobalTemplateStringsArrayType())];
-                if (template.kind === 218) {
+                if (template.kind === 222) {
                     ts.forEach(template.templateSpans, function (span) {
                         args_3.push(span.expression);
                     });
                 }
                 return args_3;
             }
-            if (node.kind === 161) {
+            if (node.kind === 164) {
                 return getEffectiveDecoratorArguments(node);
             }
             if (ts.isJsxOpeningLikeElement(node)) {
@@ -57488,9 +61571,9 @@ var ts;
             var spreadIndex = getSpreadArgumentIndex(args);
             if (spreadIndex >= 0) {
                 var effectiveArgs_1 = args.slice(0, spreadIndex);
-                var _loop_20 = function (i) {
+                var _loop_23 = function (i) {
                     var arg = args[i];
-                    var spreadType = arg.kind === 220 && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
+                    var spreadType = arg.kind === 224 && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
                     if (spreadType && isTupleType(spreadType)) {
                         ts.forEach(getTypeArguments(spreadType), function (t, i) {
                             var _a;
@@ -57504,7 +61587,7 @@ var ts;
                     }
                 };
                 for (var i = spreadIndex; i < args.length; i++) {
-                    _loop_20(i);
+                    _loop_23(i);
                 }
                 return effectiveArgs_1;
             }
@@ -57514,23 +61597,23 @@ var ts;
             var parent = node.parent;
             var expr = node.expression;
             switch (parent.kind) {
-                case 252:
-                case 221:
+                case 256:
+                case 225:
                     return [
                         createSyntheticExpression(expr, getTypeOfSymbol(getSymbolOfNode(parent)))
                     ];
-                case 160:
+                case 163:
                     var func = parent.parent;
                     return [
-                        createSyntheticExpression(expr, parent.parent.kind === 166 ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType),
+                        createSyntheticExpression(expr, parent.parent.kind === 170 ? getTypeOfSymbol(getSymbolOfNode(func)) : errorType),
                         createSyntheticExpression(expr, anyType),
                         createSyntheticExpression(expr, numberType)
                     ];
-                case 163:
-                case 165:
-                case 167:
+                case 166:
                 case 168:
-                    var hasPropDesc = parent.kind !== 163 && languageVersion !== 0;
+                case 171:
+                case 172:
+                    var hasPropDesc = parent.kind !== 166 && languageVersion !== 0;
                     return [
                         createSyntheticExpression(expr, getParentTypeOfClassElement(parent)),
                         createSyntheticExpression(expr, getClassElementPropertyKeyType(parent)),
@@ -57541,16 +61624,16 @@ var ts;
         }
         function getDecoratorArgumentCount(node, signature) {
             switch (node.parent.kind) {
-                case 252:
-                case 221:
+                case 256:
+                case 225:
                     return 1;
-                case 163:
+                case 166:
                     return 2;
-                case 165:
-                case 167:
                 case 168:
+                case 171:
+                case 172:
                     return languageVersion === 0 || signature.parameters.length <= 2 ? 2 : 3;
-                case 160:
+                case 163:
                     return 3;
                 default:
                     return ts.Debug.fail();
@@ -57586,7 +61669,7 @@ var ts;
                 return false;
             var symbol = resolveName(node.expression, node.expression.escapedText, 111551, undefined, undefined, false);
             var decl = symbol === null || symbol === void 0 ? void 0 : symbol.valueDeclaration;
-            if (!decl || !ts.isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !ts.isNewExpression(decl.parent.parent) || !ts.isIdentifier(decl.parent.parent.expression)) {
+            if (!decl || !ts.isParameter(decl) || !ts.isFunctionExpressionOrArrowFunction(decl.parent) || !ts.isNewExpression(decl.parent.parent) || !ts.isIdentifier(decl.parent.parent.expression)) {
                 return false;
             }
             var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(false);
@@ -57596,77 +61679,61 @@ var ts;
             return constructorSymbol === globalPromiseSymbol;
         }
         function getArgumentArityError(node, signatures, args) {
+            var _a;
+            var spreadIndex = getSpreadArgumentIndex(args);
+            if (spreadIndex > -1) {
+                return ts.createDiagnosticForNode(args[spreadIndex], ts.Diagnostics.A_spread_argument_must_either_have_a_tuple_type_or_be_passed_to_a_rest_parameter);
+            }
             var min = Number.POSITIVE_INFINITY;
             var max = Number.NEGATIVE_INFINITY;
-            var belowArgCount = Number.NEGATIVE_INFINITY;
-            var aboveArgCount = Number.POSITIVE_INFINITY;
-            var argCount = args.length;
+            var maxBelow = Number.NEGATIVE_INFINITY;
+            var minAbove = Number.POSITIVE_INFINITY;
             var closestSignature;
             for (var _i = 0, signatures_8 = signatures; _i < signatures_8.length; _i++) {
                 var sig = signatures_8[_i];
-                var minCount = getMinArgumentCount(sig);
-                var maxCount = getParameterCount(sig);
-                if (minCount < argCount && minCount > belowArgCount)
-                    belowArgCount = minCount;
-                if (argCount < maxCount && maxCount < aboveArgCount)
-                    aboveArgCount = maxCount;
-                if (minCount < min) {
-                    min = minCount;
+                var minParameter = getMinArgumentCount(sig);
+                var maxParameter = getParameterCount(sig);
+                if (minParameter < min) {
+                    min = minParameter;
                     closestSignature = sig;
                 }
-                max = Math.max(max, maxCount);
+                max = Math.max(max, maxParameter);
+                if (minParameter < args.length && minParameter > maxBelow)
+                    maxBelow = minParameter;
+                if (args.length < maxParameter && maxParameter < minAbove)
+                    minAbove = maxParameter;
             }
             var hasRestParameter = ts.some(signatures, hasEffectiveRestParameter);
-            var paramRange = hasRestParameter ? min :
-                min < max ? min + "-" + max :
-                    min;
-            var hasSpreadArgument = getSpreadArgumentIndex(args) > -1;
-            if (argCount <= max && hasSpreadArgument) {
-                argCount--;
-            }
-            var spanArray;
-            var related;
-            var error = hasRestParameter || hasSpreadArgument ?
-                hasRestParameter && hasSpreadArgument ?
-                    ts.Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more :
-                    hasRestParameter ?
-                        ts.Diagnostics.Expected_at_least_0_arguments_but_got_1 :
-                        ts.Diagnostics.Expected_0_arguments_but_got_1_or_more :
-                paramRange === 1 && argCount === 0 && isPromiseResolveArityError(node) ?
-                    ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise :
-                    ts.Diagnostics.Expected_0_arguments_but_got_1;
-            if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) {
-                var paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount];
-                if (paramDecl) {
-                    related = ts.createDiagnosticForNode(paramDecl, ts.isBindingPattern(paramDecl.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided :
-                        ts.isRestParameter(paramDecl) ? ts.Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided : ts.Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !ts.isBindingPattern(paramDecl.name) ? ts.idText(ts.getFirstIdentifier(paramDecl.name)) : undefined);
-                }
-            }
-            if (min < argCount && argCount < max) {
-                return getDiagnosticForCallNode(node, ts.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, argCount, belowArgCount, aboveArgCount);
-            }
-            if (!hasSpreadArgument && argCount < min) {
-                var diagnostic_1 = getDiagnosticForCallNode(node, error, paramRange, argCount);
-                return related ? ts.addRelatedInfo(diagnostic_1, related) : diagnostic_1;
-            }
-            if (hasRestParameter || hasSpreadArgument) {
-                spanArray = ts.factory.createNodeArray(args);
-                if (hasSpreadArgument && argCount) {
-                    var nextArg = ts.elementAt(args, getSpreadArgumentIndex(args) + 1) || undefined;
-                    spanArray = ts.factory.createNodeArray(args.slice(max > argCount && nextArg ? args.indexOf(nextArg) : Math.min(max, args.length - 1)));
+            var parameterRange = hasRestParameter ? min
+                : min < max ? min + "-" + max
+                    : min;
+            var error = hasRestParameter ? ts.Diagnostics.Expected_at_least_0_arguments_but_got_1
+                : parameterRange === 1 && args.length === 0 && isPromiseResolveArityError(node) ? ts.Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise
+                    : ts.Diagnostics.Expected_0_arguments_but_got_1;
+            if (min < args.length && args.length < max) {
+                return getDiagnosticForCallNode(node, ts.Diagnostics.No_overload_expects_0_arguments_but_overloads_do_exist_that_expect_either_1_or_2_arguments, args.length, maxBelow, minAbove);
+            }
+            else if (args.length < min) {
+                var diagnostic = getDiagnosticForCallNode(node, error, parameterRange, args.length);
+                var parameter = (_a = closestSignature === null || closestSignature === void 0 ? void 0 : closestSignature.declaration) === null || _a === void 0 ? void 0 : _a.parameters[closestSignature.thisParameter ? args.length + 1 : args.length];
+                if (parameter) {
+                    var parameterError = ts.createDiagnosticForNode(parameter, ts.isBindingPattern(parameter.name) ? ts.Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided
+                        : ts.isRestParameter(parameter) ? ts.Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided
+                            : ts.Diagnostics.An_argument_for_0_was_not_provided, !parameter.name ? args.length : !ts.isBindingPattern(parameter.name) ? ts.idText(ts.getFirstIdentifier(parameter.name)) : undefined);
+                    return ts.addRelatedInfo(diagnostic, parameterError);
                 }
+                return diagnostic;
             }
             else {
-                spanArray = ts.factory.createNodeArray(args.slice(max));
-            }
-            var pos = ts.first(spanArray).pos;
-            var end = ts.last(spanArray).end;
-            if (end === pos) {
-                end++;
+                var errorSpan = ts.factory.createNodeArray(args.slice(max));
+                var pos = ts.first(errorSpan).pos;
+                var end = ts.last(errorSpan).end;
+                if (end === pos) {
+                    end++;
+                }
+                ts.setTextRangePosEnd(errorSpan, pos, end);
+                return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), errorSpan, error, parameterRange, args.length);
             }
-            ts.setTextRangePosEnd(spanArray, pos, end);
-            var diagnostic = ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), spanArray, error, paramRange, argCount);
-            return related ? ts.addRelatedInfo(diagnostic, related) : diagnostic;
         }
         function getTypeArgumentArityError(node, signatures, typeArguments) {
             var argCount = typeArguments.length;
@@ -57695,14 +61762,14 @@ var ts;
             return ts.createDiagnosticForNodeArray(ts.getSourceFileOfNode(node), typeArguments, ts.Diagnostics.Expected_0_type_arguments_but_got_1, belowArgCount === -Infinity ? aboveArgCount : belowArgCount, argCount);
         }
         function resolveCall(node, signatures, candidatesOutArray, checkMode, callChainFlags, fallbackError) {
-            var isTaggedTemplate = node.kind === 205;
-            var isDecorator = node.kind === 161;
+            var isTaggedTemplate = node.kind === 209;
+            var isDecorator = node.kind === 164;
             var isJsxOpeningOrSelfClosingElement = ts.isJsxOpeningLikeElement(node);
             var reportErrors = !candidatesOutArray && produceDiagnostics;
             var typeArguments;
             if (!isDecorator) {
                 typeArguments = node.typeArguments;
-                if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 105) {
+                if (isTaggedTemplate || isJsxOpeningOrSelfClosingElement || node.expression.kind !== 106) {
                     ts.forEach(typeArguments, checkSourceElement);
                 }
             }
@@ -57721,7 +61788,7 @@ var ts;
             var candidateForArgumentArityError;
             var candidateForTypeArgumentError;
             var result;
-            var signatureHelpTrailingComma = !!(checkMode & 16) && node.kind === 203 && node.arguments.hasTrailingComma;
+            var signatureHelpTrailingComma = !!(checkMode & 16) && node.kind === 207 && node.arguments.hasTrailingComma;
             if (candidates.length > 1) {
                 result = chooseOverload(candidates, subtypeRelation, isSingleNonGenericCandidate, signatureHelpTrailingComma);
             }
@@ -57761,7 +61828,7 @@ var ts;
                         var min_3 = Number.MAX_VALUE;
                         var minIndex = 0;
                         var i_1 = 0;
-                        var _loop_21 = function (c) {
+                        var _loop_24 = function (c) {
                             var chain_2 = function () { return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
                             var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0, true, chain_2);
                             if (diags_2) {
@@ -57779,12 +61846,12 @@ var ts;
                         };
                         for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
                             var c = candidatesForArgumentError_1[_a];
-                            _loop_21(c);
+                            _loop_24(c);
                         }
                         var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
                         ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
                         var chain = ts.chainDiagnosticMessages(ts.map(diags_3, function (d) { return typeof d.messageText === "string" ? d : d.messageText; }), ts.Diagnostics.No_overload_matches_this_call);
-                        var related = __spreadArray([], ts.flatMap(diags_3, function (d) { return d.relatedInformation; }));
+                        var related = __spreadArray([], ts.flatMap(diags_3, function (d) { return d.relatedInformation; }), true);
                         var diag = void 0;
                         if (ts.every(diags_3, function (d) { return d.start === diags_3[0].start && d.length === diags_3[0].length && d.file === diags_3[0].file; })) {
                             var _b = diags_3[0], file = _b.file, start = _b.start, length_7 = _b.length;
@@ -57922,7 +61989,7 @@ var ts;
             }
             var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
             var parameters = [];
-            var _loop_22 = function (i) {
+            var _loop_25 = function (i) {
                 var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
                     i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
                     i < s.parameters.length ? s.parameters[i] : undefined; });
@@ -57930,7 +61997,7 @@ var ts;
                 parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
             };
             for (var i = 0; i < maxNonRestParam; i++) {
-                _loop_22(i);
+                _loop_25(i);
             }
             var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
             var flags = 0;
@@ -58000,7 +62067,7 @@ var ts;
             return maxParamsIndex;
         }
         function resolveCallExpression(node, candidatesOutArray, checkMode) {
-            if (node.expression.kind === 105) {
+            if (node.expression.kind === 106) {
                 var superType = checkSuperExpression(node.expression);
                 if (isTypeAny(superType)) {
                     for (var _i = 0, _a = node.arguments; _i < _a.length; _i++) {
@@ -58009,7 +62076,7 @@ var ts;
                     }
                     return anySignature;
                 }
-                if (superType !== errorType) {
+                if (!isErrorType(superType)) {
                     var baseTypeNode = ts.getEffectiveBaseTypeNode(ts.getContainingClass(node));
                     if (baseTypeNode) {
                         var baseConstructors = getInstantiatedConstructorsForTypeArguments(superType, baseTypeNode.typeArguments, baseTypeNode);
@@ -58035,13 +62102,13 @@ var ts;
                 return silentNeverSignature;
             }
             var apparentType = getApparentType(funcType);
-            if (apparentType === errorType) {
+            if (isErrorType(apparentType)) {
                 return resolveErrorCall(node);
             }
             var callSignatures = getSignaturesOfType(apparentType, 0);
             var numConstructSignatures = getSignaturesOfType(apparentType, 1).length;
             if (isUntypedFunctionCall(funcType, apparentType, callSignatures.length, numConstructSignatures)) {
-                if (funcType !== errorType && node.typeArguments) {
+                if (!isErrorType(funcType) && node.typeArguments) {
                     error(node, ts.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments);
                 }
                 return resolveUntypedCall(node);
@@ -58077,7 +62144,7 @@ var ts;
         }
         function isUntypedFunctionCall(funcType, apparentFuncType, numCallSignatures, numConstructSignatures) {
             return isTypeAny(funcType) || isTypeAny(apparentFuncType) && !!(funcType.flags & 262144) ||
-                !numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & (1048576 | 131072)) && isTypeAssignableTo(funcType, globalFunctionType);
+                !numCallSignatures && !numConstructSignatures && !(apparentFuncType.flags & 1048576) && !(getReducedType(apparentFuncType).flags & 131072) && isTypeAssignableTo(funcType, globalFunctionType);
         }
         function resolveNewExpression(node, candidatesOutArray, checkMode) {
             if (node.arguments && languageVersion < 1) {
@@ -58091,7 +62158,7 @@ var ts;
                 return silentNeverSignature;
             }
             expressionType = getApparentType(expressionType);
-            if (expressionType === errorType) {
+            if (isErrorType(expressionType)) {
                 return resolveErrorCall(node);
             }
             if (isTypeAny(expressionType)) {
@@ -58169,7 +62236,7 @@ var ts;
             }
             var declaration = signature.declaration;
             var modifiers = ts.getSelectedEffectiveModifierFlags(declaration, 24);
-            if (!modifiers || declaration.kind !== 166) {
+            if (!modifiers || declaration.kind !== 170) {
                 return true;
             }
             var declaringClassDeclaration = ts.getClassLikeDeclarationOfSymbol(declaration.parent.symbol);
@@ -58200,8 +62267,8 @@ var ts;
             if (apparentType.flags & 1048576) {
                 var types = apparentType.types;
                 var hasSignatures = false;
-                for (var _i = 0, types_21 = types; _i < types_21.length; _i++) {
-                    var constituent = types_21[_i];
+                for (var _i = 0, types_20 = types; _i < types_20.length; _i++) {
+                    var constituent = types_20[_i];
                     var signatures = getSignaturesOfType(constituent, kind);
                     if (signatures.length !== 0) {
                         hasSignatures = true;
@@ -58280,7 +62347,7 @@ var ts;
         function resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode) {
             var tagType = checkExpression(node.tag);
             var apparentType = getApparentType(tagType);
-            if (apparentType === errorType) {
+            if (isErrorType(apparentType)) {
                 return resolveErrorCall(node);
             }
             var callSignatures = getSignaturesOfType(apparentType, 0);
@@ -58301,16 +62368,16 @@ var ts;
         }
         function getDiagnosticHeadMessageForDecoratorResolution(node) {
             switch (node.parent.kind) {
-                case 252:
-                case 221:
+                case 256:
+                case 225:
                     return ts.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;
-                case 160:
-                    return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
                 case 163:
+                    return ts.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;
+                case 166:
                     return ts.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;
-                case 165:
-                case 167:
                 case 168:
+                case 171:
+                case 172:
                     return ts.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression;
                 default:
                     return ts.Debug.fail();
@@ -58319,7 +62386,7 @@ var ts;
         function resolveDecorator(node, candidatesOutArray, checkMode) {
             var funcType = checkExpression(node.expression);
             var apparentType = getApparentType(funcType);
-            if (apparentType === errorType) {
+            if (isErrorType(apparentType)) {
                 return resolveErrorCall(node);
             }
             var callSignatures = getSignaturesOfType(apparentType, 0);
@@ -58351,7 +62418,7 @@ var ts;
             var exports = namespace && getExportsOfSymbol(namespace);
             var typeSymbol = exports && getSymbol(exports, JsxNames.Element, 788968);
             var returnNode = typeSymbol && nodeBuilder.symbolToEntityName(typeSymbol, 788968, node);
-            var declaration = ts.factory.createFunctionTypeNode(undefined, [ts.factory.createParameterDeclaration(undefined, undefined, undefined, "props", undefined, nodeBuilder.typeToTypeNode(result, node))], returnNode ? ts.factory.createTypeReferenceNode(returnNode, undefined) : ts.factory.createKeywordTypeNode(128));
+            var declaration = ts.factory.createFunctionTypeNode(undefined, [ts.factory.createParameterDeclaration(undefined, undefined, undefined, "props", undefined, nodeBuilder.typeToTypeNode(result, node))], returnNode ? ts.factory.createTypeReferenceNode(returnNode, undefined) : ts.factory.createKeywordTypeNode(130));
             var parameterSymbol = createSymbol(1, "props");
             parameterSymbol.type = result;
             return createSignature(declaration, undefined, undefined, [parameterSymbol], typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType, undefined, 1, 0);
@@ -58369,7 +62436,7 @@ var ts;
             }
             var exprTypes = checkExpression(node.tagName);
             var apparentType = getApparentType(exprTypes);
-            if (apparentType === errorType) {
+            if (isErrorType(apparentType)) {
                 return resolveErrorCall(node);
             }
             var signatures = getUninstantiatedJsxSignaturesOfType(exprTypes, node);
@@ -58391,16 +62458,16 @@ var ts;
         }
         function resolveSignature(node, candidatesOutArray, checkMode) {
             switch (node.kind) {
-                case 203:
+                case 207:
                     return resolveCallExpression(node, candidatesOutArray, checkMode);
-                case 204:
+                case 208:
                     return resolveNewExpression(node, candidatesOutArray, checkMode);
-                case 205:
+                case 209:
                     return resolveTaggedTemplateExpression(node, candidatesOutArray, checkMode);
-                case 161:
+                case 164:
                     return resolveDecorator(node, candidatesOutArray, checkMode);
-                case 275:
-                case 274:
+                case 279:
+                case 278:
                     return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode);
             }
             throw ts.Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable.");
@@ -58478,7 +62545,7 @@ var ts;
             else if (ts.isBinaryExpression(node.parent)) {
                 var parentNode = node.parent;
                 var parentNodeOperator = node.parent.operatorToken.kind;
-                if (parentNodeOperator === 62 && (allowDeclaration || parentNode.right === node)) {
+                if (parentNodeOperator === 63 && (allowDeclaration || parentNode.right === node)) {
                     name = parentNode.left;
                     decl = name;
                 }
@@ -58487,7 +62554,7 @@ var ts;
                         name = parentNode.parent.name;
                         decl = parentNode.parent;
                     }
-                    else if (ts.isBinaryExpression(parentNode.parent) && parentNode.parent.operatorToken.kind === 62 && (allowDeclaration || parentNode.parent.right === parentNode)) {
+                    else if (ts.isBinaryExpression(parentNode.parent) && parentNode.parent.operatorToken.kind === 63 && (allowDeclaration || parentNode.parent.right === parentNode)) {
                         name = parentNode.parent.left;
                         decl = name;
                     }
@@ -58510,10 +62577,10 @@ var ts;
                 return false;
             }
             var parent = node.parent;
-            while (parent && parent.kind === 201) {
+            while (parent && parent.kind === 205) {
                 parent = parent.parent;
             }
-            if (parent && ts.isBinaryExpression(parent) && ts.isPrototypeAccess(parent.left) && parent.operatorToken.kind === 62) {
+            if (parent && ts.isBinaryExpression(parent) && ts.isPrototypeAccess(parent.left) && parent.operatorToken.kind === 63) {
                 var right = ts.getInitializerOfBinaryExpression(parent);
                 return ts.isObjectLiteralExpression(right) && right;
             }
@@ -58527,15 +62594,15 @@ var ts;
                 return nonInferrableType;
             }
             checkDeprecatedSignature(signature, node);
-            if (node.expression.kind === 105) {
+            if (node.expression.kind === 106) {
                 return voidType;
             }
-            if (node.kind === 204) {
+            if (node.kind === 208) {
                 var declaration = signature.declaration;
                 if (declaration &&
-                    declaration.kind !== 166 &&
                     declaration.kind !== 170 &&
-                    declaration.kind !== 175 &&
+                    declaration.kind !== 174 &&
+                    declaration.kind !== 179 &&
                     !ts.isJSDocConstructSignature(declaration) &&
                     !isJSConstructor(declaration)) {
                     if (noImplicitAny) {
@@ -58551,7 +62618,7 @@ var ts;
             if (returnType.flags & 12288 && isSymbolOrSymbolForCall(node)) {
                 return getESSymbolLikeTypeForNode(ts.walkUpParenthesizedExpressions(node.parent));
             }
-            if (node.kind === 203 && !node.questionDotToken && node.parent.kind === 233 &&
+            if (node.kind === 207 && !node.questionDotToken && node.parent.kind === 237 &&
                 returnType.flags & 16384 && getTypePredicateOfSignature(signature)) {
                 if (!ts.isDottedName(node.expression)) {
                     error(node.expression, ts.Diagnostics.Assertions_require_the_call_target_to_be_an_identifier_or_qualified_name);
@@ -58564,8 +62631,8 @@ var ts;
             if (ts.isInJSFile(node)) {
                 var jsSymbol = getSymbolOfExpando(node, false);
                 if ((_a = jsSymbol === null || jsSymbol === void 0 ? void 0 : jsSymbol.exports) === null || _a === void 0 ? void 0 : _a.size) {
-                    var jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, ts.emptyArray, ts.emptyArray, undefined, undefined);
-                    jsAssignmentType.objectFlags |= 16384;
+                    var jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+                    jsAssignmentType.objectFlags |= 8192;
                     return getIntersectionType([returnType, jsAssignmentType]);
                 }
             }
@@ -58581,20 +62648,20 @@ var ts;
         function getDeprecatedSuggestionNode(node) {
             node = ts.skipParentheses(node);
             switch (node.kind) {
-                case 203:
-                case 161:
-                case 204:
+                case 207:
+                case 164:
+                case 208:
                     return getDeprecatedSuggestionNode(node.expression);
-                case 205:
+                case 209:
                     return getDeprecatedSuggestionNode(node.tag);
-                case 275:
-                case 274:
+                case 279:
+                case 278:
                     return getDeprecatedSuggestionNode(node.tagName);
-                case 202:
+                case 206:
                     return node.argumentExpression;
-                case 201:
+                case 205:
                     return node.name;
-                case 173:
+                case 177:
                     var typeReference = node;
                     return ts.isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference;
                 default:
@@ -58625,36 +62692,60 @@ var ts;
             }
             var specifier = node.arguments[0];
             var specifierType = checkExpressionCached(specifier);
-            for (var i = 1; i < node.arguments.length; ++i) {
+            var optionsType = node.arguments.length > 1 ? checkExpressionCached(node.arguments[1]) : undefined;
+            for (var i = 2; i < node.arguments.length; ++i) {
                 checkExpressionCached(node.arguments[i]);
             }
             if (specifierType.flags & 32768 || specifierType.flags & 65536 || !isTypeAssignableTo(specifierType, stringType)) {
                 error(specifier, ts.Diagnostics.Dynamic_import_s_specifier_must_be_of_type_string_but_here_has_type_0, typeToString(specifierType));
             }
+            if (optionsType) {
+                var importCallOptionsType = getGlobalImportCallOptionsType(true);
+                if (importCallOptionsType !== emptyObjectType) {
+                    checkTypeAssignableTo(optionsType, getNullableType(importCallOptionsType, 32768), node.arguments[1]);
+                }
+            }
             var moduleSymbol = resolveExternalModuleName(node, specifier);
             if (moduleSymbol) {
                 var esModuleSymbol = resolveESModuleSymbol(moduleSymbol, specifier, true, false);
                 if (esModuleSymbol) {
-                    return createPromiseReturnType(node, getTypeWithSyntheticDefaultImportType(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol));
+                    return createPromiseReturnType(node, getTypeWithSyntheticDefaultOnly(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier) ||
+                        getTypeWithSyntheticDefaultImportType(getTypeOfSymbol(esModuleSymbol), esModuleSymbol, moduleSymbol, specifier));
                 }
             }
             return createPromiseReturnType(node, anyType);
         }
-        function getTypeWithSyntheticDefaultImportType(type, symbol, originalSymbol) {
-            if (allowSyntheticDefaultImports && type && type !== errorType) {
+        function createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol) {
+            var memberTable = ts.createSymbolTable();
+            var newSymbol = createSymbol(2097152, "default");
+            newSymbol.parent = originalSymbol;
+            newSymbol.nameType = getStringLiteralType("default");
+            newSymbol.target = resolveSymbol(symbol);
+            memberTable.set("default", newSymbol);
+            return createAnonymousType(anonymousSymbol, memberTable, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        }
+        function getTypeWithSyntheticDefaultOnly(type, symbol, originalSymbol, moduleSpecifier) {
+            var hasDefaultOnly = isOnlyImportedAsDefault(moduleSpecifier);
+            if (hasDefaultOnly && type && !isErrorType(type)) {
+                var synthType = type;
+                if (!synthType.defaultOnlyType) {
+                    var type_4 = createDefaultPropertyWrapperForModule(symbol, originalSymbol);
+                    synthType.defaultOnlyType = type_4;
+                }
+                return synthType.defaultOnlyType;
+            }
+            return undefined;
+        }
+        function getTypeWithSyntheticDefaultImportType(type, symbol, originalSymbol, moduleSpecifier) {
+            var _a;
+            if (allowSyntheticDefaultImports && type && !isErrorType(type)) {
                 var synthType = type;
                 if (!synthType.syntheticType) {
-                    var file = ts.find(originalSymbol.declarations, ts.isSourceFile);
-                    var hasSyntheticDefault = canHaveSyntheticDefault(file, originalSymbol, false);
+                    var file = (_a = originalSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(ts.isSourceFile);
+                    var hasSyntheticDefault = canHaveSyntheticDefault(file, originalSymbol, false, moduleSpecifier);
                     if (hasSyntheticDefault) {
-                        var memberTable = ts.createSymbolTable();
-                        var newSymbol = createSymbol(2097152, "default");
-                        newSymbol.parent = originalSymbol;
-                        newSymbol.nameType = getLiteralType("default");
-                        newSymbol.target = resolveSymbol(symbol);
-                        memberTable.set("default", newSymbol);
                         var anonymousSymbol = createSymbol(2048, "__type");
-                        var defaultContainingObject = createAnonymousType(anonymousSymbol, memberTable, ts.emptyArray, ts.emptyArray, undefined, undefined);
+                        var defaultContainingObject = createDefaultPropertyWrapperForModule(symbol, originalSymbol, anonymousSymbol);
                         anonymousSymbol.type = defaultContainingObject;
                         synthType.syntheticType = isValidSpreadType(type) ? getSpreadType(type, defaultContainingObject, anonymousSymbol, 0, false) : defaultContainingObject;
                     }
@@ -58680,9 +62771,9 @@ var ts;
                 return false;
             }
             var targetDeclarationKind = resolvedRequire.flags & 16
-                ? 251
+                ? 255
                 : resolvedRequire.flags & 3
-                    ? 249
+                    ? 253
                     : 0;
             if (targetDeclarationKind !== 0) {
                 var decl = ts.getDeclarationOfKind(resolvedRequire, targetDeclarationKind);
@@ -58701,6 +62792,12 @@ var ts;
             return getReturnTypeOfSignature(signature);
         }
         function checkAssertion(node) {
+            if (node.kind === 210) {
+                var file = ts.getSourceFileOfNode(node);
+                if (file && ts.fileExtensionIsOneOf(file.fileName, [".cts", ".mts"])) {
+                    grammarErrorOnNode(node, ts.Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
+                }
+            }
             return checkAssertionWorker(node, node.type, node.expression);
         }
         function isValidConstAssertionArgument(node) {
@@ -58709,29 +62806,27 @@ var ts;
                 case 14:
                 case 8:
                 case 9:
-                case 109:
-                case 94:
-                case 199:
-                case 200:
-                case 218:
+                case 110:
+                case 95:
+                case 203:
+                case 204:
+                case 222:
                     return true;
-                case 207:
+                case 211:
                     return isValidConstAssertionArgument(node.expression);
-                case 214:
+                case 218:
                     var op = node.operator;
                     var arg = node.operand;
                     return op === 40 && (arg.kind === 8 || arg.kind === 9) ||
                         op === 39 && arg.kind === 8;
-                case 201:
-                case 202:
+                case 205:
+                case 206:
                     var expr = node.expression;
-                    if (ts.isIdentifier(expr)) {
-                        var symbol = getSymbolAtLocation(expr);
-                        if (symbol && symbol.flags & 2097152) {
-                            symbol = resolveAlias(symbol);
-                        }
-                        return !!(symbol && (symbol.flags & 384) && getEnumKind(symbol) === 1);
+                    var symbol = getTypeOfNode(expr).symbol;
+                    if (symbol && symbol.flags & 2097152) {
+                        symbol = resolveAlias(symbol);
                     }
+                    return !!(symbol && (symbol.flags & 384) && getEnumKind(symbol) === 1);
             }
             return false;
         }
@@ -58746,7 +62841,7 @@ var ts;
             checkSourceElement(type);
             exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(exprType));
             var targetType = getTypeFromTypeNode(type);
-            if (produceDiagnostics && targetType !== errorType) {
+            if (produceDiagnostics && !isErrorType(targetType)) {
                 var widenedType = getWidenedType(exprType);
                 if (!isTypeComparableTo(targetType, widenedType)) {
                     checkTypeComparableTo(exprType, targetType, errNode, ts.Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first);
@@ -58765,21 +62860,32 @@ var ts;
         }
         function checkMetaProperty(node) {
             checkGrammarMetaProperty(node);
-            if (node.keywordToken === 102) {
+            if (node.keywordToken === 103) {
                 return checkNewTargetMetaProperty(node);
             }
-            if (node.keywordToken === 99) {
+            if (node.keywordToken === 100) {
                 return checkImportMetaProperty(node);
             }
             return ts.Debug.assertNever(node.keywordToken);
         }
+        function checkMetaPropertyKeyword(node) {
+            switch (node.keywordToken) {
+                case 100:
+                    return getGlobalImportMetaExpressionType();
+                case 103:
+                    var type = checkNewTargetMetaProperty(node);
+                    return isErrorType(type) ? errorType : createNewTargetExpressionType(type);
+                default:
+                    ts.Debug.assertNever(node.keywordToken);
+            }
+        }
         function checkNewTargetMetaProperty(node) {
             var container = ts.getNewTargetContainer(node);
             if (!container) {
                 error(node, ts.Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target");
                 return errorType;
             }
-            else if (container.kind === 166) {
+            else if (container.kind === 170) {
                 var symbol = getSymbolOfNode(container.parent);
                 return getTypeOfSymbol(symbol);
             }
@@ -58789,12 +62895,16 @@ var ts;
             }
         }
         function checkImportMetaProperty(node) {
-            if (moduleKind !== ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) {
-                error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_esnext_or_system);
+            if (moduleKind === ts.ModuleKind.Node12 || moduleKind === ts.ModuleKind.NodeNext) {
+                if (ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.ESNext) {
+                    error(node, ts.Diagnostics.The_import_meta_meta_property_is_not_allowed_in_files_which_will_build_into_CommonJS_output);
+                }
+            }
+            else if (moduleKind < ts.ModuleKind.ES2020 && moduleKind !== ts.ModuleKind.System) {
+                error(node, ts.Diagnostics.The_import_meta_meta_property_is_only_allowed_when_the_module_option_is_es2020_es2022_esnext_system_node12_or_nodenext);
             }
             var file = ts.getSourceFileOfNode(node);
             ts.Debug.assert(!!(file.flags & 2097152), "Containing file is missing import meta node flag.");
-            ts.Debug.assert(!!file.externalModuleIndicator, "Containing file should be a module.");
             return node.name.escapedText === "meta" ? getGlobalImportMetaType() : errorType;
         }
         function getTypeOfParameter(symbol) {
@@ -58825,8 +62935,37 @@ var ts;
             }
             return restParameter.escapedName;
         }
+        function getParameterIdentifierNameAtPosition(signature, pos) {
+            var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
+            if (pos < paramCount) {
+                var param = signature.parameters[pos];
+                return isParameterDeclarationWithIdentifierName(param) ? [param.escapedName, false] : undefined;
+            }
+            var restParameter = signature.parameters[paramCount] || unknownSymbol;
+            if (!isParameterDeclarationWithIdentifierName(restParameter)) {
+                return undefined;
+            }
+            var restType = getTypeOfSymbol(restParameter);
+            if (isTupleType(restType)) {
+                var associatedNames = restType.target.labeledElementDeclarations;
+                var index = pos - paramCount;
+                var associatedName = associatedNames === null || associatedNames === void 0 ? void 0 : associatedNames[index];
+                var isRestTupleElement = !!(associatedName === null || associatedName === void 0 ? void 0 : associatedName.dotDotDotToken);
+                return associatedName ? [
+                    getTupleElementLabel(associatedName),
+                    isRestTupleElement
+                ] : undefined;
+            }
+            if (pos === paramCount) {
+                return [restParameter.escapedName, true];
+            }
+            return undefined;
+        }
+        function isParameterDeclarationWithIdentifierName(symbol) {
+            return symbol.valueDeclaration && ts.isParameter(symbol.valueDeclaration) && ts.isIdentifier(symbol.valueDeclaration.name);
+        }
         function isValidDeclarationForTupleLabel(d) {
-            return d.kind === 192 || (ts.isParameter(d) && d.name && ts.isIdentifier(d.name));
+            return d.kind === 196 || (ts.isParameter(d) && d.name && ts.isIdentifier(d.name));
         }
         function getNameableDeclarationAtPosition(signature, pos) {
             var paramCount = signature.parameters.length - (signatureHasRestParameter(signature) ? 1 : 0);
@@ -58855,7 +62994,7 @@ var ts;
                 var restType = getTypeOfSymbol(signature.parameters[paramCount]);
                 var index = pos - paramCount;
                 if (!isTupleType(restType) || restType.target.hasRestElement || index < restType.target.fixedLength) {
-                    return getIndexedAccessType(restType, getLiteralType(index));
+                    return getIndexedAccessType(restType, getNumberLiteralType(index));
                 }
             }
             return undefined;
@@ -58980,7 +63119,14 @@ var ts;
             }
         }
         function assignContextualParameterTypes(signature, context) {
-            signature.typeParameters = context.typeParameters;
+            if (context.typeParameters) {
+                if (!signature.typeParameters) {
+                    signature.typeParameters = context.typeParameters;
+                }
+                else {
+                    return;
+                }
+            }
             if (context.thisParameter) {
                 var parameter = signature.thisParameter;
                 if (!parameter || parameter.valueDeclaration && !parameter.valueDeclaration.type) {
@@ -59020,7 +63166,7 @@ var ts;
             if (!links.type) {
                 var declaration = parameter.valueDeclaration;
                 links.type = type || getWidenedTypeForVariableLikeDeclaration(declaration, true);
-                if (declaration.name.kind !== 78) {
+                if (declaration.name.kind !== 79) {
                     if (links.type === unknownType) {
                         links.type = getTypeFromBindingPattern(declaration.name);
                     }
@@ -59032,7 +63178,7 @@ var ts;
             for (var _i = 0, _a = pattern.elements; _i < _a.length; _i++) {
                 var element = _a[_i];
                 if (!ts.isOmittedExpression(element)) {
-                    if (element.name.kind === 78) {
+                    if (element.name.kind === 79) {
                         getSymbolLinks(getSymbolOfNode(element)).type = getTypeForBindingElement(element);
                     }
                     else {
@@ -59044,7 +63190,7 @@ var ts;
         function createPromiseType(promisedType) {
             var globalPromiseType = getGlobalPromiseType(true);
             if (globalPromiseType !== emptyGenericType) {
-                promisedType = getAwaitedType(promisedType) || unknownType;
+                promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType;
                 return createTypeReference(globalPromiseType, [promisedType]);
             }
             return unknownType;
@@ -59052,7 +63198,7 @@ var ts;
         function createPromiseLikeType(promisedType) {
             var globalPromiseLikeType = getGlobalPromiseLikeType(true);
             if (globalPromiseLikeType !== emptyGenericType) {
-                promisedType = getAwaitedType(promisedType) || unknownType;
+                promisedType = getAwaitedTypeNoAlias(unwrapAwaitedType(promisedType)) || unknownType;
                 return createTypeReference(globalPromiseLikeType, [promisedType]);
             }
             return unknownType;
@@ -59072,6 +63218,15 @@ var ts;
             }
             return promiseType;
         }
+        function createNewTargetExpressionType(targetType) {
+            var symbol = createSymbol(0, "NewTargetExpression");
+            var targetPropertySymbol = createSymbol(4, "target", 8);
+            targetPropertySymbol.parent = symbol;
+            targetPropertySymbol.type = targetType;
+            var members = ts.createSymbolTable([targetPropertySymbol]);
+            symbol.members = members;
+            return createAnonymousType(symbol, members, ts.emptyArray, ts.emptyArray, ts.emptyArray);
+        }
         function getReturnTypeFromBody(func, checkMode) {
             if (!func.body) {
                 return errorType;
@@ -59083,10 +63238,10 @@ var ts;
             var yieldType;
             var nextType;
             var fallbackReturnType = voidType;
-            if (func.body.kind !== 230) {
+            if (func.body.kind !== 234) {
                 returnType = checkExpressionCached(func.body, checkMode && checkMode & ~8);
                 if (isAsync) {
-                    returnType = checkAwaitedType(returnType, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
+                    returnType = unwrapAwaitedType(checkAwaitedType(returnType, false, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member));
                 }
             }
             else if (isGenerator) {
@@ -59233,15 +63388,15 @@ var ts;
             return links.isExhaustive !== undefined ? links.isExhaustive : (links.isExhaustive = computeExhaustiveSwitchStatement(node));
         }
         function computeExhaustiveSwitchStatement(node) {
-            if (node.expression.kind === 211) {
+            if (node.expression.kind === 215) {
                 var operandType = getTypeOfExpression(node.expression.expression);
                 var witnesses = getSwitchClauseTypeOfWitnesses(node, false);
                 var notEqualFacts_1 = getFactsFromTypeofSwitch(0, 0, witnesses, true);
-                var type_4 = getBaseConstraintOfType(operandType) || operandType;
-                if (type_4.flags & 3) {
+                var type_5 = getBaseConstraintOfType(operandType) || operandType;
+                if (type_5.flags & 3) {
                     return (556800 & notEqualFacts_1) === 556800;
                 }
-                return !!(filterType(type_4, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072);
+                return !!(filterType(type_5, function (t) { return (getTypeFacts(t) & notEqualFacts_1) === notEqualFacts_1; }).flags & 131072);
             }
             var type = getTypeOfExpression(node.expression);
             if (!isLiteralType(type)) {
@@ -59266,7 +63421,7 @@ var ts;
                 if (expr) {
                     var type = checkExpressionCached(expr, checkMode && checkMode & ~8);
                     if (functionFlags & 2) {
-                        type = checkAwaitedType(type, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
+                        type = unwrapAwaitedType(checkAwaitedType(type, false, func, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member));
                     }
                     if (type.flags & 131072) {
                         hasReturnOfTypeNever = true;
@@ -59288,11 +63443,11 @@ var ts;
         }
         function mayReturnNever(func) {
             switch (func.kind) {
-                case 208:
-                case 209:
+                case 212:
+                case 213:
                     return true;
-                case 165:
-                    return func.parent.kind === 200;
+                case 168:
+                    return func.parent.kind === 204;
                 default:
                     return false;
             }
@@ -59306,18 +63461,19 @@ var ts;
             if (type && maybeTypeOfKind(type, 1 | 16384)) {
                 return;
             }
-            if (func.kind === 164 || ts.nodeIsMissing(func.body) || func.body.kind !== 230 || !functionHasImplicitReturn(func)) {
+            if (func.kind === 167 || ts.nodeIsMissing(func.body) || func.body.kind !== 234 || !functionHasImplicitReturn(func)) {
                 return;
             }
             var hasExplicitReturn = func.flags & 512;
+            var errorNode = ts.getEffectiveReturnTypeNode(func) || func;
             if (type && type.flags & 131072) {
-                error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
+                error(errorNode, ts.Diagnostics.A_function_returning_never_cannot_have_a_reachable_end_point);
             }
             else if (type && !hasExplicitReturn) {
-                error(ts.getEffectiveReturnTypeNode(func), ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
+                error(errorNode, ts.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);
             }
             else if (type && strictNullChecks && !isTypeAssignableTo(undefinedType, type)) {
-                error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
+                error(errorNode, ts.Diagnostics.Function_lacks_ending_return_statement_and_return_type_does_not_include_undefined);
             }
             else if (compilerOptions.noImplicitReturns) {
                 if (!type) {
@@ -59329,14 +63485,17 @@ var ts;
                         return;
                     }
                 }
-                error(ts.getEffectiveReturnTypeNode(func) || func, ts.Diagnostics.Not_all_code_paths_return_a_value);
+                error(errorNode, ts.Diagnostics.Not_all_code_paths_return_a_value);
             }
         }
         function checkFunctionExpressionOrObjectLiteralMethod(node, checkMode) {
-            ts.Debug.assert(node.kind !== 165 || ts.isObjectLiteralMethod(node));
+            ts.Debug.assert(node.kind !== 168 || ts.isObjectLiteralMethod(node));
             checkNodeDeferred(node);
+            if (ts.isFunctionExpression(node)) {
+                checkCollisionsForDeclarationName(node, node.name);
+            }
             if (checkMode && checkMode & 4 && isContextSensitive(node)) {
-                if (!ts.getEffectiveReturnTypeNode(node) && !hasContextSensitiveParameters(node)) {
+                if (!ts.getEffectiveReturnTypeNode(node) && !ts.hasContextSensitiveParameters(node)) {
                     var contextualSignature = getContextualSignature(node);
                     if (contextualSignature && couldContainTypeVariables(getReturnTypeOfSignature(contextualSignature))) {
                         var links = getNodeLinks(node);
@@ -59345,15 +63504,15 @@ var ts;
                         }
                         var returnType = getReturnTypeFromBody(node, checkMode);
                         var returnOnlySignature = createSignature(undefined, undefined, undefined, ts.emptyArray, returnType, undefined, 0, 0);
-                        var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, undefined, undefined);
-                        returnOnlyType.objectFlags |= 2097152;
+                        var returnOnlyType = createAnonymousType(node.symbol, emptySymbols, [returnOnlySignature], ts.emptyArray, ts.emptyArray);
+                        returnOnlyType.objectFlags |= 524288;
                         return links.contextFreeType = returnOnlyType;
                     }
                 }
                 return anyFunctionType;
             }
             var hasGrammarError = checkGrammarFunctionLikeDeclaration(node);
-            if (!hasGrammarError && node.kind === 208) {
+            if (!hasGrammarError && node.kind === 212) {
                 checkGrammarForGenerator(node);
             }
             contextuallyCheckFunctionExpressionOrObjectLiteralMethod(node, checkMode);
@@ -59394,7 +63553,7 @@ var ts;
             }
         }
         function checkFunctionExpressionOrObjectLiteralMethodDeferred(node) {
-            ts.Debug.assert(node.kind !== 165 || ts.isObjectLiteralMethod(node));
+            ts.Debug.assert(node.kind !== 168 || ts.isObjectLiteralMethod(node));
             var functionFlags = ts.getFunctionFlags(node);
             var returnType = getReturnTypeFromAnnotation(node);
             checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
@@ -59402,7 +63561,7 @@ var ts;
                 if (!ts.getEffectiveReturnTypeNode(node)) {
                     getReturnTypeOfSignature(getSignatureFromDeclaration(node));
                 }
-                if (node.body.kind === 230) {
+                if (node.body.kind === 234) {
                     checkSourceElement(node.body);
                 }
                 else {
@@ -59410,7 +63569,7 @@ var ts;
                     var returnOrPromisedType = returnType && unwrapReturnType(returnType, functionFlags);
                     if (returnOrPromisedType) {
                         if ((functionFlags & 3) === 2) {
-                            var awaitedType = checkAwaitedType(exprType, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
+                            var awaitedType = checkAwaitedType(exprType, false, node.body, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
                             checkTypeAssignableToAndOptionallyElaborate(awaitedType, returnOrPromisedType, node.body, node.body);
                         }
                         else {
@@ -59472,9 +63631,9 @@ var ts;
             if (isReadonlySymbol(symbol)) {
                 if (symbol.flags & 4 &&
                     ts.isAccessExpression(expr) &&
-                    expr.expression.kind === 107) {
+                    expr.expression.kind === 108) {
                     var ctor = ts.getContainingFunction(expr);
-                    if (!(ctor && (ctor.kind === 166 || isJSConstructor(ctor)))) {
+                    if (!(ctor && (ctor.kind === 170 || isJSConstructor(ctor)))) {
                         return true;
                     }
                     if (symbol.valueDeclaration) {
@@ -59494,11 +63653,11 @@ var ts;
             }
             if (ts.isAccessExpression(expr)) {
                 var node = ts.skipParentheses(expr.expression);
-                if (node.kind === 78) {
+                if (node.kind === 79) {
                     var symbol_2 = getNodeLinks(node).resolvedSymbol;
                     if (symbol_2.flags & 2097152) {
                         var declaration = getDeclarationOfAliasSymbol(symbol_2);
-                        return !!declaration && declaration.kind === 263;
+                        return !!declaration && declaration.kind === 267;
                     }
                 }
             }
@@ -59506,7 +63665,7 @@ var ts;
         }
         function checkReferenceExpression(expr, invalidReferenceMessage, invalidOptionalChainMessage) {
             var node = ts.skipOuterExpressions(expr, 6 | 1);
-            if (node.kind !== 78 && !ts.isAccessExpression(node)) {
+            if (node.kind !== 79 && !ts.isAccessExpression(node)) {
                 error(expr, invalidReferenceMessage);
                 return false;
             }
@@ -59532,13 +63691,15 @@ var ts;
                 if (isReadonlySymbol(symbol)) {
                     error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
                 }
-                checkDeleteExpressionMustBeOptional(expr, getTypeOfSymbol(symbol));
+                checkDeleteExpressionMustBeOptional(expr, symbol);
             }
             return booleanType;
         }
-        function checkDeleteExpressionMustBeOptional(expr, type) {
-            var AnyOrUnknownOrNeverFlags = 3 | 131072;
-            if (strictNullChecks && !(type.flags & AnyOrUnknownOrNeverFlags) && !(getFalsyFlags(type) & 32768)) {
+        function checkDeleteExpressionMustBeOptional(expr, symbol) {
+            var type = getTypeOfSymbol(symbol);
+            if (strictNullChecks &&
+                !(type.flags & (3 | 131072)) &&
+                !(exactOptionalPropertyTypes ? symbol.flags & 16777216 : getFalsyFlags(type) & 32768)) {
                 error(expr, ts.Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
             }
         }
@@ -59552,7 +63713,11 @@ var ts;
         }
         function checkAwaitExpression(node) {
             if (produceDiagnostics) {
-                if (!(node.flags & 32768)) {
+                var container = ts.getContainingFunctionOrClassStaticBlock(node);
+                if (container && ts.isClassStaticBlockDeclaration(container)) {
+                    error(node, ts.Diagnostics.Await_expression_cannot_be_used_inside_a_class_static_block);
+                }
+                else if (!(node.flags & 32768)) {
                     if (ts.isInTopLevelContext(node)) {
                         var sourceFile = ts.getSourceFileOfNode(node);
                         if (!hasParseDiagnostics(sourceFile)) {
@@ -59563,9 +63728,9 @@ var ts;
                                 var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expressions_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module);
                                 diagnostics.add(diagnostic);
                             }
-                            if ((moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) || languageVersion < 4) {
+                            if ((moduleKind !== ts.ModuleKind.ES2022 && moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System && !(moduleKind === ts.ModuleKind.NodeNext && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.ESNext)) || languageVersion < 4) {
                                 span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
-                                var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher);
+                                var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.Top_level_await_expressions_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher);
                                 diagnostics.add(diagnostic);
                             }
                         }
@@ -59575,9 +63740,8 @@ var ts;
                         if (!hasParseDiagnostics(sourceFile)) {
                             var span = ts.getSpanOfTokenAtPosition(sourceFile, node.pos);
                             var diagnostic = ts.createFileDiagnostic(sourceFile, span.start, span.length, ts.Diagnostics.await_expressions_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules);
-                            var func = ts.getContainingFunction(node);
-                            if (func && func.kind !== 166 && (ts.getFunctionFlags(func) & 2) === 0) {
-                                var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async);
+                            if (container && container.kind !== 170 && (ts.getFunctionFlags(container) & 2) === 0) {
+                                var relatedInfo = ts.createDiagnosticForNode(container, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async);
                                 ts.addRelatedInfo(diagnostic, relatedInfo);
                             }
                             diagnostics.add(diagnostic);
@@ -59589,8 +63753,8 @@ var ts;
                 }
             }
             var operandType = checkExpression(node.expression);
-            var awaitedType = checkAwaitedType(operandType, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
-            if (awaitedType === operandType && awaitedType !== errorType && !(operandType.flags & 3)) {
+            var awaitedType = checkAwaitedType(operandType, true, node, ts.Diagnostics.Type_of_await_operand_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
+            if (awaitedType === operandType && !isErrorType(awaitedType) && !(operandType.flags & 3)) {
                 addErrorOrSuggestion(false, ts.createDiagnosticForNode(node, ts.Diagnostics.await_has_no_effect_on_the_type_of_this_expression));
             }
             return awaitedType;
@@ -59604,14 +63768,14 @@ var ts;
                 case 8:
                     switch (node.operator) {
                         case 40:
-                            return getFreshTypeOfLiteralType(getLiteralType(-node.operand.text));
+                            return getFreshTypeOfLiteralType(getNumberLiteralType(-node.operand.text));
                         case 39:
-                            return getFreshTypeOfLiteralType(getLiteralType(+node.operand.text));
+                            return getFreshTypeOfLiteralType(getNumberLiteralType(+node.operand.text));
                     }
                     break;
                 case 9:
                     if (node.operator === 40) {
-                        return getFreshTypeOfLiteralType(getLiteralType({
+                        return getFreshTypeOfLiteralType(getBigIntLiteralType({
                             negative: true,
                             base10Value: ts.parsePseudoBigInt(node.operand.text)
                         }));
@@ -59673,8 +63837,8 @@ var ts;
             }
             if (type.flags & 3145728) {
                 var types = type.types;
-                for (var _i = 0, types_22 = types; _i < types_22.length; _i++) {
-                    var t = types_22[_i];
+                for (var _i = 0, types_21 = types; _i < types_21.length; _i++) {
+                    var t = types_21[_i];
                     if (maybeTypeOfKind(t, kind)) {
                         return true;
                     }
@@ -59728,12 +63892,23 @@ var ts;
             if (leftType === silentNeverType || rightType === silentNeverType) {
                 return silentNeverType;
             }
-            leftType = checkNonNullType(leftType, left);
-            rightType = checkNonNullType(rightType, right);
-            if (!(allTypesAssignableToKind(leftType, 402653316 | 296 | 12288) ||
-                isTypeAssignableToKind(leftType, 4194304 | 134217728 | 268435456 | 262144))) {
-                error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol);
+            if (ts.isPrivateIdentifier(left)) {
+                if (languageVersion < 99) {
+                    checkExternalEmitHelpers(left, 2097152);
+                }
+                if (!getNodeLinks(left).resolvedSymbol && ts.getContainingClass(left)) {
+                    var isUncheckedJS = isUncheckedJSSuggestion(left, rightType.symbol, true);
+                    reportNonexistentProperty(left, rightType, isUncheckedJS);
+                }
+            }
+            else {
+                leftType = checkNonNullType(leftType, left);
+                if (!(allTypesAssignableToKind(leftType, 402653316 | 296 | 12288) ||
+                    isTypeAssignableToKind(leftType, 4194304 | 134217728 | 268435456 | 262144))) {
+                    error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or_symbol);
+                }
             }
+            rightType = checkNonNullType(rightType, right);
             var rightTypeConstraint = getConstraintOfType(rightType);
             if (!allTypesAssignableToKind(rightType, 67108864 | 58982400) ||
                 rightTypeConstraint && (isTypeAssignableToKind(rightType, 3145728) && !allTypesAssignableToKind(rightTypeConstraint, 67108864 | 58982400) ||
@@ -59756,7 +63931,7 @@ var ts;
             if (rightIsThis === void 0) { rightIsThis = false; }
             var properties = node.properties;
             var property = properties[propertyIndex];
-            if (property.kind === 288 || property.kind === 289) {
+            if (property.kind === 294 || property.kind === 295) {
                 var name = property.name;
                 var exprType = getLiteralTypeFromPropertyName(name);
                 if (isTypeUsableAsPropertyName(exprType)) {
@@ -59764,14 +63939,14 @@ var ts;
                     var prop = getPropertyOfType(objectLiteralType, text);
                     if (prop) {
                         markPropertyAsReferenced(prop, property, rightIsThis);
-                        checkPropertyAccessibility(property, false, objectLiteralType, prop);
+                        checkPropertyAccessibility(property, false, true, objectLiteralType, prop);
                     }
                 }
-                var elementType = getIndexedAccessType(objectLiteralType, exprType, undefined, name, undefined, undefined, 16);
+                var elementType = getIndexedAccessType(objectLiteralType, exprType, 32, name);
                 var type = getFlowTypeOfDestructuring(property, elementType);
-                return checkDestructuringAssignment(property.kind === 289 ? property : property.initializer, type);
+                return checkDestructuringAssignment(property.kind === 295 ? property : property.initializer, type);
             }
-            else if (property.kind === 290) {
+            else if (property.kind === 296) {
                 if (propertyIndex < properties.length - 1) {
                     error(property, ts.Diagnostics.A_rest_element_must_be_last_in_a_destructuring_pattern);
                 }
@@ -59806,7 +63981,7 @@ var ts;
             var inBoundsType = compilerOptions.noUncheckedIndexedAccess ? undefined : possiblyOutOfBoundsType;
             for (var i = 0; i < elements.length; i++) {
                 var type = possiblyOutOfBoundsType;
-                if (node.elements[i].kind === 220) {
+                if (node.elements[i].kind === 224) {
                     type = inBoundsType = inBoundsType !== null && inBoundsType !== void 0 ? inBoundsType : (checkIteratedTypeOrElementType(65, sourceType, undefinedType, node) || errorType);
                 }
                 checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode);
@@ -59816,12 +63991,12 @@ var ts;
         function checkArrayLiteralDestructuringElementAssignment(node, sourceType, elementIndex, elementType, checkMode) {
             var elements = node.elements;
             var element = elements[elementIndex];
-            if (element.kind !== 222) {
-                if (element.kind !== 220) {
-                    var indexType = getLiteralType(elementIndex);
+            if (element.kind !== 226) {
+                if (element.kind !== 224) {
+                    var indexType = getNumberLiteralType(elementIndex);
                     if (isArrayLikeType(sourceType)) {
-                        var accessFlags = 16 | (hasDefaultValue(element) ? 8 : 0);
-                        var elementType_2 = getIndexedAccessTypeOrUndefined(sourceType, indexType, undefined, createSyntheticExpression(element, indexType), accessFlags) || errorType;
+                        var accessFlags = 32 | (hasDefaultValue(element) ? 16 : 0);
+                        var elementType_2 = getIndexedAccessTypeOrUndefined(sourceType, indexType, accessFlags, createSyntheticExpression(element, indexType)) || errorType;
                         var assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType_2, 524288) : elementType_2;
                         var type = getFlowTypeOfDestructuring(element, assignedType);
                         return checkDestructuringAssignment(element, type, checkMode);
@@ -59833,7 +64008,7 @@ var ts;
                 }
                 else {
                     var restExpression = element.expression;
-                    if (restExpression.kind === 216 && restExpression.operatorToken.kind === 62) {
+                    if (restExpression.kind === 220 && restExpression.operatorToken.kind === 63) {
                         error(restExpression.operatorToken, ts.Diagnostics.A_rest_element_cannot_have_an_initializer);
                     }
                     else {
@@ -59849,7 +64024,7 @@ var ts;
         }
         function checkDestructuringAssignment(exprOrAssignment, sourceType, checkMode, rightIsThis) {
             var target;
-            if (exprOrAssignment.kind === 289) {
+            if (exprOrAssignment.kind === 295) {
                 var prop = exprOrAssignment;
                 if (prop.objectAssignmentInitializer) {
                     if (strictNullChecks &&
@@ -59863,24 +64038,24 @@ var ts;
             else {
                 target = exprOrAssignment;
             }
-            if (target.kind === 216 && target.operatorToken.kind === 62) {
+            if (target.kind === 220 && target.operatorToken.kind === 63) {
                 checkBinaryExpression(target, checkMode);
                 target = target.left;
             }
-            if (target.kind === 200) {
+            if (target.kind === 204) {
                 return checkObjectLiteralAssignment(target, sourceType, rightIsThis);
             }
-            if (target.kind === 199) {
+            if (target.kind === 203) {
                 return checkArrayLiteralAssignment(target, sourceType, checkMode);
             }
             return checkReferenceAssignment(target, sourceType, checkMode);
         }
         function checkReferenceAssignment(target, sourceType, checkMode) {
             var targetType = checkExpression(target, checkMode);
-            var error = target.parent.kind === 290 ?
+            var error = target.parent.kind === 296 ?
                 ts.Diagnostics.The_target_of_an_object_rest_assignment_must_be_a_variable_or_a_property_access :
                 ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access;
-            var optionalError = target.parent.kind === 290 ?
+            var optionalError = target.parent.kind === 296 ?
                 ts.Diagnostics.The_target_of_an_object_rest_assignment_may_not_be_an_optional_property_access :
                 ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access;
             if (checkReferenceExpression(target, error, optionalError)) {
@@ -59894,39 +64069,39 @@ var ts;
         function isSideEffectFree(node) {
             node = ts.skipParentheses(node);
             switch (node.kind) {
-                case 78:
+                case 79:
                 case 10:
                 case 13:
-                case 205:
-                case 218:
+                case 209:
+                case 222:
                 case 14:
                 case 8:
                 case 9:
-                case 109:
-                case 94:
-                case 103:
-                case 150:
-                case 208:
-                case 221:
-                case 209:
-                case 199:
-                case 200:
-                case 211:
+                case 110:
+                case 95:
+                case 104:
+                case 152:
+                case 212:
                 case 225:
-                case 274:
-                case 273:
+                case 213:
+                case 203:
+                case 204:
+                case 215:
+                case 229:
+                case 278:
+                case 277:
                     return true;
-                case 217:
+                case 221:
                     return isSideEffectFree(node.whenTrue) &&
                         isSideEffectFree(node.whenFalse);
-                case 216:
+                case 220:
                     if (ts.isAssignmentOperator(node.operatorToken.kind)) {
                         return false;
                     }
                     return isSideEffectFree(node.left) &&
                         isSideEffectFree(node.right);
-                case 214:
-                case 215:
+                case 218:
+                case 219:
                     switch (node.operator) {
                         case 53:
                         case 39:
@@ -59935,9 +64110,9 @@ var ts;
                             return true;
                     }
                     return false;
-                case 212:
-                case 206:
-                case 224:
+                case 216:
+                case 210:
+                case 228:
                 default:
                     return false;
             }
@@ -59945,74 +64120,107 @@ var ts;
         function isTypeEqualityComparableTo(source, target) {
             return (target.flags & 98304) !== 0 || isTypeComparableTo(source, target);
         }
-        function checkBinaryExpression(node, checkMode) {
-            var workStacks = {
-                expr: [node],
-                state: [0],
-                leftType: [undefined]
+        function createCheckBinaryExpression() {
+            var trampoline = ts.createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, foldState);
+            return function (node, checkMode) {
+                var result = trampoline(node, checkMode);
+                ts.Debug.assertIsDefined(result);
+                return result;
             };
-            var stackIndex = 0;
-            var lastResult;
-            while (stackIndex >= 0) {
-                node = workStacks.expr[stackIndex];
-                switch (workStacks.state[stackIndex]) {
-                    case 0: {
-                        if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) {
-                            finishInvocation(checkExpression(node.right, checkMode));
-                            break;
-                        }
-                        checkGrammarNullishCoalesceWithLogicalExpression(node);
-                        var operator = node.operatorToken.kind;
-                        if (operator === 62 && (node.left.kind === 200 || node.left.kind === 199)) {
-                            finishInvocation(checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 107));
-                            break;
-                        }
-                        advanceState(1);
-                        maybeCheckExpression(node.left);
-                        break;
-                    }
-                    case 1: {
-                        var leftType = lastResult;
-                        workStacks.leftType[stackIndex] = leftType;
-                        var operator = node.operatorToken.kind;
-                        if (operator === 55 || operator === 56 || operator === 60) {
-                            if (operator === 55) {
-                                var parent = ts.walkUpParenthesizedExpressions(node.parent);
-                                checkTestingKnownTruthyCallableType(node.left, leftType, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
-                            }
-                            checkTruthinessOfType(leftType, node.left);
+            function onEnter(node, state, checkMode) {
+                if (state) {
+                    state.stackIndex++;
+                    state.skip = false;
+                    setLeftType(state, undefined);
+                    setLastResult(state, undefined);
+                }
+                else {
+                    state = {
+                        checkMode: checkMode,
+                        skip: false,
+                        stackIndex: 0,
+                        typeStack: [undefined, undefined],
+                    };
+                }
+                if (ts.isInJSFile(node) && ts.getAssignedExpandoInitializer(node)) {
+                    state.skip = true;
+                    setLastResult(state, checkExpression(node.right, checkMode));
+                    return state;
+                }
+                checkGrammarNullishCoalesceWithLogicalExpression(node);
+                var operator = node.operatorToken.kind;
+                if (operator === 63 && (node.left.kind === 204 || node.left.kind === 203)) {
+                    state.skip = true;
+                    setLastResult(state, checkDestructuringAssignment(node.left, checkExpression(node.right, checkMode), checkMode, node.right.kind === 108));
+                    return state;
+                }
+                return state;
+            }
+            function onLeft(left, state, _node) {
+                if (!state.skip) {
+                    return maybeCheckExpression(state, left);
+                }
+            }
+            function onOperator(operatorToken, state, node) {
+                if (!state.skip) {
+                    var leftType = getLastResult(state);
+                    ts.Debug.assertIsDefined(leftType);
+                    setLeftType(state, leftType);
+                    setLastResult(state, undefined);
+                    var operator = operatorToken.kind;
+                    if (operator === 55 || operator === 56 || operator === 60) {
+                        if (operator === 55) {
+                            var parent = ts.walkUpParenthesizedExpressions(node.parent);
+                            checkTestingKnownTruthyCallableOrAwaitableType(node.left, leftType, ts.isIfStatement(parent) ? parent.thenStatement : undefined);
                         }
-                        advanceState(2);
-                        maybeCheckExpression(node.right);
-                        break;
+                        checkTruthinessOfType(leftType, node.left);
                     }
-                    case 2: {
-                        var leftType = workStacks.leftType[stackIndex];
-                        var rightType = lastResult;
-                        finishInvocation(checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node));
-                        break;
-                    }
-                    default: return ts.Debug.fail("Invalid state " + workStacks.state[stackIndex] + " for checkBinaryExpression");
                 }
             }
-            return lastResult;
-            function finishInvocation(result) {
-                lastResult = result;
-                stackIndex--;
-            }
-            function advanceState(nextState) {
-                workStacks.state[stackIndex] = nextState;
+            function onRight(right, state, _node) {
+                if (!state.skip) {
+                    return maybeCheckExpression(state, right);
+                }
             }
-            function maybeCheckExpression(node) {
-                if (ts.isBinaryExpression(node)) {
-                    stackIndex++;
-                    workStacks.expr[stackIndex] = node;
-                    workStacks.state[stackIndex] = 0;
-                    workStacks.leftType[stackIndex] = undefined;
+            function onExit(node, state) {
+                var result;
+                if (state.skip) {
+                    result = getLastResult(state);
                 }
                 else {
-                    lastResult = checkExpression(node, checkMode);
+                    var leftType = getLeftType(state);
+                    ts.Debug.assertIsDefined(leftType);
+                    var rightType = getLastResult(state);
+                    ts.Debug.assertIsDefined(rightType);
+                    result = checkBinaryLikeExpressionWorker(node.left, node.operatorToken, node.right, leftType, rightType, node);
+                }
+                state.skip = false;
+                setLeftType(state, undefined);
+                setLastResult(state, undefined);
+                state.stackIndex--;
+                return result;
+            }
+            function foldState(state, result, _side) {
+                setLastResult(state, result);
+                return state;
+            }
+            function maybeCheckExpression(state, node) {
+                if (ts.isBinaryExpression(node)) {
+                    return node;
                 }
+                setLastResult(state, checkExpression(node, state.checkMode));
+            }
+            function getLeftType(state) {
+                return state.typeStack[state.stackIndex];
+            }
+            function setLeftType(state, type) {
+                state.typeStack[state.stackIndex] = type;
+            }
+            function getLastResult(state) {
+                return state.typeStack[state.stackIndex + 1];
+            }
+            function setLastResult(state, type) {
+                state.typeStack[state.stackIndex + 1] = type;
             }
         }
         function checkGrammarNullishCoalesceWithLogicalExpression(node) {
@@ -60028,8 +64236,8 @@ var ts;
         }
         function checkBinaryLikeExpression(left, operatorToken, right, checkMode, errorNode) {
             var operator = operatorToken.kind;
-            if (operator === 62 && (left.kind === 200 || left.kind === 199)) {
-                return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 107);
+            if (operator === 63 && (left.kind === 204 || left.kind === 203)) {
+                return checkDestructuringAssignment(left, checkExpression(right, checkMode), checkMode, right.kind === 108);
             }
             var leftType;
             if (operator === 55 || operator === 56 || operator === 60) {
@@ -60046,26 +64254,26 @@ var ts;
             switch (operator) {
                 case 41:
                 case 42:
-                case 65:
                 case 66:
-                case 43:
                 case 67:
-                case 44:
+                case 43:
                 case 68:
+                case 44:
+                case 69:
                 case 40:
-                case 64:
+                case 65:
                 case 47:
-                case 69:
-                case 48:
                 case 70:
-                case 49:
+                case 48:
                 case 71:
+                case 49:
+                case 72:
                 case 51:
-                case 73:
+                case 74:
                 case 52:
-                case 77:
+                case 78:
                 case 50:
-                case 72:
+                case 73:
                     if (leftType === silentNeverType || rightType === silentNeverType) {
                         return silentNeverType;
                     }
@@ -60089,11 +64297,11 @@ var ts;
                         else if (bothAreBigIntLike(leftType, rightType)) {
                             switch (operator) {
                                 case 49:
-                                case 71:
+                                case 72:
                                     reportOperatorError();
                                     break;
                                 case 42:
-                                case 66:
+                                case 67:
                                     if (languageVersion < 3) {
                                         error(errorNode, ts.Diagnostics.Exponentiation_cannot_be_performed_on_bigint_values_unless_the_target_option_is_set_to_es2016_or_later);
                                     }
@@ -60110,7 +64318,7 @@ var ts;
                         return resultType_1;
                     }
                 case 39:
-                case 63:
+                case 64:
                     if (leftType === silentNeverType || rightType === silentNeverType) {
                         return silentNeverType;
                     }
@@ -60129,7 +64337,7 @@ var ts;
                         resultType = stringType;
                     }
                     else if (isTypeAny(leftType) || isTypeAny(rightType)) {
-                        resultType = leftType === errorType || rightType === errorType ? errorType : anyType;
+                        resultType = isErrorType(leftType) || isErrorType(rightType) ? errorType : anyType;
                     }
                     if (resultType && !checkForDisallowedESSymbolOperand(operator)) {
                         return resultType;
@@ -60142,7 +64350,7 @@ var ts;
                         });
                         return anyType;
                     }
-                    if (operator === 63) {
+                    if (operator === 64) {
                         checkAssignmentOperator(resultType);
                     }
                     return resultType;
@@ -60164,41 +64372,41 @@ var ts;
                 case 37:
                     reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
                     return booleanType;
-                case 101:
+                case 102:
                     return checkInstanceOfExpression(left, right, leftType, rightType);
-                case 100:
+                case 101:
                     return checkInExpression(left, right, leftType, rightType);
                 case 55:
-                case 75: {
+                case 76: {
                     var resultType_2 = getTypeFacts(leftType) & 4194304 ?
                         getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) :
                         leftType;
-                    if (operator === 75) {
+                    if (operator === 76) {
                         checkAssignmentOperator(rightType);
                     }
                     return resultType_2;
                 }
                 case 56:
-                case 74: {
+                case 75: {
                     var resultType_3 = getTypeFacts(leftType) & 8388608 ?
                         getUnionType([removeDefinitelyFalsyTypes(leftType), rightType], 2) :
                         leftType;
-                    if (operator === 74) {
+                    if (operator === 75) {
                         checkAssignmentOperator(rightType);
                     }
                     return resultType_3;
                 }
                 case 60:
-                case 76: {
+                case 77: {
                     var resultType_4 = getTypeFacts(leftType) & 262144 ?
                         getUnionType([getNonNullableType(leftType), rightType], 2) :
                         leftType;
-                    if (operator === 76) {
+                    if (operator === 77) {
                         checkAssignmentOperator(rightType);
                     }
                     return resultType_4;
                 }
-                case 62:
+                case 63:
                     var declKind = ts.isBinaryExpression(left.parent) ? ts.getAssignmentDeclarationKind(left.parent) : 0;
                     checkAssignmentDeclaration(declKind, rightType);
                     if (isAssignmentDeclaration(declKind)) {
@@ -60244,7 +64452,7 @@ var ts;
                         if (propType.symbol && propType.symbol.flags & 32) {
                             var name = prop.escapedName;
                             var symbol = resolveName(prop.valueDeclaration, name, 788968, undefined, name, false);
-                            if (symbol && symbol.declarations.some(ts.isJSDocTypedefTag)) {
+                            if ((symbol === null || symbol === void 0 ? void 0 : symbol.declarations) && symbol.declarations.some(ts.isJSDocTypedefTag)) {
                                 addDuplicateDeclarationErrorsForSymbols(symbol, ts.Diagnostics.Duplicate_identifier_0, ts.unescapeLeadingUnderscores(name), prop);
                                 addDuplicateDeclarationErrorsForSymbols(prop, ts.Diagnostics.Duplicate_identifier_0, ts.unescapeLeadingUnderscores(name), symbol);
                             }
@@ -60253,7 +64461,7 @@ var ts;
                 }
             }
             function isEvalNode(node) {
-                return node.kind === 78 && node.escapedText === "eval";
+                return node.kind === 79 && node.escapedText === "eval";
             }
             function checkForDisallowedESSymbolOperand(operator) {
                 var offendingSymbolOperand = maybeTypeOfKind(leftType, 12288) ? left :
@@ -60268,13 +64476,13 @@ var ts;
             function getSuggestedBooleanOperator(operator) {
                 switch (operator) {
                     case 51:
-                    case 73:
+                    case 74:
                         return 56;
                     case 52:
-                    case 77:
+                    case 78:
                         return 37;
                     case 50:
-                    case 72:
+                    case 73:
                         return 55;
                     default:
                         return undefined;
@@ -60284,7 +64492,14 @@ var ts;
                 if (produceDiagnostics && ts.isAssignmentOperator(operator)) {
                     if (checkReferenceExpression(left, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access, ts.Diagnostics.The_left_hand_side_of_an_assignment_expression_may_not_be_an_optional_property_access)
                         && (!ts.isIdentifier(left) || ts.unescapeLeadingUnderscores(left.escapedText) !== "exports")) {
-                        checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right);
+                        var headMessage = void 0;
+                        if (exactOptionalPropertyTypes && ts.isPropertyAccessExpression(left) && maybeTypeOfKind(valueType, 32768)) {
+                            var target = getTypeOfPropertyOfType(getTypeOfExpression(left.expression), left.name.escapedText);
+                            if (isExactOptionalPropertyMismatch(valueType, target)) {
+                                headMessage = ts.Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target;
+                            }
+                        }
+                        checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right, headMessage);
                     }
                 }
             }
@@ -60318,8 +64533,8 @@ var ts;
                 var wouldWorkWithAwait = false;
                 var errNode = errorNode || operatorToken;
                 if (isRelated) {
-                    var awaitedLeftType = getAwaitedType(leftType);
-                    var awaitedRightType = getAwaitedType(rightType);
+                    var awaitedLeftType = getAwaitedTypeNoAlias(leftType);
+                    var awaitedRightType = getAwaitedTypeNoAlias(rightType);
                     wouldWorkWithAwait = !(awaitedLeftType === leftType && awaitedRightType === rightType)
                         && !!(awaitedLeftType && awaitedRightType)
                         && isRelated(awaitedLeftType, awaitedRightType);
@@ -60420,11 +64635,16 @@ var ts;
         }
         function checkConditionalExpression(node, checkMode) {
             var type = checkTruthinessExpression(node.condition);
-            checkTestingKnownTruthyCallableType(node.condition, type, node.whenTrue);
+            checkTestingKnownTruthyCallableOrAwaitableType(node.condition, type, node.whenTrue);
             var type1 = checkExpression(node.whenTrue, checkMode);
             var type2 = checkExpression(node.whenFalse, checkMode);
             return getUnionType([type1, type2], 2);
         }
+        function isTemplateLiteralContext(node) {
+            var parent = node.parent;
+            return ts.isParenthesizedExpression(parent) && isTemplateLiteralContext(parent) ||
+                ts.isElementAccessExpression(parent) && parent.argumentExpression === node;
+        }
         function checkTemplateExpression(node) {
             var texts = [node.head.text];
             var types = [];
@@ -60437,10 +64657,14 @@ var ts;
                 texts.push(span.literal.text);
                 types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType);
             }
-            return isConstContext(node) ? getTemplateLiteralType(texts, types) : stringType;
+            return isConstContext(node) || isTemplateLiteralContext(node) || someType(getContextualType(node) || unknownType, isTemplateLiteralContextualType) ? getTemplateLiteralType(texts, types) : stringType;
+        }
+        function isTemplateLiteralContextualType(type) {
+            return !!(type.flags & (128 | 134217728) ||
+                type.flags & 58982400 && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316));
         }
         function getContextNode(node) {
-            if (node.kind === 281 && !ts.isJsxSelfClosingElement(node.parent)) {
+            if (node.kind === 285 && !ts.isJsxSelfClosingElement(node.parent)) {
                 return node.parent.parent;
             }
             return node;
@@ -60479,14 +64703,16 @@ var ts;
             return links.resolvedType;
         }
         function isTypeAssertion(node) {
-            node = ts.skipParentheses(node);
-            return node.kind === 206 || node.kind === 224;
+            node = ts.skipParentheses(node, true);
+            return node.kind === 210 ||
+                node.kind === 228 ||
+                ts.isJSDocTypeAssertion(node);
         }
         function checkDeclarationInitializer(declaration, contextualType) {
             var initializer = ts.getEffectiveInitializer(declaration);
             var type = getQuickTypeOfExpression(initializer) ||
                 (contextualType ? checkExpressionWithContextualType(initializer, contextualType, undefined, 0) : checkExpressionCached(initializer));
-            return ts.isParameter(declaration) && declaration.name.kind === 197 &&
+            return ts.isParameter(declaration) && declaration.name.kind === 201 &&
                 isTupleType(type) && !type.target.hasRestElement && getTypeReferenceArity(type) < declaration.name.elements.length ?
                 padTupleType(type, declaration.name) : type;
         }
@@ -60496,7 +64722,7 @@ var ts;
             var elementFlags = type.target.elementFlags.slice();
             for (var i = getTypeReferenceArity(type); i < patternElements.length; i++) {
                 var e = patternElements[i];
-                if (i < patternElements.length - 1 || !(e.kind === 198 && e.dotDotDotToken)) {
+                if (i < patternElements.length - 1 || !(e.kind === 202 && e.dotDotDotToken)) {
                     elementTypes.push(!ts.isOmittedExpression(e) && hasDefaultValue(e) ? getTypeFromBindingElement(e, false, false) : anyType);
                     elementFlags.push(2);
                     if (!ts.isOmittedExpression(e) && !hasDefaultValue(e)) {
@@ -60509,7 +64735,7 @@ var ts;
         function widenTypeInferredFromInitializer(declaration, type) {
             var widened = ts.getCombinedNodeFlags(declaration) & 2 || ts.isDeclarationReadonly(declaration) ? type : getWidenedLiteralType(type);
             if (ts.isInJSFile(declaration)) {
-                if (widened.flags & 98304) {
+                if (isEmptyLiteralType(widened)) {
                     reportImplicitAny(declaration, anyType);
                     return anyType;
                 }
@@ -60545,6 +64771,7 @@ var ts;
         function isConstContext(node) {
             var parent = node.parent;
             return ts.isAssertionExpression(parent) && ts.isConstTypeReference(parent.type) ||
+                ts.isJSDocTypeAssertion(parent) && ts.isConstTypeReference(ts.getJSDocTypeAssertionType(parent)) ||
                 (ts.isParenthesizedExpression(parent) || ts.isArrayLiteralExpression(parent) || ts.isSpreadElement(parent)) && isConstContext(parent) ||
                 (ts.isPropertyAssignment(parent) || ts.isShorthandPropertyAssignment(parent) || ts.isTemplateSpan(parent)) && isConstContext(parent.parent);
         }
@@ -60555,14 +64782,14 @@ var ts;
                     getWidenedLiteralLikeTypeForContextualType(type, instantiateContextualType(arguments.length === 2 ? getContextualType(node) : contextualType, node));
         }
         function checkPropertyAssignment(node, checkMode) {
-            if (node.name.kind === 158) {
+            if (node.name.kind === 161) {
                 checkComputedPropertyName(node.name);
             }
             return checkExpressionForMutableLocation(node.initializer, checkMode);
         }
         function checkObjectLiteralMethod(node, checkMode) {
             checkGrammarMethod(node);
-            if (node.name.kind === 158) {
+            if (node.name.kind === 161) {
                 checkComputedPropertyName(node.name);
             }
             var uninstantiatedType = checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
@@ -60672,7 +64899,7 @@ var ts;
                 len--;
             var s = baseName.slice(0, len);
             for (var index = 1; true; index++) {
-                var augmentedName = (s + index);
+                var augmentedName = s + index;
                 if (!hasTypeParameterByName(typeParameters, augmentedName)) {
                     return augmentedName;
                 }
@@ -60711,8 +64938,15 @@ var ts;
             return type;
         }
         function getQuickTypeOfExpression(node) {
-            var expr = ts.skipParentheses(node);
-            if (ts.isCallExpression(expr) && expr.expression.kind !== 105 && !ts.isRequireCall(expr, true) && !isSymbolOrSymbolForCall(expr)) {
+            var expr = ts.skipParentheses(node, true);
+            if (ts.isJSDocTypeAssertion(expr)) {
+                var type = ts.getJSDocTypeAssertionType(expr);
+                if (!ts.isConstTypeReference(type)) {
+                    return getTypeFromTypeNode(type);
+                }
+            }
+            expr = ts.skipParentheses(node);
+            if (ts.isCallExpression(expr) && expr.expression.kind !== 106 && !ts.isRequireCall(expr, true) && !isSymbolOrSymbolForCall(expr)) {
                 var type = ts.isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) :
                     getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
                 if (type) {
@@ -60723,7 +64957,7 @@ var ts;
                 return getTypeFromTypeNode(expr.type);
             }
             else if (node.kind === 8 || node.kind === 10 ||
-                node.kind === 109 || node.kind === 94) {
+                node.kind === 110 || node.kind === 95) {
                 return checkExpression(node);
             }
             return undefined;
@@ -60758,11 +64992,11 @@ var ts;
             return type;
         }
         function checkConstEnumAccess(node, type) {
-            var ok = (node.parent.kind === 201 && node.parent.expression === node) ||
-                (node.parent.kind === 202 && node.parent.expression === node) ||
-                ((node.kind === 78 || node.kind === 157) && isInRightSideOfImportOrExportAssignment(node) ||
-                    (node.parent.kind === 176 && node.parent.exprName === node)) ||
-                (node.parent.kind === 270);
+            var ok = (node.parent.kind === 205 && node.parent.expression === node) ||
+                (node.parent.kind === 206 && node.parent.expression === node) ||
+                ((node.kind === 79 || node.kind === 160) && isInRightSideOfImportOrExportAssignment(node) ||
+                    (node.parent.kind === 180 && node.parent.exprName === node)) ||
+                (node.parent.kind === 274);
             if (!ok) {
                 error(node, ts.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment_or_type_query);
             }
@@ -60775,9 +65009,9 @@ var ts;
             }
         }
         function checkParenthesizedExpression(node, checkMode) {
-            var tag = ts.isInJSFile(node) ? ts.getJSDocTypeTag(node) : undefined;
-            if (tag) {
-                return checkAssertionWorker(tag, tag.typeExpression.type, node.expression, checkMode);
+            if (ts.hasJSDocNodes(node) && ts.isJSDocTypeAssertion(node)) {
+                var type = ts.getJSDocTypeAssertionType(node);
+                return checkAssertionWorker(type, type, node.expression, checkMode);
             }
             return checkExpression(node.expression, checkMode);
         }
@@ -60785,105 +65019,110 @@ var ts;
             var kind = node.kind;
             if (cancellationToken) {
                 switch (kind) {
-                    case 221:
-                    case 208:
-                    case 209:
+                    case 225:
+                    case 212:
+                    case 213:
                         cancellationToken.throwIfCancellationRequested();
                 }
             }
             switch (kind) {
-                case 78:
-                    return checkIdentifier(node);
-                case 107:
+                case 79:
+                    return checkIdentifier(node, checkMode);
+                case 80:
+                    return checkPrivateIdentifierExpression(node);
+                case 108:
                     return checkThisExpression(node);
-                case 105:
+                case 106:
                     return checkSuperExpression(node);
-                case 103:
+                case 104:
                     return nullWideningType;
                 case 14:
                 case 10:
-                    return getFreshTypeOfLiteralType(getLiteralType(node.text));
+                    return getFreshTypeOfLiteralType(getStringLiteralType(node.text));
                 case 8:
                     checkGrammarNumericLiteral(node);
-                    return getFreshTypeOfLiteralType(getLiteralType(+node.text));
+                    return getFreshTypeOfLiteralType(getNumberLiteralType(+node.text));
                 case 9:
                     checkGrammarBigIntLiteral(node);
-                    return getFreshTypeOfLiteralType(getBigIntLiteralType(node));
-                case 109:
+                    return getFreshTypeOfLiteralType(getBigIntLiteralType({
+                        negative: false,
+                        base10Value: ts.parsePseudoBigInt(node.text)
+                    }));
+                case 110:
                     return trueType;
-                case 94:
+                case 95:
                     return falseType;
-                case 218:
+                case 222:
                     return checkTemplateExpression(node);
                 case 13:
                     return globalRegExpType;
-                case 199:
+                case 203:
                     return checkArrayLiteral(node, checkMode, forceTuple);
-                case 200:
+                case 204:
                     return checkObjectLiteral(node, checkMode);
-                case 201:
-                    return checkPropertyAccessExpression(node);
-                case 157:
-                    return checkQualifiedName(node);
-                case 202:
-                    return checkIndexedAccess(node);
-                case 203:
-                    if (node.expression.kind === 99) {
+                case 205:
+                    return checkPropertyAccessExpression(node, checkMode);
+                case 160:
+                    return checkQualifiedName(node, checkMode);
+                case 206:
+                    return checkIndexedAccess(node, checkMode);
+                case 207:
+                    if (node.expression.kind === 100) {
                         return checkImportCallExpression(node);
                     }
-                case 204:
+                case 208:
                     return checkCallExpression(node, checkMode);
-                case 205:
+                case 209:
                     return checkTaggedTemplateExpression(node);
-                case 207:
+                case 211:
                     return checkParenthesizedExpression(node, checkMode);
-                case 221:
+                case 225:
                     return checkClassExpression(node);
-                case 208:
-                case 209:
+                case 212:
+                case 213:
                     return checkFunctionExpressionOrObjectLiteralMethod(node, checkMode);
-                case 211:
+                case 215:
                     return checkTypeOfExpression(node);
-                case 206:
-                case 224:
+                case 210:
+                case 228:
                     return checkAssertion(node);
-                case 225:
+                case 229:
                     return checkNonNullAssertion(node);
-                case 226:
+                case 230:
                     return checkMetaProperty(node);
-                case 210:
+                case 214:
                     return checkDeleteExpression(node);
-                case 212:
+                case 216:
                     return checkVoidExpression(node);
-                case 213:
+                case 217:
                     return checkAwaitExpression(node);
-                case 214:
+                case 218:
                     return checkPrefixUnaryExpression(node);
-                case 215:
+                case 219:
                     return checkPostfixUnaryExpression(node);
-                case 216:
+                case 220:
                     return checkBinaryExpression(node, checkMode);
-                case 217:
+                case 221:
                     return checkConditionalExpression(node, checkMode);
-                case 220:
+                case 224:
                     return checkSpreadExpression(node, checkMode);
-                case 222:
+                case 226:
                     return undefinedWideningType;
-                case 219:
+                case 223:
                     return checkYieldExpression(node);
-                case 227:
+                case 231:
                     return checkSyntheticExpression(node);
-                case 283:
+                case 287:
                     return checkJsxExpression(node, checkMode);
-                case 273:
+                case 277:
                     return checkJsxElement(node, checkMode);
-                case 274:
+                case 278:
                     return checkJsxSelfClosingElement(node, checkMode);
-                case 277:
-                    return checkJsxFragment(node);
                 case 281:
+                    return checkJsxFragment(node);
+                case 285:
                     return checkJsxAttributes(node, checkMode);
-                case 275:
+                case 279:
                     ts.Debug.fail("Shouldn't ever directly check a JsxOpeningElement");
             }
             return errorType;
@@ -60912,11 +65151,11 @@ var ts;
             checkGrammarDecoratorsAndModifiers(node);
             checkVariableLikeDeclaration(node);
             var func = ts.getContainingFunction(node);
-            if (ts.hasSyntacticModifier(node, 92)) {
-                if (!(func.kind === 166 && ts.nodeIsPresent(func.body))) {
+            if (ts.hasSyntacticModifier(node, 16476)) {
+                if (!(func.kind === 170 && ts.nodeIsPresent(func.body))) {
                     error(node, ts.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);
                 }
-                if (func.kind === 166 && ts.isIdentifier(node.name) && node.name.escapedText === "constructor") {
+                if (func.kind === 170 && ts.isIdentifier(node.name) && node.name.escapedText === "constructor") {
                     error(node.name, ts.Diagnostics.constructor_cannot_be_used_as_a_parameter_property_name);
                 }
             }
@@ -60927,13 +65166,13 @@ var ts;
                 if (func.parameters.indexOf(node) !== 0) {
                     error(node, ts.Diagnostics.A_0_parameter_must_be_the_first_parameter, node.name.escapedText);
                 }
-                if (func.kind === 166 || func.kind === 170 || func.kind === 175) {
+                if (func.kind === 170 || func.kind === 174 || func.kind === 179) {
                     error(node, ts.Diagnostics.A_constructor_cannot_have_a_this_parameter);
                 }
-                if (func.kind === 209) {
+                if (func.kind === 213) {
                     error(node, ts.Diagnostics.An_arrow_function_cannot_have_a_this_parameter);
                 }
-                if (func.kind === 167 || func.kind === 168) {
+                if (func.kind === 171 || func.kind === 172) {
                     error(node, ts.Diagnostics.get_and_set_accessors_cannot_declare_this_parameters);
                 }
             }
@@ -60987,13 +65226,13 @@ var ts;
         }
         function getTypePredicateParent(node) {
             switch (node.parent.kind) {
-                case 209:
-                case 169:
-                case 251:
-                case 208:
-                case 174:
-                case 165:
-                case 164:
+                case 213:
+                case 173:
+                case 255:
+                case 212:
+                case 178:
+                case 168:
+                case 167:
                     var parent = node.parent;
                     if (node === parent.type) {
                         return parent;
@@ -61007,11 +65246,11 @@ var ts;
                     continue;
                 }
                 var name = element.name;
-                if (name.kind === 78 && name.escapedText === predicateVariableName) {
+                if (name.kind === 79 && name.escapedText === predicateVariableName) {
                     error(predicateVariableNode, ts.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern, predicateVariableName);
                     return true;
                 }
-                else if (name.kind === 197 || name.kind === 196) {
+                else if (name.kind === 201 || name.kind === 200) {
                     if (checkIfTypePredicateVariableIsDeclaredInBindingPattern(name, predicateVariableNode, predicateVariableName)) {
                         return true;
                     }
@@ -61019,12 +65258,12 @@ var ts;
             }
         }
         function checkSignatureDeclaration(node) {
-            if (node.kind === 171) {
+            if (node.kind === 175) {
                 checkGrammarIndexSignature(node);
             }
-            else if (node.kind === 174 || node.kind === 251 || node.kind === 175 ||
-                node.kind === 169 || node.kind === 166 ||
-                node.kind === 170) {
+            else if (node.kind === 178 || node.kind === 255 || node.kind === 179 ||
+                node.kind === 173 || node.kind === 170 ||
+                node.kind === 174) {
                 checkGrammarFunctionLikeDeclaration(node);
             }
             var functionFlags = ts.getFunctionFlags(node);
@@ -61039,7 +65278,7 @@ var ts;
                     checkExternalEmitHelpers(node, 128);
                 }
             }
-            checkTypeParameters(node.typeParameters);
+            checkTypeParameters(ts.getEffectiveTypeParameterDeclarations(node));
             ts.forEach(node.parameters, checkParameter);
             if (node.type) {
                 checkSourceElement(node.type);
@@ -61049,10 +65288,10 @@ var ts;
                 var returnTypeNode = ts.getEffectiveReturnTypeNode(node);
                 if (noImplicitAny && !returnTypeNode) {
                     switch (node.kind) {
-                        case 170:
+                        case 174:
                             error(node, ts.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
                             break;
-                        case 169:
+                        case 173:
                             error(node, ts.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);
                             break;
                     }
@@ -61076,7 +65315,7 @@ var ts;
                         checkAsyncFunctionReturnType(node, returnTypeNode);
                     }
                 }
-                if (node.kind !== 171 && node.kind !== 308) {
+                if (node.kind !== 175 && node.kind !== 315) {
                     registerForUnusedIdentifiersCheck(node);
                 }
             }
@@ -61087,7 +65326,7 @@ var ts;
             var privateIdentifiers = new ts.Map();
             for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                 var member = _a[_i];
-                if (member.kind === 166) {
+                if (member.kind === 170) {
                     for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
                         var param = _c[_b];
                         if (ts.isParameterPropertyDeclaration(param, member) && !ts.isBindingPattern(param.name)) {
@@ -61096,28 +65335,30 @@ var ts;
                     }
                 }
                 else {
-                    var isStatic = ts.hasSyntacticModifier(member, 32);
+                    var isStaticMember = ts.isStatic(member);
                     var name = member.name;
                     if (!name) {
-                        return;
+                        continue;
                     }
-                    var names = ts.isPrivateIdentifier(name) ? privateIdentifiers :
-                        isStatic ? staticNames :
+                    var isPrivate = ts.isPrivateIdentifier(name);
+                    var privateStaticFlags = isPrivate && isStaticMember ? 16 : 0;
+                    var names = isPrivate ? privateIdentifiers :
+                        isStaticMember ? staticNames :
                             instanceNames;
                     var memberName = name && ts.getPropertyNameForPropertyNameNode(name);
                     if (memberName) {
                         switch (member.kind) {
-                            case 167:
-                                addName(names, name, memberName, 1);
+                            case 171:
+                                addName(names, name, memberName, 1 | privateStaticFlags);
                                 break;
-                            case 168:
-                                addName(names, name, memberName, 2);
+                            case 172:
+                                addName(names, name, memberName, 2 | privateStaticFlags);
                                 break;
-                            case 163:
-                                addName(names, name, memberName, 3);
+                            case 166:
+                                addName(names, name, memberName, 3 | privateStaticFlags);
                                 break;
-                            case 165:
-                                addName(names, name, memberName, 8);
+                            case 168:
+                                addName(names, name, memberName, 8 | privateStaticFlags);
                                 break;
                         }
                     }
@@ -61126,16 +65367,23 @@ var ts;
             function addName(names, location, name, meaning) {
                 var prev = names.get(name);
                 if (prev) {
-                    if (prev & 8) {
-                        if (meaning !== 8) {
-                            error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
-                        }
-                    }
-                    else if (prev & meaning) {
-                        error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+                    if ((prev & 16) !== (meaning & 16)) {
+                        error(location, ts.Diagnostics.Duplicate_identifier_0_Static_and_instance_elements_cannot_share_the_same_private_name, ts.getTextOfNode(location));
                     }
                     else {
-                        names.set(name, prev | meaning);
+                        var prevIsMethod = !!(prev & 8);
+                        var isMethod = !!(meaning & 8);
+                        if (prevIsMethod || isMethod) {
+                            if (prevIsMethod !== isMethod) {
+                                error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+                            }
+                        }
+                        else if (prev & meaning & ~16) {
+                            error(location, ts.Diagnostics.Duplicate_identifier_0, ts.getTextOfNode(location));
+                        }
+                        else {
+                            names.set(name, prev | meaning);
+                        }
                     }
                 }
                 else {
@@ -61147,8 +65395,8 @@ var ts;
             for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                 var member = _a[_i];
                 var memberNameNode = member.name;
-                var isStatic = ts.hasSyntacticModifier(member, 32);
-                if (isStatic && memberNameNode) {
+                var isStaticMember = ts.isStatic(member);
+                if (isStaticMember && memberNameNode) {
                     var memberName = ts.getPropertyNameForPropertyNameNode(memberNameNode);
                     switch (memberName) {
                         case "name":
@@ -61168,7 +65416,7 @@ var ts;
             var names = new ts.Map();
             for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                 var member = _a[_i];
-                if (member.kind === 162) {
+                if (member.kind === 165) {
                     var memberName = void 0;
                     var name = member.name;
                     switch (name.kind) {
@@ -61176,7 +65424,7 @@ var ts;
                         case 8:
                             memberName = name.text;
                             break;
-                        case 78:
+                        case 79:
                             memberName = ts.idText(name);
                             break;
                         default:
@@ -61193,50 +65441,52 @@ var ts;
             }
         }
         function checkTypeForDuplicateIndexSignatures(node) {
-            if (node.kind === 253) {
+            if (node.kind === 257) {
                 var nodeSymbol = getSymbolOfNode(node);
-                if (nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {
+                if (nodeSymbol.declarations && nodeSymbol.declarations.length > 0 && nodeSymbol.declarations[0] !== node) {
                     return;
                 }
             }
             var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
-            if (indexSymbol) {
-                var seenNumericIndexer = false;
-                var seenStringIndexer = false;
-                for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
-                    var decl = _a[_i];
-                    var declaration = decl;
+            if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
+                var indexSignatureMap_1 = new ts.Map();
+                var _loop_26 = function (declaration) {
                     if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
-                        switch (declaration.parameters[0].type.kind) {
-                            case 147:
-                                if (!seenStringIndexer) {
-                                    seenStringIndexer = true;
-                                }
-                                else {
-                                    error(declaration, ts.Diagnostics.Duplicate_string_index_signature);
-                                }
-                                break;
-                            case 144:
-                                if (!seenNumericIndexer) {
-                                    seenNumericIndexer = true;
-                                }
-                                else {
-                                    error(declaration, ts.Diagnostics.Duplicate_number_index_signature);
-                                }
-                                break;
-                        }
+                        forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
+                            var entry = indexSignatureMap_1.get(getTypeId(type));
+                            if (entry) {
+                                entry.declarations.push(declaration);
+                            }
+                            else {
+                                indexSignatureMap_1.set(getTypeId(type), { type: type, declarations: [declaration] });
+                            }
+                        });
                     }
+                };
+                for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
+                    var declaration = _a[_i];
+                    _loop_26(declaration);
                 }
+                indexSignatureMap_1.forEach(function (entry) {
+                    if (entry.declarations.length > 1) {
+                        for (var _i = 0, _a = entry.declarations; _i < _a.length; _i++) {
+                            var declaration = _a[_i];
+                            error(declaration, ts.Diagnostics.Duplicate_index_signature_for_type_0, typeToString(entry.type));
+                        }
+                    }
+                });
             }
         }
         function checkPropertyDeclaration(node) {
             if (!checkGrammarDecoratorsAndModifiers(node) && !checkGrammarProperty(node))
                 checkGrammarComputedPropertyName(node.name);
             checkVariableLikeDeclaration(node);
-            if (ts.isPrivateIdentifier(node.name) && languageVersion < 99) {
-                for (var lexicalScope = ts.getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = ts.getEnclosingBlockScopeContainer(lexicalScope)) {
-                    getNodeLinks(lexicalScope).flags |= 67108864;
-                }
+            setNodeLinksForPrivateIdentifierScope(node);
+            if (ts.isPrivateIdentifier(node.name) && ts.hasStaticModifier(node) && node.initializer && languageVersion === 99 && !compilerOptions.useDefineForClassFields) {
+                error(node.initializer, ts.Diagnostics.Static_fields_with_private_names_can_t_have_initializers_when_the_useDefineForClassFields_flag_is_not_specified_with_a_target_of_esnext_Consider_adding_the_useDefineForClassFields_flag);
+            }
+            if (ts.hasSyntacticModifier(node, 128) && node.kind === 166 && node.initializer) {
+                error(node, ts.Diagnostics.Property_0_cannot_have_an_initializer_because_it_is_marked_abstract, ts.declarationNameToString(node.name));
             }
         }
         function checkPropertySignature(node) {
@@ -61248,13 +65498,32 @@ var ts;
         function checkMethodDeclaration(node) {
             if (!checkGrammarMethod(node))
                 checkGrammarComputedPropertyName(node.name);
-            if (ts.isPrivateIdentifier(node.name)) {
-                error(node, ts.Diagnostics.A_method_cannot_be_named_with_a_private_identifier);
-            }
             checkFunctionOrMethodDeclaration(node);
-            if (ts.hasSyntacticModifier(node, 128) && node.kind === 165 && node.body) {
+            if (ts.hasSyntacticModifier(node, 128) && node.kind === 168 && node.body) {
                 error(node, ts.Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract, ts.declarationNameToString(node.name));
             }
+            if (ts.isPrivateIdentifier(node.name) && !ts.getContainingClass(node)) {
+                error(node, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
+            }
+            setNodeLinksForPrivateIdentifierScope(node);
+        }
+        function setNodeLinksForPrivateIdentifierScope(node) {
+            if (ts.isPrivateIdentifier(node.name) && languageVersion < 99) {
+                for (var lexicalScope = ts.getEnclosingBlockScopeContainer(node); !!lexicalScope; lexicalScope = ts.getEnclosingBlockScopeContainer(lexicalScope)) {
+                    getNodeLinks(lexicalScope).flags |= 67108864;
+                }
+                if (ts.isClassExpression(node.parent)) {
+                    var enclosingIterationStatement = getEnclosingIterationStatement(node.parent);
+                    if (enclosingIterationStatement) {
+                        getNodeLinks(node.name).flags |= 524288;
+                        getNodeLinks(enclosingIterationStatement).flags |= 65536;
+                    }
+                }
+            }
+        }
+        function checkClassStaticBlockDeclaration(node) {
+            checkGrammarDecoratorsAndModifiers(node);
+            ts.forEachChild(node, checkSourceElement);
         }
         function checkConstructorDeclaration(node) {
             checkSignatureDeclaration(node);
@@ -61273,11 +65542,11 @@ var ts;
                 return;
             }
             function isInstancePropertyWithInitializerOrPrivateIdentifierProperty(n) {
-                if (ts.isPrivateIdentifierPropertyDeclaration(n)) {
+                if (ts.isPrivateIdentifierClassElementDeclaration(n)) {
                     return true;
                 }
-                return n.kind === 163 &&
-                    !ts.hasSyntacticModifier(n, 32) &&
+                return n.kind === 166 &&
+                    !ts.isStatic(n) &&
                     !!n.initializer;
             }
             var containingClassDecl = node.parent;
@@ -61289,15 +65558,15 @@ var ts;
                     if (classExtendsNull) {
                         error(superCall, ts.Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null);
                     }
-                    var superCallShouldBeFirst = (compilerOptions.target !== 99 || !compilerOptions.useDefineForClassFields) &&
+                    var superCallShouldBeFirst = (ts.getEmitScriptTarget(compilerOptions) !== 99 || !useDefineForClassFields) &&
                         (ts.some(node.parent.members, isInstancePropertyWithInitializerOrPrivateIdentifierProperty) ||
-                            ts.some(node.parameters, function (p) { return ts.hasSyntacticModifier(p, 92); }));
+                            ts.some(node.parameters, function (p) { return ts.hasSyntacticModifier(p, 16476); }));
                     if (superCallShouldBeFirst) {
                         var statements = node.body.statements;
                         var superCallStatement = void 0;
                         for (var _i = 0, statements_4 = statements; _i < statements_4.length; _i++) {
                             var statement = statements_4[_i];
-                            if (statement.kind === 233 && ts.isSuperCall(statement.expression)) {
+                            if (statement.kind === 237 && ts.isSuperCall(statement.expression)) {
                                 superCallStatement = statement;
                                 break;
                             }
@@ -61321,48 +65590,47 @@ var ts;
                     checkGrammarComputedPropertyName(node.name);
                 checkDecorators(node);
                 checkSignatureDeclaration(node);
-                if (node.kind === 167) {
+                if (node.kind === 171) {
                     if (!(node.flags & 8388608) && ts.nodeIsPresent(node.body) && (node.flags & 256)) {
                         if (!(node.flags & 512)) {
                             error(node.name, ts.Diagnostics.A_get_accessor_must_return_a_value);
                         }
                     }
                 }
-                if (node.name.kind === 158) {
+                if (node.name.kind === 161) {
                     checkComputedPropertyName(node.name);
                 }
-                if (ts.isPrivateIdentifier(node.name)) {
-                    error(node.name, ts.Diagnostics.An_accessor_cannot_be_named_with_a_private_identifier);
-                }
                 if (hasBindableName(node)) {
-                    var otherKind = node.kind === 167 ? 168 : 167;
-                    var otherAccessor = ts.getDeclarationOfKind(getSymbolOfNode(node), otherKind);
-                    if (otherAccessor) {
-                        var nodeFlags = ts.getEffectiveModifierFlags(node);
-                        var otherFlags = ts.getEffectiveModifierFlags(otherAccessor);
-                        if ((nodeFlags & 28) !== (otherFlags & 28)) {
-                            error(node.name, ts.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility);
+                    var symbol = getSymbolOfNode(node);
+                    var getter = ts.getDeclarationOfKind(symbol, 171);
+                    var setter = ts.getDeclarationOfKind(symbol, 172);
+                    if (getter && setter && !(getNodeCheckFlags(getter) & 1)) {
+                        getNodeLinks(getter).flags |= 1;
+                        var getterFlags = ts.getEffectiveModifierFlags(getter);
+                        var setterFlags = ts.getEffectiveModifierFlags(setter);
+                        if ((getterFlags & 128) !== (setterFlags & 128)) {
+                            error(getter.name, ts.Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);
+                            error(setter.name, ts.Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);
                         }
-                        if ((nodeFlags & 128) !== (otherFlags & 128)) {
-                            error(node.name, ts.Diagnostics.Accessors_must_both_be_abstract_or_non_abstract);
+                        if (((getterFlags & 16) && !(setterFlags & (16 | 8))) ||
+                            ((getterFlags & 8) && !(setterFlags & 8))) {
+                            error(getter.name, ts.Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);
+                            error(setter.name, ts.Diagnostics.A_get_accessor_must_be_at_least_as_accessible_as_the_setter);
+                        }
+                        var getterType = getAnnotatedAccessorType(getter);
+                        var setterType = getAnnotatedAccessorType(setter);
+                        if (getterType && setterType) {
+                            checkTypeAssignableTo(getterType, setterType, getter, ts.Diagnostics.The_return_type_of_a_get_accessor_must_be_assignable_to_its_set_accessor_type);
                         }
-                        checkAccessorDeclarationTypesIdentical(node, otherAccessor, getAnnotatedAccessorType, ts.Diagnostics.get_and_set_accessor_must_have_the_same_type);
-                        checkAccessorDeclarationTypesIdentical(node, otherAccessor, getThisTypeOfDeclaration, ts.Diagnostics.get_and_set_accessor_must_have_the_same_this_type);
                     }
                 }
                 var returnType = getTypeOfAccessors(getSymbolOfNode(node));
-                if (node.kind === 167) {
+                if (node.kind === 171) {
                     checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, returnType);
                 }
             }
             checkSourceElement(node.body);
-        }
-        function checkAccessorDeclarationTypesIdentical(first, second, getAnnotatedType, message) {
-            var firstType = getAnnotatedType(first);
-            var secondType = getAnnotatedType(second);
-            if (firstType && secondType && !isTypeIdenticalTo(firstType, secondType)) {
-                error(first, message);
-            }
+            setNodeLinksForPrivateIdentifierScope(node);
         }
         function checkMissingDeclaration(node) {
             checkDecorators(node);
@@ -61388,7 +65656,7 @@ var ts;
         }
         function getTypeParametersForTypeReference(node) {
             var type = getTypeFromTypeReference(node);
-            if (type !== errorType) {
+            if (!isErrorType(type)) {
                 var symbol = getNodeLinks(node).resolvedSymbol;
                 if (symbol) {
                     return symbol.flags & 524288 && getSymbolLinks(symbol).typeParameters ||
@@ -61399,12 +65667,12 @@ var ts;
         }
         function checkTypeReferenceNode(node) {
             checkGrammarTypeArguments(node, node.typeArguments);
-            if (node.kind === 173 && node.typeName.jsdocDotPos !== undefined && !ts.isInJSFile(node) && !ts.isInJSDoc(node)) {
+            if (node.kind === 177 && node.typeName.jsdocDotPos !== undefined && !ts.isInJSFile(node) && !ts.isInJSDoc(node)) {
                 grammarErrorAtPos(node, node.typeName.jsdocDotPos, 1, ts.Diagnostics.JSDoc_types_can_only_be_used_inside_documentation_comments);
             }
             ts.forEach(node.typeArguments, checkSourceElement);
             var type = getTypeFromTypeReference(node);
-            if (type !== errorType) {
+            if (!isErrorType(type)) {
                 if (node.typeArguments && produceDiagnostics) {
                     var typeParameters = getTypeParametersForTypeReference(node);
                     if (typeParameters) {
@@ -61427,6 +65695,8 @@ var ts;
             if (!typeReferenceNode)
                 return undefined;
             var typeParameters = getTypeParametersForTypeReference(typeReferenceNode);
+            if (!typeParameters)
+                return undefined;
             var constraint = getConstraintOfTypeParameter(typeParameters[typeReferenceNode.typeArguments.indexOf(node)]);
             return constraint && instantiateType(constraint, createTypeMapper(typeParameters, getEffectiveTypeArguments(typeReferenceNode, typeParameters)));
         }
@@ -61437,7 +65707,7 @@ var ts;
             ts.forEach(node.members, checkSourceElement);
             if (produceDiagnostics) {
                 var type = getTypeFromTypeLiteralOrFunctionOrConstructorTypeNode(node);
-                checkIndexConstraints(type);
+                checkIndexConstraints(type, type.symbol);
                 checkTypeForDuplicateIndexSignatures(node);
                 checkObjectTypeForDuplicateDeclarations(node);
             }
@@ -61452,7 +65722,7 @@ var ts;
             var hasNamedElement = ts.some(elementTypes, ts.isNamedTupleMember);
             for (var _i = 0, elementTypes_1 = elementTypes; _i < elementTypes_1.length; _i++) {
                 var e = elementTypes_1[_i];
-                if (e.kind !== 192 && hasNamedElement) {
+                if (e.kind !== 196 && hasNamedElement) {
                     grammarErrorOnNode(e, ts.Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names);
                     break;
                 }
@@ -61500,14 +65770,14 @@ var ts;
             var objectType = type.objectType;
             var indexType = type.indexType;
             if (isTypeAssignableTo(indexType, getIndexType(objectType, false))) {
-                if (accessNode.kind === 202 && ts.isAssignmentTarget(accessNode) &&
+                if (accessNode.kind === 206 && ts.isAssignmentTarget(accessNode) &&
                     ts.getObjectFlags(objectType) & 32 && getMappedTypeModifiers(objectType) & 1) {
                     error(accessNode, ts.Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(objectType));
                 }
                 return type;
             }
             var apparentObjectType = getApparentType(objectType);
-            if (getIndexInfoOfType(apparentObjectType, 1) && isTypeAssignableToKind(indexType, 296)) {
+            if (getIndexInfoOfType(apparentObjectType, numberType) && isTypeAssignableToKind(indexType, 296)) {
                 return type;
             }
             if (isGenericObjectType(objectType)) {
@@ -61529,6 +65799,7 @@ var ts;
             checkIndexedAccessIndexType(getTypeFromIndexedAccessTypeNode(node), node);
         }
         function checkMappedType(node) {
+            checkGrammarMappedType(node);
             checkSourceElement(node.typeParameter);
             checkSourceElement(node.nameType);
             checkSourceElement(node.type);
@@ -61545,6 +65816,12 @@ var ts;
                 checkTypeAssignableTo(constraintType, keyofConstraintType, ts.getEffectiveConstraintOfTypeParameter(node.typeParameter));
             }
         }
+        function checkGrammarMappedType(node) {
+            var _a;
+            if ((_a = node.members) === null || _a === void 0 ? void 0 : _a.length) {
+                return grammarErrorOnNode(node.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
+            }
+        }
         function checkThisType(node) {
             getTypeFromThisTypeNode(node);
         }
@@ -61556,7 +65833,7 @@ var ts;
             ts.forEachChild(node, checkSourceElement);
         }
         function checkInferType(node) {
-            if (!ts.findAncestor(node, function (n) { return n.parent && n.parent.kind === 184 && n.parent.extendsType === n; })) {
+            if (!ts.findAncestor(node, function (n) { return n.parent && n.parent.kind === 188 && n.parent.extendsType === n; })) {
                 grammarErrorOnNode(node, ts.Diagnostics.infer_declarations_are_only_permitted_in_the_extends_clause_of_a_conditional_type);
             }
             checkSourceElement(node.typeParameter);
@@ -61579,23 +65856,23 @@ var ts;
             if (node.dotDotDotToken && node.questionToken) {
                 grammarErrorOnNode(node, ts.Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest);
             }
-            if (node.type.kind === 180) {
+            if (node.type.kind === 184) {
                 grammarErrorOnNode(node.type, ts.Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type);
             }
-            if (node.type.kind === 181) {
+            if (node.type.kind === 185) {
                 grammarErrorOnNode(node.type, ts.Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type);
             }
             checkSourceElement(node.type);
             getTypeFromTypeNode(node);
         }
         function isPrivateWithinAmbient(node) {
-            return (ts.hasEffectiveModifier(node, 8) || ts.isPrivateIdentifierPropertyDeclaration(node)) && !!(node.flags & 8388608);
+            return (ts.hasEffectiveModifier(node, 8) || ts.isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 8388608);
         }
         function getEffectiveDeclarationFlags(n, flagsToCheck) {
             var flags = ts.getCombinedModifierFlags(n);
-            if (n.parent.kind !== 253 &&
-                n.parent.kind !== 252 &&
-                n.parent.kind !== 221 &&
+            if (n.parent.kind !== 257 &&
+                n.parent.kind !== 256 &&
+                n.parent.kind !== 225 &&
                 n.flags & 8388608) {
                 if (!(flags & 2) && !(ts.isModuleBlock(n.parent) && ts.isModuleDeclaration(n.parent.parent) && ts.isGlobalScopeAugmentation(n.parent.parent))) {
                     flags |= 1;
@@ -61676,10 +65953,10 @@ var ts;
                             ts.isComputedPropertyName(node.name) && ts.isComputedPropertyName(subsequentName) ||
                             ts.isPropertyNameLiteral(node.name) && ts.isPropertyNameLiteral(subsequentName) &&
                                 ts.getEscapedTextOfIdentifierOrLiteral(node.name) === ts.getEscapedTextOfIdentifierOrLiteral(subsequentName))) {
-                            var reportError = (node.kind === 165 || node.kind === 164) &&
-                                ts.hasSyntacticModifier(node, 32) !== ts.hasSyntacticModifier(subsequentNode, 32);
+                            var reportError = (node.kind === 168 || node.kind === 167) &&
+                                ts.isStatic(node) !== ts.isStatic(subsequentNode);
                             if (reportError) {
-                                var diagnostic = ts.hasSyntacticModifier(node, 32) ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
+                                var diagnostic = ts.isStatic(node) ? ts.Diagnostics.Function_overload_must_be_static : ts.Diagnostics.Function_overload_must_not_be_static;
                                 error(errorNode_1, diagnostic);
                             }
                             return;
@@ -61707,48 +65984,50 @@ var ts;
             var multipleConstructorImplementation = false;
             var hasNonAmbientClass = false;
             var functionDeclarations = [];
-            for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
-                var current = declarations_4[_i];
-                var node = current;
-                var inAmbientContext = node.flags & 8388608;
-                var inAmbientContextOrInterface = node.parent && (node.parent.kind === 253 || node.parent.kind === 177) || inAmbientContext;
-                if (inAmbientContextOrInterface) {
-                    previousDeclaration = undefined;
-                }
-                if ((node.kind === 252 || node.kind === 221) && !inAmbientContext) {
-                    hasNonAmbientClass = true;
-                }
-                if (node.kind === 251 || node.kind === 165 || node.kind === 164 || node.kind === 166) {
-                    functionDeclarations.push(node);
-                    var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
-                    someNodeFlags |= currentNodeFlags;
-                    allNodeFlags &= currentNodeFlags;
-                    someHaveQuestionToken = someHaveQuestionToken || ts.hasQuestionToken(node);
-                    allHaveQuestionToken = allHaveQuestionToken && ts.hasQuestionToken(node);
-                    var bodyIsPresent = ts.nodeIsPresent(node.body);
-                    if (bodyIsPresent && bodyDeclaration) {
-                        if (isConstructor) {
-                            multipleConstructorImplementation = true;
+            if (declarations) {
+                for (var _i = 0, declarations_4 = declarations; _i < declarations_4.length; _i++) {
+                    var current = declarations_4[_i];
+                    var node = current;
+                    var inAmbientContext = node.flags & 8388608;
+                    var inAmbientContextOrInterface = node.parent && (node.parent.kind === 257 || node.parent.kind === 181) || inAmbientContext;
+                    if (inAmbientContextOrInterface) {
+                        previousDeclaration = undefined;
+                    }
+                    if ((node.kind === 256 || node.kind === 225) && !inAmbientContext) {
+                        hasNonAmbientClass = true;
+                    }
+                    if (node.kind === 255 || node.kind === 168 || node.kind === 167 || node.kind === 170) {
+                        functionDeclarations.push(node);
+                        var currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck);
+                        someNodeFlags |= currentNodeFlags;
+                        allNodeFlags &= currentNodeFlags;
+                        someHaveQuestionToken = someHaveQuestionToken || ts.hasQuestionToken(node);
+                        allHaveQuestionToken = allHaveQuestionToken && ts.hasQuestionToken(node);
+                        var bodyIsPresent = ts.nodeIsPresent(node.body);
+                        if (bodyIsPresent && bodyDeclaration) {
+                            if (isConstructor) {
+                                multipleConstructorImplementation = true;
+                            }
+                            else {
+                                duplicateFunctionDeclaration = true;
+                            }
+                        }
+                        else if ((previousDeclaration === null || previousDeclaration === void 0 ? void 0 : previousDeclaration.parent) === node.parent && previousDeclaration.end !== node.pos) {
+                            reportImplementationExpectedError(previousDeclaration);
+                        }
+                        if (bodyIsPresent) {
+                            if (!bodyDeclaration) {
+                                bodyDeclaration = node;
+                            }
                         }
                         else {
-                            duplicateFunctionDeclaration = true;
+                            hasOverloads = true;
                         }
-                    }
-                    else if ((previousDeclaration === null || previousDeclaration === void 0 ? void 0 : previousDeclaration.parent) === node.parent && previousDeclaration.end !== node.pos) {
-                        reportImplementationExpectedError(previousDeclaration);
-                    }
-                    if (bodyIsPresent) {
-                        if (!bodyDeclaration) {
-                            bodyDeclaration = node;
+                        previousDeclaration = node;
+                        if (!inAmbientContextOrInterface) {
+                            lastSeenNonAmbientDeclaration = node;
                         }
                     }
-                    else {
-                        hasOverloads = true;
-                    }
-                    previousDeclaration = node;
-                    if (!inAmbientContextOrInterface) {
-                        lastSeenNonAmbientDeclaration = node;
-                    }
                 }
             }
             if (multipleConstructorImplementation) {
@@ -61761,9 +66040,18 @@ var ts;
                     error(ts.getNameOfDeclaration(declaration) || declaration, ts.Diagnostics.Duplicate_function_implementation);
                 });
             }
-            if (hasNonAmbientClass && !isConstructor && symbol.flags & 16) {
+            if (hasNonAmbientClass && !isConstructor && symbol.flags & 16 && declarations) {
+                var relatedDiagnostics_1 = ts.filter(declarations, function (d) { return d.kind === 256; })
+                    .map(function (d) { return ts.createDiagnosticForNode(d, ts.Diagnostics.Consider_adding_a_declare_modifier_to_this_class); });
                 ts.forEach(declarations, function (declaration) {
-                    addDuplicateDeclarationError(declaration, ts.Diagnostics.Duplicate_identifier_0, ts.symbolName(symbol), declarations);
+                    var diagnostic = declaration.kind === 256
+                        ? ts.Diagnostics.Class_declaration_cannot_implement_overload_list_for_0
+                        : declaration.kind === 255
+                            ? ts.Diagnostics.Function_with_bodies_can_only_merge_with_classes_that_are_ambient
+                            : undefined;
+                    if (diagnostic) {
+                        ts.addRelatedInfo.apply(void 0, __spreadArray([error(ts.getNameOfDeclaration(declaration) || declaration, diagnostic, ts.symbolName(symbol))], relatedDiagnostics_1, false));
+                    }
                 });
             }
             if (lastSeenNonAmbientDeclaration && !lastSeenNonAmbientDeclaration.body &&
@@ -61771,8 +66059,10 @@ var ts;
                 reportImplementationExpectedError(lastSeenNonAmbientDeclaration);
             }
             if (hasOverloads) {
-                checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags);
-                checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken);
+                if (declarations) {
+                    checkFlagAgreementBetweenOverloads(declarations, bodyDeclaration, flagsToCheck, someNodeFlags, allNodeFlags);
+                    checkQuestionTokenAgreementBetweenOverloads(declarations, bodyDeclaration, someHaveQuestionToken, allHaveQuestionToken);
+                }
                 if (bodyDeclaration) {
                     var signatures = getSignaturesOfSymbol(symbol);
                     var bodySignature = getSignatureFromDeclaration(bodyDeclaration);
@@ -61838,39 +66128,44 @@ var ts;
             function getDeclarationSpaces(decl) {
                 var d = decl;
                 switch (d.kind) {
-                    case 253:
-                    case 254:
-                    case 331:
-                    case 324:
-                    case 325:
+                    case 257:
+                    case 258:
+                    case 343:
+                    case 336:
+                    case 337:
                         return 2;
-                    case 256:
+                    case 260:
                         return ts.isAmbientModule(d) || ts.getModuleInstanceState(d) !== 0
                             ? 4 | 1
                             : 4;
-                    case 252:
-                    case 255:
-                    case 291:
-                        return 2 | 1;
+                    case 256:
+                    case 259:
                     case 297:
+                        return 2 | 1;
+                    case 303:
                         return 2 | 1 | 4;
-                    case 266:
-                        if (!ts.isEntityNameExpression(d.expression)) {
+                    case 270:
+                    case 220:
+                        var node_2 = d;
+                        var expression = ts.isExportAssignment(node_2) ? node_2.expression : node_2.right;
+                        if (!ts.isEntityNameExpression(expression)) {
                             return 1;
                         }
-                        d = d.expression;
-                    case 260:
-                    case 263:
-                    case 262:
-                        var result_12 = 0;
+                        d = expression;
+                    case 264:
+                    case 267:
+                    case 266:
+                        var result_11 = 0;
                         var target = resolveAlias(getSymbolOfNode(d));
-                        ts.forEach(target.declarations, function (d) { result_12 |= getDeclarationSpaces(d); });
-                        return result_12;
-                    case 249:
-                    case 198:
-                    case 251:
-                    case 265:
-                    case 78:
+                        ts.forEach(target.declarations, function (d) {
+                            result_11 |= getDeclarationSpaces(d);
+                        });
+                        return result_11;
+                    case 253:
+                    case 202:
+                    case 255:
+                    case 269:
+                    case 79:
                         return 1;
                     default:
                         return ts.Debug.failBadSyntaxKind(d);
@@ -61892,6 +66187,9 @@ var ts;
             if (isReferenceToType(type, getGlobalPromiseType(false))) {
                 return typeAsPromise.promisedTypeOfPromise = getTypeArguments(type)[0];
             }
+            if (allTypesAssignableToKind(type, 131068 | 131072)) {
+                return undefined;
+            }
             var thenFunction = getTypeOfPropertyOfType(type, "then");
             if (isTypeAny(thenFunction)) {
                 return undefined;
@@ -61916,30 +66214,70 @@ var ts;
             }
             return typeAsPromise.promisedTypeOfPromise = getUnionType(ts.map(onfulfilledParameterSignatures, getTypeOfFirstParameterOfSignature), 2);
         }
-        function checkAwaitedType(type, errorNode, diagnosticMessage, arg0) {
-            var awaitedType = getAwaitedType(type, errorNode, diagnosticMessage, arg0);
+        function checkAwaitedType(type, withAlias, errorNode, diagnosticMessage, arg0) {
+            var awaitedType = withAlias ?
+                getAwaitedType(type, errorNode, diagnosticMessage, arg0) :
+                getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, arg0);
             return awaitedType || errorType;
         }
         function isThenableType(type) {
+            if (allTypesAssignableToKind(type, 131068 | 131072)) {
+                return false;
+            }
             var thenFunction = getTypeOfPropertyOfType(type, "then");
             return !!thenFunction && getSignaturesOfType(getTypeWithFacts(thenFunction, 2097152), 0).length > 0;
         }
-        function getAwaitedType(type, errorNode, diagnosticMessage, arg0) {
+        function isAwaitedTypeInstantiation(type) {
+            var _a;
+            if (type.flags & 16777216) {
+                var awaitedSymbol = getGlobalAwaitedSymbol(false);
+                return !!awaitedSymbol && type.aliasSymbol === awaitedSymbol && ((_a = type.aliasTypeArguments) === null || _a === void 0 ? void 0 : _a.length) === 1;
+            }
+            return false;
+        }
+        function unwrapAwaitedType(type) {
+            return type.flags & 1048576 ? mapType(type, unwrapAwaitedType) :
+                isAwaitedTypeInstantiation(type) ? type.aliasTypeArguments[0] :
+                    type;
+        }
+        function createAwaitedTypeIfNeeded(type) {
             if (isTypeAny(type)) {
                 return type;
             }
-            var typeAsAwaitable = type;
-            if (typeAsAwaitable.awaitedTypeOfType) {
-                return typeAsAwaitable.awaitedTypeOfType;
+            if (isAwaitedTypeInstantiation(type)) {
+                return type;
+            }
+            if (isGenericObjectType(type)) {
+                var baseConstraint = getBaseConstraintOfType(type);
+                if (!baseConstraint || (baseConstraint.flags & 3) || isEmptyObjectType(baseConstraint) || isThenableType(baseConstraint)) {
+                    var awaitedSymbol = getGlobalAwaitedSymbol(true);
+                    if (awaitedSymbol) {
+                        return getTypeAliasInstantiation(awaitedSymbol, [unwrapAwaitedType(type)]);
+                    }
+                }
             }
-            return typeAsAwaitable.awaitedTypeOfType =
-                mapType(type, errorNode ? function (constituentType) { return getAwaitedTypeWorker(constituentType, errorNode, diagnosticMessage, arg0); } : getAwaitedTypeWorker);
+            ts.Debug.assert(getPromisedTypeOfPromise(type) === undefined, "type provided should not be a non-generic 'promise'-like.");
+            return type;
+        }
+        function getAwaitedType(type, errorNode, diagnosticMessage, arg0) {
+            var awaitedType = getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, arg0);
+            return awaitedType && createAwaitedTypeIfNeeded(awaitedType);
         }
-        function getAwaitedTypeWorker(type, errorNode, diagnosticMessage, arg0) {
+        function getAwaitedTypeNoAlias(type, errorNode, diagnosticMessage, arg0) {
+            if (isTypeAny(type)) {
+                return type;
+            }
+            if (isAwaitedTypeInstantiation(type)) {
+                return type;
+            }
             var typeAsAwaitable = type;
             if (typeAsAwaitable.awaitedTypeOfType) {
                 return typeAsAwaitable.awaitedTypeOfType;
             }
+            if (type.flags & 1048576) {
+                var mapper = errorNode ? function (constituentType) { return getAwaitedTypeNoAlias(constituentType, errorNode, diagnosticMessage, arg0); } : getAwaitedTypeNoAlias;
+                return typeAsAwaitable.awaitedTypeOfType = mapType(type, mapper);
+            }
             var promisedType = getPromisedTypeOfPromise(type);
             if (promisedType) {
                 if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) {
@@ -61949,7 +66287,7 @@ var ts;
                     return undefined;
                 }
                 awaitedTypeStack.push(type.id);
-                var awaitedType = getAwaitedType(promisedType, errorNode, diagnosticMessage, arg0);
+                var awaitedType = getAwaitedTypeNoAlias(promisedType, errorNode, diagnosticMessage, arg0);
                 awaitedTypeStack.pop();
                 if (!awaitedType) {
                     return undefined;
@@ -61958,8 +66296,7 @@ var ts;
             }
             if (isThenableType(type)) {
                 if (errorNode) {
-                    if (!diagnosticMessage)
-                        return ts.Debug.fail();
+                    ts.Debug.assertIsDefined(diagnosticMessage);
                     error(errorNode, diagnosticMessage, arg0);
                 }
                 return undefined;
@@ -61969,18 +66306,18 @@ var ts;
         function checkAsyncFunctionReturnType(node, returnTypeNode) {
             var returnType = getTypeFromTypeNode(returnTypeNode);
             if (languageVersion >= 2) {
-                if (returnType === errorType) {
+                if (isErrorType(returnType)) {
                     return;
                 }
                 var globalPromiseType = getGlobalPromiseType(true);
                 if (globalPromiseType !== emptyGenericType && !isReferenceToType(returnType, globalPromiseType)) {
-                    error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedType(returnType) || voidType));
+                    error(returnTypeNode, ts.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_Did_you_mean_to_write_Promise_0, typeToString(getAwaitedTypeNoAlias(returnType) || voidType));
                     return;
                 }
             }
             else {
                 markTypeNodeAsReferenced(returnTypeNode);
-                if (returnType === errorType) {
+                if (isErrorType(returnType)) {
                     return;
                 }
                 var promiseConstructorName = ts.getEntityNameFromTypeNode(returnTypeNode);
@@ -61990,8 +66327,8 @@ var ts;
                 }
                 var promiseConstructorSymbol = resolveEntityName(promiseConstructorName, 111551, true);
                 var promiseConstructorType = promiseConstructorSymbol ? getTypeOfSymbol(promiseConstructorSymbol) : errorType;
-                if (promiseConstructorType === errorType) {
-                    if (promiseConstructorName.kind === 78 && promiseConstructorName.escapedText === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) {
+                if (isErrorType(promiseConstructorType)) {
+                    if (promiseConstructorName.kind === 79 && promiseConstructorName.escapedText === "Promise" && getTargetType(returnType) === getGlobalPromiseType(false)) {
                         error(returnTypeNode, ts.Diagnostics.An_async_function_or_method_in_ES5_SlashES3_requires_the_Promise_constructor_Make_sure_you_have_a_declaration_for_the_Promise_constructor_or_include_ES2015_in_your_lib_option);
                     }
                     else {
@@ -62014,7 +66351,7 @@ var ts;
                     return;
                 }
             }
-            checkAwaitedType(returnType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
+            checkAwaitedType(returnType, false, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member);
         }
         function checkDecorator(node) {
             var signature = getResolvedSignature(node);
@@ -62027,22 +66364,22 @@ var ts;
             var headMessage = getDiagnosticHeadMessageForDecoratorResolution(node);
             var errorInfo;
             switch (node.parent.kind) {
-                case 252:
+                case 256:
                     var classSymbol = getSymbolOfNode(node.parent);
                     var classConstructorType = getTypeOfSymbol(classSymbol);
                     expectedReturnType = getUnionType([classConstructorType, voidType]);
                     break;
-                case 160:
+                case 163:
                     expectedReturnType = voidType;
                     errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);
                     break;
-                case 163:
+                case 166:
                     expectedReturnType = voidType;
                     errorInfo = ts.chainDiagnosticMessages(undefined, ts.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);
                     break;
-                case 165:
-                case 167:
                 case 168:
+                case 171:
+                case 172:
                     var methodType = getTypeOfNode(node.parent);
                     var descriptorType = createTypedPropertyDescriptorType(methodType);
                     expectedReturnType = getUnionType([descriptorType, voidType]);
@@ -62059,7 +66396,7 @@ var ts;
             if (!typeName)
                 return;
             var rootName = ts.getFirstIdentifier(typeName);
-            var meaning = (typeName.kind === 78 ? 788968 : 1920) | 2097152;
+            var meaning = (typeName.kind === 79 ? 788968 : 1920) | 2097152;
             var rootSymbol = resolveName(rootName, rootName.escapedText, meaning, undefined, undefined, true);
             if (rootSymbol
                 && rootSymbol.flags & 2097152
@@ -62078,30 +66415,30 @@ var ts;
         function getEntityNameForDecoratorMetadata(node) {
             if (node) {
                 switch (node.kind) {
-                    case 183:
-                    case 182:
+                    case 187:
+                    case 186:
                         return getEntityNameForDecoratorMetadataFromTypeList(node.types);
-                    case 184:
+                    case 188:
                         return getEntityNameForDecoratorMetadataFromTypeList([node.trueType, node.falseType]);
-                    case 186:
-                    case 192:
+                    case 190:
+                    case 196:
                         return getEntityNameForDecoratorMetadata(node.type);
-                    case 173:
+                    case 177:
                         return node.typeName;
                 }
             }
         }
         function getEntityNameForDecoratorMetadataFromTypeList(types) {
             var commonEntityName;
-            for (var _i = 0, types_23 = types; _i < types_23.length; _i++) {
-                var typeNode = types_23[_i];
-                while (typeNode.kind === 186 || typeNode.kind === 192) {
+            for (var _i = 0, types_22 = types; _i < types_22.length; _i++) {
+                var typeNode = types_22[_i];
+                while (typeNode.kind === 190 || typeNode.kind === 196) {
                     typeNode = typeNode.type;
                 }
-                if (typeNode.kind === 141) {
+                if (typeNode.kind === 143) {
                     continue;
                 }
-                if (!strictNullChecks && (typeNode.kind === 191 && typeNode.literal.kind === 103 || typeNode.kind === 150)) {
+                if (!strictNullChecks && (typeNode.kind === 195 && typeNode.literal.kind === 104 || typeNode.kind === 152)) {
                     continue;
                 }
                 var individualEntityName = getEntityNameForDecoratorMetadata(typeNode);
@@ -62137,13 +66474,13 @@ var ts;
             }
             var firstDecorator = node.decorators[0];
             checkExternalEmitHelpers(firstDecorator, 8);
-            if (node.kind === 160) {
+            if (node.kind === 163) {
                 checkExternalEmitHelpers(firstDecorator, 32);
             }
             if (compilerOptions.emitDecoratorMetadata) {
                 checkExternalEmitHelpers(firstDecorator, 16);
                 switch (node.kind) {
-                    case 252:
+                    case 256:
                         var constructor = ts.getFirstConstructorWithBody(node);
                         if (constructor) {
                             for (var _i = 0, _a = constructor.parameters; _i < _a.length; _i++) {
@@ -62152,23 +66489,23 @@ var ts;
                             }
                         }
                         break;
-                    case 167:
-                    case 168:
-                        var otherKind = node.kind === 167 ? 168 : 167;
+                    case 171:
+                    case 172:
+                        var otherKind = node.kind === 171 ? 172 : 171;
                         var otherAccessor = ts.getDeclarationOfKind(getSymbolOfNode(node), otherKind);
                         markDecoratorMedataDataTypeNodeAsReferenced(getAnnotatedAccessorTypeNode(node) || otherAccessor && getAnnotatedAccessorTypeNode(otherAccessor));
                         break;
-                    case 165:
+                    case 168:
                         for (var _b = 0, _c = node.parameters; _b < _c.length; _b++) {
                             var parameter = _c[_b];
                             markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(parameter));
                         }
                         markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveReturnTypeNode(node));
                         break;
-                    case 163:
+                    case 166:
                         markDecoratorMedataDataTypeNodeAsReferenced(ts.getEffectiveTypeAnnotationNode(node));
                         break;
-                    case 160:
+                    case 163:
                         markDecoratorMedataDataTypeNodeAsReferenced(getParameterTypeNodeForDecoratorCheck(node));
                         var containingSignature = node.parent;
                         for (var _d = 0, _e = containingSignature.parameters; _d < _e.length; _d++) {
@@ -62184,8 +66521,7 @@ var ts;
             if (produceDiagnostics) {
                 checkFunctionOrMethodDeclaration(node);
                 checkGrammarForGenerator(node);
-                checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
-                checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
+                checkCollisionsForDeclarationName(node, node.name);
             }
         }
         function checkJSDocTypeAliasTag(node) {
@@ -62196,6 +66532,7 @@ var ts;
                 checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0);
             }
             checkSourceElement(node.typeExpression);
+            checkTypeParameters(ts.getEffectiveTypeParameterDeclarations(node));
         }
         function checkJSDocTemplateTag(node) {
             checkSourceElement(node.constraint);
@@ -62227,7 +66564,7 @@ var ts;
                     else if (ts.findLast(ts.getJSDocTags(decl), ts.isJSDocParameterTag) === node &&
                         node.typeExpression && node.typeExpression.type &&
                         !isArrayType(getTypeFromTypeNode(node.typeExpression.type))) {
-                        error(node.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(node.name.kind === 157 ? node.name.right : node.name));
+                        error(node.name, ts.Diagnostics.JSDoc_param_tag_has_name_0_but_there_is_no_parameter_with_that_name_It_would_match_arguments_if_it_had_an_array_type, ts.idText(node.name.kind === 160 ? node.name.right : node.name));
                     }
                 }
             }
@@ -62267,27 +66604,34 @@ var ts;
                 }
             }
         }
+        function checkJSDocAccessibilityModifiers(node) {
+            var host = ts.getJSDocHost(node);
+            if (host && ts.isPrivateIdentifierClassElementDeclaration(host)) {
+                error(node, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);
+            }
+        }
         function getIdentifierFromEntityNameExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return node;
-                case 201:
+                case 205:
                     return node.name;
                 default:
                     return undefined;
             }
         }
         function checkFunctionOrMethodDeclaration(node) {
+            var _a;
             checkDecorators(node);
             checkSignatureDeclaration(node);
             var functionFlags = ts.getFunctionFlags(node);
-            if (node.name && node.name.kind === 158) {
+            if (node.name && node.name.kind === 161) {
                 checkComputedPropertyName(node.name);
             }
             if (hasBindableName(node)) {
                 var symbol = getSymbolOfNode(node);
                 var localSymbol = node.localSymbol || symbol;
-                var firstDeclaration = ts.find(localSymbol.declarations, function (declaration) { return declaration.kind === node.kind && !(declaration.flags & 131072); });
+                var firstDeclaration = (_a = localSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (declaration) { return declaration.kind === node.kind && !(declaration.flags & 131072); });
                 if (node === firstDeclaration) {
                     checkFunctionOrConstructorSymbol(localSymbol);
                 }
@@ -62295,7 +66639,7 @@ var ts;
                     checkFunctionOrConstructorSymbol(symbol);
                 }
             }
-            var body = node.kind === 164 ? undefined : node.body;
+            var body = node.kind === 167 ? undefined : node.body;
             checkSourceElement(body);
             checkAllCodePathsInNonVoidFunctionReturnOrThrow(node, getReturnTypeFromAnnotation(node));
             if (produceDiagnostics && !ts.getEffectiveReturnTypeNode(node)) {
@@ -62328,42 +66672,42 @@ var ts;
             for (var _i = 0, potentiallyUnusedIdentifiers_1 = potentiallyUnusedIdentifiers; _i < potentiallyUnusedIdentifiers_1.length; _i++) {
                 var node = potentiallyUnusedIdentifiers_1[_i];
                 switch (node.kind) {
-                    case 252:
-                    case 221:
+                    case 256:
+                    case 225:
                         checkUnusedClassMembers(node, addDiagnostic);
                         checkUnusedTypeParameters(node, addDiagnostic);
                         break;
-                    case 297:
-                    case 256:
-                    case 230:
-                    case 258:
-                    case 237:
-                    case 238:
-                    case 239:
+                    case 303:
+                    case 260:
+                    case 234:
+                    case 262:
+                    case 241:
+                    case 242:
+                    case 243:
                         checkUnusedLocalsAndParameters(node, addDiagnostic);
                         break;
-                    case 166:
-                    case 208:
-                    case 251:
-                    case 209:
-                    case 165:
-                    case 167:
+                    case 170:
+                    case 212:
+                    case 255:
+                    case 213:
                     case 168:
+                    case 171:
+                    case 172:
                         if (node.body) {
                             checkUnusedLocalsAndParameters(node, addDiagnostic);
                         }
                         checkUnusedTypeParameters(node, addDiagnostic);
                         break;
-                    case 164:
-                    case 169:
-                    case 170:
+                    case 167:
+                    case 173:
                     case 174:
-                    case 175:
-                    case 254:
-                    case 253:
+                    case 178:
+                    case 179:
+                    case 258:
+                    case 257:
                         checkUnusedTypeParameters(node, addDiagnostic);
                         break;
-                    case 185:
+                    case 189:
                         checkUnusedInferTypeParameter(node, addDiagnostic);
                         break;
                     default:
@@ -62383,11 +66727,11 @@ var ts;
             for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                 var member = _a[_i];
                 switch (member.kind) {
-                    case 165:
-                    case 163:
-                    case 167:
                     case 168:
-                        if (member.kind === 168 && member.symbol.flags & 32768) {
+                    case 166:
+                    case 171:
+                    case 172:
+                        if (member.kind === 172 && member.symbol.flags & 32768) {
                             break;
                         }
                         var symbol = getSymbolOfNode(member);
@@ -62397,7 +66741,7 @@ var ts;
                             addDiagnostic(member, 0, ts.createDiagnosticForNode(member.name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, symbolToString(symbol)));
                         }
                         break;
-                    case 166:
+                    case 170:
                         for (var _b = 0, _c = member.parameters; _b < _c.length; _b++) {
                             var parameter = _c[_b];
                             if (!parameter.symbol.isReferenced && ts.hasSyntacticModifier(parameter, 8)) {
@@ -62405,11 +66749,12 @@ var ts;
                             }
                         }
                         break;
-                    case 171:
-                    case 229:
+                    case 175:
+                    case 233:
+                    case 169:
                         break;
                     default:
-                        ts.Debug.fail();
+                        ts.Debug.fail("Unexpected class member");
                 }
             }
         }
@@ -62420,7 +66765,8 @@ var ts;
             }
         }
         function checkUnusedTypeParameters(node, addDiagnostic) {
-            if (ts.last(getSymbolOfNode(node).declarations) !== node)
+            var declarations = getSymbolOfNode(node).declarations;
+            if (!declarations || ts.last(declarations) !== node)
                 return;
             var typeParameters = ts.getEffectiveTypeParameterDeclarations(node);
             var seenParentsWithEveryUnused = new ts.Set();
@@ -62430,7 +66776,7 @@ var ts;
                     continue;
                 var name = ts.idText(typeParameter.name);
                 var parent = typeParameter.parent;
-                if (parent.kind !== 185 && parent.typeParameters.every(isTypeParameterUnused)) {
+                if (parent.kind !== 189 && parent.typeParameters.every(isTypeParameterUnused)) {
                     if (ts.tryAddToSet(seenParentsWithEveryUnused, parent)) {
                         var sourceFile = ts.getSourceFileOfNode(parent);
                         var range = ts.isJSDocTemplateTag(parent)
@@ -62481,38 +66827,40 @@ var ts;
                 if (local.flags & 262144 ? !(local.flags & 3 && !(local.isReferenced & 3)) : local.isReferenced || local.exportSymbol) {
                     return;
                 }
-                for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
-                    var declaration = _a[_i];
-                    if (isValidUnusedLocalDeclaration(declaration)) {
-                        continue;
-                    }
-                    if (isImportedDeclaration(declaration)) {
-                        addToGroup(unusedImports, importClauseFromImported(declaration), declaration, getNodeId);
-                    }
-                    else if (ts.isBindingElement(declaration) && ts.isObjectBindingPattern(declaration.parent)) {
-                        var lastElement = ts.last(declaration.parent.elements);
-                        if (declaration === lastElement || !ts.last(declaration.parent.elements).dotDotDotToken) {
-                            addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId);
+                if (local.declarations) {
+                    for (var _i = 0, _a = local.declarations; _i < _a.length; _i++) {
+                        var declaration = _a[_i];
+                        if (isValidUnusedLocalDeclaration(declaration)) {
+                            continue;
                         }
-                    }
-                    else if (ts.isVariableDeclaration(declaration)) {
-                        addToGroup(unusedVariables, declaration.parent, declaration, getNodeId);
-                    }
-                    else {
-                        var parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration);
-                        var name = local.valueDeclaration && ts.getNameOfDeclaration(local.valueDeclaration);
-                        if (parameter && name) {
-                            if (!ts.isParameterPropertyDeclaration(parameter, parameter.parent) && !ts.parameterIsThisKeyword(parameter) && !isIdentifierThatStartsWithUnderscore(name)) {
-                                if (ts.isBindingElement(declaration) && ts.isArrayBindingPattern(declaration.parent)) {
-                                    addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId);
-                                }
-                                else {
-                                    addDiagnostic(parameter, 1, ts.createDiagnosticForNode(name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, ts.symbolName(local)));
-                                }
+                        if (isImportedDeclaration(declaration)) {
+                            addToGroup(unusedImports, importClauseFromImported(declaration), declaration, getNodeId);
+                        }
+                        else if (ts.isBindingElement(declaration) && ts.isObjectBindingPattern(declaration.parent)) {
+                            var lastElement = ts.last(declaration.parent.elements);
+                            if (declaration === lastElement || !ts.last(declaration.parent.elements).dotDotDotToken) {
+                                addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId);
                             }
                         }
+                        else if (ts.isVariableDeclaration(declaration)) {
+                            addToGroup(unusedVariables, declaration.parent, declaration, getNodeId);
+                        }
                         else {
-                            errorUnusedLocal(declaration, ts.symbolName(local), addDiagnostic);
+                            var parameter = local.valueDeclaration && tryGetRootParameterDeclaration(local.valueDeclaration);
+                            var name = local.valueDeclaration && ts.getNameOfDeclaration(local.valueDeclaration);
+                            if (parameter && name) {
+                                if (!ts.isParameterPropertyDeclaration(parameter, parameter.parent) && !ts.parameterIsThisKeyword(parameter) && !isIdentifierThatStartsWithUnderscore(name)) {
+                                    if (ts.isBindingElement(declaration) && ts.isArrayBindingPattern(declaration.parent)) {
+                                        addToGroup(unusedDestructures, declaration.parent, declaration, getNodeId);
+                                    }
+                                    else {
+                                        addDiagnostic(parameter, 1, ts.createDiagnosticForNode(name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, ts.symbolName(local)));
+                                    }
+                                }
+                            }
+                            else {
+                                errorUnusedLocal(declaration, ts.symbolName(local), addDiagnostic);
+                            }
                         }
                     }
                 }
@@ -62522,7 +66870,7 @@ var ts;
                 var importDecl = importClause.parent;
                 var nDeclarations = (importClause.name ? 1 : 0) +
                     (importClause.namedBindings ?
-                        (importClause.namedBindings.kind === 263 ? 1 : importClause.namedBindings.elements.length)
+                        (importClause.namedBindings.kind === 267 ? 1 : importClause.namedBindings.elements.length)
                         : 0);
                 if (nDeclarations === unuseds.length) {
                     addDiagnostic(importDecl, 0, unuseds.length === 1
@@ -62540,7 +66888,7 @@ var ts;
                 var bindingPattern = _a[0], bindingElements = _a[1];
                 var kind = tryGetRootParameterDeclaration(bindingPattern.parent) ? 1 : 0;
                 if (bindingPattern.elements.length === bindingElements.length) {
-                    if (bindingElements.length === 1 && bindingPattern.parent.kind === 249 && bindingPattern.parent.parent.kind === 250) {
+                    if (bindingElements.length === 1 && bindingPattern.parent.kind === 253 && bindingPattern.parent.parent.kind === 254) {
                         addToGroup(unusedVariables, bindingPattern.parent.parent, bindingPattern.parent, getNodeId);
                     }
                     else {
@@ -62561,7 +66909,7 @@ var ts;
                 if (declarationList.declarations.length === declarations.length) {
                     addDiagnostic(declarationList, 0, declarations.length === 1
                         ? ts.createDiagnosticForNode(ts.first(declarations).name, ts.Diagnostics._0_is_declared_but_its_value_is_never_read, bindingNameText(ts.first(declarations).name))
-                        : ts.createDiagnosticForNode(declarationList.parent.kind === 232 ? declarationList.parent : declarationList, ts.Diagnostics.All_variables_are_unused));
+                        : ts.createDiagnosticForNode(declarationList.parent.kind === 236 ? declarationList.parent : declarationList, ts.Diagnostics.All_variables_are_unused));
                 }
                 else {
                     for (var _i = 0, declarations_5 = declarations; _i < declarations_5.length; _i++) {
@@ -62573,23 +66921,23 @@ var ts;
         }
         function bindingNameText(name) {
             switch (name.kind) {
-                case 78:
+                case 79:
                     return ts.idText(name);
-                case 197:
-                case 196:
+                case 201:
+                case 200:
                     return bindingNameText(ts.cast(ts.first(name.elements), ts.isBindingElement).name);
                 default:
                     return ts.Debug.assertNever(name);
             }
         }
         function isImportedDeclaration(node) {
-            return node.kind === 262 || node.kind === 265 || node.kind === 263;
+            return node.kind === 266 || node.kind === 269 || node.kind === 267;
         }
         function importClauseFromImported(decl) {
-            return decl.kind === 262 ? decl : decl.kind === 263 ? decl.parent : decl.parent.parent;
+            return decl.kind === 266 ? decl : decl.kind === 267 ? decl.parent : decl.parent.parent;
         }
         function checkBlock(node) {
-            if (node.kind === 230) {
+            if (node.kind === 234) {
                 checkGrammarStatementInAmbientContext(node);
             }
             if (ts.isFunctionOrModuleBlock(node)) {
@@ -62615,22 +66963,28 @@ var ts;
             });
         }
         function needCollisionCheckForIdentifier(node, identifier, name) {
-            if (!(identifier && identifier.escapedText === name)) {
+            if ((identifier === null || identifier === void 0 ? void 0 : identifier.escapedText) !== name) {
                 return false;
             }
-            if (node.kind === 163 ||
-                node.kind === 162 ||
+            if (node.kind === 166 ||
                 node.kind === 165 ||
-                node.kind === 164 ||
+                node.kind === 168 ||
                 node.kind === 167 ||
-                node.kind === 168) {
+                node.kind === 171 ||
+                node.kind === 172 ||
+                node.kind === 294) {
                 return false;
             }
             if (node.flags & 8388608) {
                 return false;
             }
+            if (ts.isImportClause(node) || ts.isImportEqualsDeclaration(node) || ts.isImportSpecifier(node)) {
+                if (ts.isTypeOnlyImportOrExportDeclaration(node)) {
+                    return false;
+                }
+            }
             var root = ts.getRootDeclaration(node);
-            if (root.kind === 160 && ts.nodeIsMissing(root.parent.body)) {
+            if (ts.isParameter(root) && ts.nodeIsMissing(root.parent.body)) {
                 return false;
             }
             return true;
@@ -62638,7 +66992,7 @@ var ts;
         function checkIfThisIsCapturedInEnclosingScope(node) {
             ts.findAncestor(node, function (current) {
                 if (getNodeCheckFlags(current) & 4) {
-                    var isDeclaration_1 = node.kind !== 78;
+                    var isDeclaration_1 = node.kind !== 79;
                     if (isDeclaration_1) {
                         error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference);
                     }
@@ -62653,7 +67007,7 @@ var ts;
         function checkIfNewTargetIsCapturedInEnclosingScope(node) {
             ts.findAncestor(node, function (current) {
                 if (getNodeCheckFlags(current) & 8) {
-                    var isDeclaration_2 = node.kind !== 78;
+                    var isDeclaration_2 = node.kind !== 79;
                     if (isDeclaration_2) {
                         error(ts.getNameOfDeclaration(node), ts.Diagnostics.Duplicate_identifier_newTarget_Compiler_uses_variable_declaration_newTarget_to_capture_new_target_meta_property_reference);
                     }
@@ -62665,44 +67019,101 @@ var ts;
                 return false;
             });
         }
-        function checkWeakMapCollision(node) {
-            var enclosingBlockScope = ts.getEnclosingBlockScopeContainer(node);
-            if (getNodeCheckFlags(enclosingBlockScope) & 67108864) {
-                errorSkippedOn("noEmit", node, ts.Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, "WeakMap");
-            }
-        }
         function checkCollisionWithRequireExportsInGeneratedCode(node, name) {
-            if (moduleKind >= ts.ModuleKind.ES2015) {
+            if (moduleKind >= ts.ModuleKind.ES2015 && !(moduleKind >= ts.ModuleKind.Node12 && ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
                 return;
             }
-            if (!needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
+            if (!name || !needCollisionCheckForIdentifier(node, name, "require") && !needCollisionCheckForIdentifier(node, name, "exports")) {
                 return;
             }
             if (ts.isModuleDeclaration(node) && ts.getModuleInstanceState(node) !== 1) {
                 return;
             }
             var parent = getDeclarationContainer(node);
-            if (parent.kind === 297 && ts.isExternalOrCommonJsModule(parent)) {
+            if (parent.kind === 303 && ts.isExternalOrCommonJsModule(parent)) {
                 errorSkippedOn("noEmit", name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module, ts.declarationNameToString(name), ts.declarationNameToString(name));
             }
         }
         function checkCollisionWithGlobalPromiseInGeneratedCode(node, name) {
-            if (languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) {
+            if (!name || languageVersion >= 4 || !needCollisionCheckForIdentifier(node, name, "Promise")) {
                 return;
             }
             if (ts.isModuleDeclaration(node) && ts.getModuleInstanceState(node) !== 1) {
                 return;
             }
             var parent = getDeclarationContainer(node);
-            if (parent.kind === 297 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048) {
+            if (parent.kind === 303 && ts.isExternalOrCommonJsModule(parent) && parent.flags & 2048) {
                 errorSkippedOn("noEmit", name, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions, ts.declarationNameToString(name), ts.declarationNameToString(name));
             }
         }
+        function recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name) {
+            if (languageVersion <= 8
+                && (needCollisionCheckForIdentifier(node, name, "WeakMap") || needCollisionCheckForIdentifier(node, name, "WeakSet"))) {
+                potentialWeakMapSetCollisions.push(node);
+            }
+        }
+        function checkWeakMapSetCollision(node) {
+            var enclosingBlockScope = ts.getEnclosingBlockScopeContainer(node);
+            if (getNodeCheckFlags(enclosingBlockScope) & 67108864) {
+                ts.Debug.assert(ts.isNamedDeclaration(node) && ts.isIdentifier(node.name) && typeof node.name.escapedText === "string", "The target of a WeakMap/WeakSet collision check should be an identifier");
+                errorSkippedOn("noEmit", node, ts.Diagnostics.Compiler_reserves_name_0_when_emitting_private_identifier_downlevel, node.name.escapedText);
+            }
+        }
+        function recordPotentialCollisionWithReflectInGeneratedCode(node, name) {
+            if (name && languageVersion >= 2 && languageVersion <= 8
+                && needCollisionCheckForIdentifier(node, name, "Reflect")) {
+                potentialReflectCollisions.push(node);
+            }
+        }
+        function checkReflectCollision(node) {
+            var hasCollision = false;
+            if (ts.isClassExpression(node)) {
+                for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+                    var member = _a[_i];
+                    if (getNodeCheckFlags(member) & 134217728) {
+                        hasCollision = true;
+                        break;
+                    }
+                }
+            }
+            else if (ts.isFunctionExpression(node)) {
+                if (getNodeCheckFlags(node) & 134217728) {
+                    hasCollision = true;
+                }
+            }
+            else {
+                var container = ts.getEnclosingBlockScopeContainer(node);
+                if (container && getNodeCheckFlags(container) & 134217728) {
+                    hasCollision = true;
+                }
+            }
+            if (hasCollision) {
+                ts.Debug.assert(ts.isNamedDeclaration(node) && ts.isIdentifier(node.name), "The target of a Reflect collision check should be an identifier");
+                errorSkippedOn("noEmit", node, ts.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_when_emitting_super_references_in_static_initializers, ts.declarationNameToString(node.name), "Reflect");
+            }
+        }
+        function checkCollisionsForDeclarationName(node, name) {
+            if (!name)
+                return;
+            checkCollisionWithRequireExportsInGeneratedCode(node, name);
+            checkCollisionWithGlobalPromiseInGeneratedCode(node, name);
+            recordPotentialCollisionWithWeakMapSetInGeneratedCode(node, name);
+            recordPotentialCollisionWithReflectInGeneratedCode(node, name);
+            if (ts.isClassLike(node)) {
+                checkTypeNameIsReserved(name, ts.Diagnostics.Class_name_cannot_be_0);
+                if (!(node.flags & 8388608)) {
+                    checkClassNameCollisionWithObject(name);
+                }
+            }
+            else if (ts.isEnumDeclaration(node)) {
+                checkTypeNameIsReserved(name, ts.Diagnostics.Enum_name_cannot_be_0);
+            }
+        }
         function checkVarDeclaredNamesNotShadowed(node) {
             if ((ts.getCombinedNodeFlags(node) & 3) !== 0 || ts.isParameterDeclaration(node)) {
                 return;
             }
-            if (node.kind === 249 && !node.initializer) {
+            if (node.kind === 253 && !node.initializer) {
                 return;
             }
             var symbol = getSymbolOfNode(node);
@@ -62714,15 +67125,15 @@ var ts;
                     localDeclarationSymbol !== symbol &&
                     localDeclarationSymbol.flags & 2) {
                     if (getDeclarationNodeFlagsFromSymbol(localDeclarationSymbol) & 3) {
-                        var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 250);
-                        var container = varDeclList.parent.kind === 232 && varDeclList.parent.parent
+                        var varDeclList = ts.getAncestor(localDeclarationSymbol.valueDeclaration, 254);
+                        var container = varDeclList.parent.kind === 236 && varDeclList.parent.parent
                             ? varDeclList.parent.parent
                             : undefined;
                         var namesShareScope = container &&
-                            (container.kind === 230 && ts.isFunctionLike(container.parent) ||
-                                container.kind === 257 ||
-                                container.kind === 256 ||
-                                container.kind === 297);
+                            (container.kind === 234 && ts.isFunctionLike(container.parent) ||
+                                container.kind === 261 ||
+                                container.kind === 260 ||
+                                container.kind === 303);
                         if (!namesShareScope) {
                             var name = symbolToString(localDeclarationSymbol);
                             error(node, ts.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1, name, name);
@@ -62743,17 +67154,17 @@ var ts;
             if (!node.name) {
                 return;
             }
-            if (node.name.kind === 158) {
+            if (node.name.kind === 161) {
                 checkComputedPropertyName(node.name);
                 if (node.initializer) {
                     checkExpressionCached(node.initializer);
                 }
             }
-            if (node.kind === 198) {
-                if (node.parent.kind === 196 && languageVersion < 99) {
+            if (ts.isBindingElement(node)) {
+                if (ts.isObjectBindingPattern(node.parent) && node.dotDotDotToken && languageVersion < 5) {
                     checkExternalEmitHelpers(node, 4);
                 }
-                if (node.propertyName && node.propertyName.kind === 158) {
+                if (node.propertyName && node.propertyName.kind === 161) {
                     checkComputedPropertyName(node.propertyName);
                 }
                 var parent = node.parent.parent;
@@ -62766,13 +67177,13 @@ var ts;
                         var property = getPropertyOfType(parentType, nameText);
                         if (property) {
                             markPropertyAsReferenced(property, undefined, false);
-                            checkPropertyAccessibility(parent, !!parent.initializer && parent.initializer.kind === 105, parentType, property);
+                            checkPropertyAccessibility(node, !!parent.initializer && parent.initializer.kind === 106, false, parentType, property);
                         }
                     }
                 }
             }
             if (ts.isBindingPattern(node.name)) {
-                if (node.name.kind === 197 && languageVersion < 2 && compilerOptions.downlevelIteration) {
+                if (node.name.kind === 201 && languageVersion < 2 && compilerOptions.downlevelIteration) {
                     checkExternalEmitHelpers(node, 512);
                 }
                 ts.forEach(node.name.elements, checkSourceElement);
@@ -62782,7 +67193,7 @@ var ts;
                 return;
             }
             if (ts.isBindingPattern(node.name)) {
-                var needCheckInitializer = node.initializer && node.parent.parent.kind !== 238;
+                var needCheckInitializer = node.initializer && node.parent.parent.kind !== 242;
                 var needCheckWidenedType = node.name.elements.length === 0;
                 if (needCheckInitializer || needCheckWidenedType) {
                     var widenedType = getWidenedTypeForVariableLikeDeclaration(node);
@@ -62807,7 +67218,7 @@ var ts;
                 return;
             }
             var symbol = getSymbolOfNode(node);
-            if (symbol.flags & 2097152 && ts.isRequireVariableDeclaration(node, true)) {
+            if (symbol.flags & 2097152 && ts.isRequireVariableDeclaration(node)) {
                 checkAliasSymbol(node);
                 return;
             }
@@ -62819,11 +67230,11 @@ var ts;
                         ts.isObjectLiteralExpression(initializer) &&
                         (initializer.properties.length === 0 || ts.isPrototypeAccess(node.name)) &&
                         !!((_a = symbol.exports) === null || _a === void 0 ? void 0 : _a.size);
-                    if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 238) {
+                    if (!isJSObjectLiteralInitializer && node.parent.parent.kind !== 242) {
                         checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(initializer), type, node, initializer, undefined);
                     }
                 }
-                if (symbol.declarations.length > 1) {
+                if (symbol.declarations && symbol.declarations.length > 1) {
                     if (ts.some(symbol.declarations, function (d) { return d !== node && ts.isVariableLike(d) && !areDeclarationFlagsIdentical(d, node); })) {
                         error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
                     }
@@ -62831,7 +67242,7 @@ var ts;
             }
             else {
                 var declarationType = convertAutoToAny(getWidenedTypeForVariableLikeDeclaration(node));
-                if (type !== errorType && declarationType !== errorType &&
+                if (!isErrorType(type) && !isErrorType(declarationType) &&
                     !isTypeIdenticalTo(type, declarationType) &&
                     !(symbol.flags & 67108864)) {
                     errorNextVariableOrPropertyDeclarationMustHaveSameType(symbol.valueDeclaration, type, node, declarationType);
@@ -62839,25 +67250,21 @@ var ts;
                 if (node.initializer) {
                     checkTypeAssignableToAndOptionallyElaborate(checkExpressionCached(node.initializer), declarationType, node, node.initializer, undefined);
                 }
-                if (!areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
+                if (symbol.valueDeclaration && !areDeclarationFlagsIdentical(node, symbol.valueDeclaration)) {
                     error(node.name, ts.Diagnostics.All_declarations_of_0_must_have_identical_modifiers, ts.declarationNameToString(node.name));
                 }
             }
-            if (node.kind !== 163 && node.kind !== 162) {
+            if (node.kind !== 166 && node.kind !== 165) {
                 checkExportsOnMergedDeclarations(node);
-                if (node.kind === 249 || node.kind === 198) {
+                if (node.kind === 253 || node.kind === 202) {
                     checkVarDeclaredNamesNotShadowed(node);
                 }
-                checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
-                checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
-                if (languageVersion < 99 && needCollisionCheckForIdentifier(node, node.name, "WeakMap")) {
-                    potentialWeakMapCollisions.push(node);
-                }
+                checkCollisionsForDeclarationName(node, node.name);
             }
         }
         function errorNextVariableOrPropertyDeclarationMustHaveSameType(firstDeclaration, firstType, nextDeclaration, nextType) {
             var nextDeclarationName = ts.getNameOfDeclaration(nextDeclaration);
-            var message = nextDeclaration.kind === 163 || nextDeclaration.kind === 162
+            var message = nextDeclaration.kind === 166 || nextDeclaration.kind === 165
                 ? ts.Diagnostics.Subsequent_property_declarations_must_have_the_same_type_Property_0_must_be_of_type_1_but_here_has_type_2
                 : ts.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2;
             var declName = ts.declarationNameToString(nextDeclarationName);
@@ -62867,8 +67274,8 @@ var ts;
             }
         }
         function areDeclarationFlagsIdentical(left, right) {
-            if ((left.kind === 160 && right.kind === 249) ||
-                (left.kind === 249 && right.kind === 160)) {
+            if ((left.kind === 163 && right.kind === 253) ||
+                (left.kind === 253 && right.kind === 163)) {
                 return true;
             }
             if (ts.hasQuestionToken(left) !== ts.hasQuestionToken(right)) {
@@ -62904,46 +67311,47 @@ var ts;
         function checkIfStatement(node) {
             checkGrammarStatementInAmbientContext(node);
             var type = checkTruthinessExpression(node.expression);
-            checkTestingKnownTruthyCallableType(node.expression, type, node.thenStatement);
+            checkTestingKnownTruthyCallableOrAwaitableType(node.expression, type, node.thenStatement);
             checkSourceElement(node.thenStatement);
-            if (node.thenStatement.kind === 231) {
+            if (node.thenStatement.kind === 235) {
                 error(node.thenStatement, ts.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement);
             }
             checkSourceElement(node.elseStatement);
         }
-        function checkTestingKnownTruthyCallableType(condExpr, type, body) {
-            if (!strictNullChecks) {
+        function checkTestingKnownTruthyCallableOrAwaitableType(condExpr, type, body) {
+            if (!strictNullChecks)
+                return;
+            if (getFalsyFlags(type))
                 return;
-            }
             var location = ts.isBinaryExpression(condExpr) ? condExpr.right : condExpr;
+            if (ts.isPropertyAccessExpression(location) && isTypeAssertion(location.expression)) {
+                return;
+            }
             var testedNode = ts.isIdentifier(location) ? location
                 : ts.isPropertyAccessExpression(location) ? location.name
                     : ts.isBinaryExpression(location) && ts.isIdentifier(location.right) ? location.right
                         : undefined;
-            var isPropertyExpressionCast = ts.isPropertyAccessExpression(location)
-                && ts.isAssertionExpression(ts.skipParentheses(location.expression));
-            if (!testedNode || isPropertyExpressionCast) {
-                return;
-            }
-            var possiblyFalsy = getFalsyFlags(type);
-            if (possiblyFalsy) {
-                return;
-            }
             var callSignatures = getSignaturesOfType(type, 0);
-            if (callSignatures.length === 0) {
+            var isPromise = !!getAwaitedTypeOfPromise(type);
+            if (callSignatures.length === 0 && !isPromise) {
                 return;
             }
-            var testedSymbol = getSymbolAtLocation(testedNode);
-            if (!testedSymbol) {
+            var testedSymbol = testedNode && getSymbolAtLocation(testedNode);
+            if (!testedSymbol && !isPromise) {
                 return;
             }
-            var isUsed = ts.isBinaryExpression(condExpr.parent) && isFunctionUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
-                || body && isFunctionUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
+            var isUsed = testedSymbol && ts.isBinaryExpression(condExpr.parent) && isSymbolUsedInBinaryExpressionChain(condExpr.parent, testedSymbol)
+                || testedSymbol && body && isSymbolUsedInConditionBody(condExpr, body, testedNode, testedSymbol);
             if (!isUsed) {
-                error(location, ts.Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead);
+                if (isPromise) {
+                    errorAndMaybeSuggestAwait(location, true, ts.Diagnostics.This_condition_will_always_return_true_since_this_0_is_always_defined, getTypeNameForErrorDisplay(type));
+                }
+                else {
+                    error(location, ts.Diagnostics.This_condition_will_always_return_true_since_this_function_is_always_defined_Did_you_mean_to_call_it_instead);
+                }
             }
         }
-        function isFunctionUsedInConditionBody(expr, body, testedNode, testedSymbol) {
+        function isSymbolUsedInConditionBody(expr, body, testedNode, testedSymbol) {
             return !!ts.forEachChild(body, function check(childNode) {
                 if (ts.isIdentifier(childNode)) {
                     var childSymbol = getSymbolAtLocation(childNode);
@@ -62955,7 +67363,7 @@ var ts;
                         var childExpression = childNode.parent;
                         while (testedExpression && childExpression) {
                             if (ts.isIdentifier(testedExpression) && ts.isIdentifier(childExpression) ||
-                                testedExpression.kind === 107 && childExpression.kind === 107) {
+                                testedExpression.kind === 108 && childExpression.kind === 108) {
                                 return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression);
                             }
                             else if (ts.isPropertyAccessExpression(testedExpression) && ts.isPropertyAccessExpression(childExpression)) {
@@ -62978,7 +67386,7 @@ var ts;
                 return ts.forEachChild(childNode, check);
             });
         }
-        function isFunctionUsedInBinaryExpressionChain(node, testedSymbol) {
+        function isSymbolUsedInBinaryExpressionChain(node, testedSymbol) {
             while (ts.isBinaryExpression(node) && node.operatorToken.kind === 55) {
                 var isUsed = ts.forEachChild(node.right, function visit(child) {
                     if (ts.isIdentifier(child)) {
@@ -63017,12 +67425,12 @@ var ts;
         }
         function checkForStatement(node) {
             if (!checkGrammarStatementInAmbientContext(node)) {
-                if (node.initializer && node.initializer.kind === 250) {
+                if (node.initializer && node.initializer.kind === 254) {
                     checkGrammarVariableDeclarationList(node.initializer);
                 }
             }
             if (node.initializer) {
-                if (node.initializer.kind === 250) {
+                if (node.initializer.kind === 254) {
                     ts.forEach(node.initializer.declarations, checkVariableDeclaration);
                 }
                 else {
@@ -63040,22 +67448,28 @@ var ts;
         }
         function checkForOfStatement(node) {
             checkGrammarForInOrForOfStatement(node);
+            var container = ts.getContainingFunctionOrClassStaticBlock(node);
             if (node.awaitModifier) {
-                var functionFlags = ts.getFunctionFlags(ts.getContainingFunction(node));
-                if ((functionFlags & (4 | 2)) === 2 && languageVersion < 99) {
-                    checkExternalEmitHelpers(node, 16384);
+                if (container && ts.isClassStaticBlockDeclaration(container)) {
+                    grammarErrorOnNode(node.awaitModifier, ts.Diagnostics.For_await_loops_cannot_be_used_inside_a_class_static_block);
+                }
+                else {
+                    var functionFlags = ts.getFunctionFlags(container);
+                    if ((functionFlags & (4 | 2)) === 2 && languageVersion < 99) {
+                        checkExternalEmitHelpers(node, 16384);
+                    }
                 }
             }
             else if (compilerOptions.downlevelIteration && languageVersion < 2) {
                 checkExternalEmitHelpers(node, 256);
             }
-            if (node.initializer.kind === 250) {
+            if (node.initializer.kind === 254) {
                 checkForInOrForOfVariableDeclaration(node);
             }
             else {
                 var varExpr = node.initializer;
                 var iteratedType = checkRightHandSideOfForOf(node);
-                if (varExpr.kind === 199 || varExpr.kind === 200) {
+                if (varExpr.kind === 203 || varExpr.kind === 204) {
                     checkDestructuringAssignment(varExpr, iteratedType || errorType);
                 }
                 else {
@@ -63074,7 +67488,7 @@ var ts;
         function checkForInStatement(node) {
             checkGrammarForInOrForOfStatement(node);
             var rightType = getNonNullableTypeIfNeeded(checkExpression(node.expression));
-            if (node.initializer.kind === 250) {
+            if (node.initializer.kind === 254) {
                 var variable = node.initializer.declarations[0];
                 if (variable && ts.isBindingPattern(variable.name)) {
                     error(variable.name, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
@@ -63084,7 +67498,7 @@ var ts;
             else {
                 var varExpr = node.initializer;
                 var leftType = checkExpression(varExpr);
-                if (varExpr.kind === 199 || varExpr.kind === 200) {
+                if (varExpr.kind === 203 || varExpr.kind === 204) {
                     error(varExpr, ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern);
                 }
                 else if (!isTypeAssignableTo(getIndexTypeOrString(rightType), leftType)) {
@@ -63175,23 +67589,13 @@ var ts;
             }
             if (!isArrayLikeType(arrayType)) {
                 if (errorNode && !reportedError) {
-                    var yieldType = getIterationTypeOfIterable(use, 0, inputType, undefined);
-                    var _a = !(use & 4) || hasStringConstituent
-                        ? downlevelIteration
-                            ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true]
-                            : yieldType
-                                ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false]
-                                : [ts.Diagnostics.Type_0_is_not_an_array_type, true]
-                        : downlevelIteration
-                            ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true]
-                            : yieldType
-                                ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false]
-                                : [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true], defaultDiagnostic = _a[0], maybeMissingAwait = _a[1];
+                    var allowsStrings = !!(use & 4) && !hasStringConstituent;
+                    var _a = getIterationDiagnosticDetails(allowsStrings, downlevelIteration), defaultDiagnostic = _a[0], maybeMissingAwait = _a[1];
                     errorAndMaybeSuggestAwait(errorNode, maybeMissingAwait && !!getAwaitedTypeOfPromise(arrayType), defaultDiagnostic, typeToString(arrayType));
                 }
                 return hasStringConstituent ? possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType : undefined;
             }
-            var arrayElementType = getIndexTypeOfType(arrayType, 1);
+            var arrayElementType = getIndexTypeOfType(arrayType, numberType);
             if (hasStringConstituent && arrayElementType) {
                 if (arrayElementType.flags & 402653316 && !compilerOptions.noUncheckedIndexedAccess) {
                     return stringType;
@@ -63199,6 +67603,40 @@ var ts;
                 return getUnionType(possibleOutOfBounds ? [arrayElementType, stringType, undefinedType] : [arrayElementType, stringType], 2);
             }
             return (use & 128) ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType;
+            function getIterationDiagnosticDetails(allowsStrings, downlevelIteration) {
+                var _a;
+                if (downlevelIteration) {
+                    return allowsStrings
+                        ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true]
+                        : [ts.Diagnostics.Type_0_is_not_an_array_type_or_does_not_have_a_Symbol_iterator_method_that_returns_an_iterator, true];
+                }
+                var yieldType = getIterationTypeOfIterable(use, 0, inputType, undefined);
+                if (yieldType) {
+                    return [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type_Use_compiler_option_downlevelIteration_to_allow_iterating_of_iterators, false];
+                }
+                if (isES2015OrLaterIterable((_a = inputType.symbol) === null || _a === void 0 ? void 0 : _a.escapedName)) {
+                    return [ts.Diagnostics.Type_0_can_only_be_iterated_through_when_using_the_downlevelIteration_flag_or_with_a_target_of_es2015_or_higher, true];
+                }
+                return allowsStrings
+                    ? [ts.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type, true]
+                    : [ts.Diagnostics.Type_0_is_not_an_array_type, true];
+            }
+        }
+        function isES2015OrLaterIterable(n) {
+            switch (n) {
+                case "Float32Array":
+                case "Float64Array":
+                case "Int16Array":
+                case "Int32Array":
+                case "Int8Array":
+                case "NodeList":
+                case "Uint16Array":
+                case "Uint32Array":
+                case "Uint8Array":
+                case "Uint8ClampedArray":
+                    return true;
+            }
+            return false;
         }
         function getIterationTypeOfIterable(use, typeKind, inputType, errorNode) {
             if (isTypeAny(inputType)) {
@@ -63228,8 +67666,8 @@ var ts;
             var yieldTypes;
             var returnTypes;
             var nextTypes;
-            for (var _i = 0, array_10 = array; _i < array_10.length; _i++) {
-                var iterationTypes = array_10[_i];
+            for (var _i = 0, array_11 = array; _i < array_11.length; _i++) {
+                var iterationTypes = array_11[_i];
                 if (iterationTypes === undefined || iterationTypes === noIterationTypes) {
                     continue;
                 }
@@ -63294,6 +67732,9 @@ var ts;
             if (iterationTypes === anyIterationTypes)
                 return anyIterationTypes;
             var yieldType = iterationTypes.yieldType, returnType = iterationTypes.returnType, nextType = iterationTypes.nextType;
+            if (errorNode) {
+                getGlobalAwaitedSymbol(true);
+            }
             return createIterationTypes(getAwaitedType(yieldType, errorNode) || anyType, getAwaitedType(returnType, errorNode) || anyType, nextType);
         }
         function getIterationTypesOfIterableWorker(type, use, errorNode) {
@@ -63304,7 +67745,9 @@ var ts;
                 var iterationTypes = getIterationTypesOfIterableCached(type, asyncIterationTypesResolver) ||
                     getIterationTypesOfIterableFast(type, asyncIterationTypesResolver);
                 if (iterationTypes) {
-                    return iterationTypes;
+                    return use & 8 ?
+                        getAsyncFromSyncIterationTypes(iterationTypes, errorNode) :
+                        iterationTypes;
                 }
             }
             if (use & 1) {
@@ -63356,16 +67799,21 @@ var ts;
                 isReferenceToType(type, globalType = resolver.getGlobalIterableIteratorType(false))) {
                 var yieldType = getTypeArguments(type)[0];
                 var _a = getIterationTypesOfGlobalIterableType(globalType, resolver), returnType = _a.returnType, nextType = _a.nextType;
-                return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType));
+                return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType(yieldType, undefined) || yieldType, resolver.resolveIterationType(returnType, undefined) || returnType, nextType));
             }
             if (isReferenceToType(type, resolver.getGlobalGeneratorType(false))) {
                 var _b = getTypeArguments(type), yieldType = _b[0], returnType = _b[1], nextType = _b[2];
-                return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(yieldType, returnType, nextType));
+                return setCachedIterationTypes(type, resolver.iterableCacheKey, createIterationTypes(resolver.resolveIterationType(yieldType, undefined) || yieldType, resolver.resolveIterationType(returnType, undefined) || returnType, nextType));
             }
         }
+        function getPropertyNameForKnownSymbolName(symbolName) {
+            var ctorType = getGlobalESSymbolConstructorSymbol(false);
+            var uniqueType = ctorType && getTypeOfPropertyOfType(getTypeOfSymbol(ctorType), ts.escapeLeadingUnderscores(symbolName));
+            return uniqueType && isTypeUsableAsPropertyName(uniqueType) ? getPropertyNameFromType(uniqueType) : "__@".concat(symbolName);
+        }
         function getIterationTypesOfIterableSlow(type, resolver, errorNode) {
             var _a;
-            var method = getPropertyOfType(type, ts.getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName));
+            var method = getPropertyOfType(type, getPropertyNameForKnownSymbolName(resolver.iteratorSymbolName));
             var methodType = method && !(method.flags & 16777216) ? getTypeOfSymbol(method) : undefined;
             if (isTypeAny(methodType)) {
                 return setCachedIterationTypes(type, resolver.iterableCacheKey, anyIterationTypes);
@@ -63546,11 +67994,10 @@ var ts;
                 checkGrammarBreakOrContinueStatement(node);
         }
         function unwrapReturnType(returnType, functionFlags) {
-            var _a, _b;
             var isGenerator = !!(functionFlags & 1);
             var isAsync = !!(functionFlags & 2);
-            return isGenerator ? (_a = getIterationTypeOfGeneratorFunctionReturnType(1, returnType, isAsync)) !== null && _a !== void 0 ? _a : errorType :
-                isAsync ? (_b = getAwaitedType(returnType)) !== null && _b !== void 0 ? _b : errorType :
+            return isGenerator ? getIterationTypeOfGeneratorFunctionReturnType(1, returnType, isAsync) || errorType :
+                isAsync ? getAwaitedTypeNoAlias(returnType) || errorType :
                     returnType;
         }
         function isUnwrappedReturnTypeVoidOrAny(func, returnType) {
@@ -63562,37 +68009,41 @@ var ts;
             if (checkGrammarStatementInAmbientContext(node)) {
                 return;
             }
-            var func = ts.getContainingFunction(node);
-            if (!func) {
+            var container = ts.getContainingFunctionOrClassStaticBlock(node);
+            if (container && ts.isClassStaticBlockDeclaration(container)) {
+                grammarErrorOnFirstToken(node, ts.Diagnostics.A_return_statement_cannot_be_used_inside_a_class_static_block);
+                return;
+            }
+            if (!container) {
                 grammarErrorOnFirstToken(node, ts.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body);
                 return;
             }
-            var signature = getSignatureFromDeclaration(func);
+            var signature = getSignatureFromDeclaration(container);
             var returnType = getReturnTypeOfSignature(signature);
-            var functionFlags = ts.getFunctionFlags(func);
+            var functionFlags = ts.getFunctionFlags(container);
             if (strictNullChecks || node.expression || returnType.flags & 131072) {
                 var exprType = node.expression ? checkExpressionCached(node.expression) : undefinedType;
-                if (func.kind === 168) {
+                if (container.kind === 172) {
                     if (node.expression) {
                         error(node, ts.Diagnostics.Setters_cannot_return_a_value);
                     }
                 }
-                else if (func.kind === 166) {
+                else if (container.kind === 170) {
                     if (node.expression && !checkTypeAssignableToAndOptionallyElaborate(exprType, returnType, node, node.expression)) {
                         error(node, ts.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);
                     }
                 }
-                else if (getReturnTypeFromAnnotation(func)) {
+                else if (getReturnTypeFromAnnotation(container)) {
                     var unwrappedReturnType = (_a = unwrapReturnType(returnType, functionFlags)) !== null && _a !== void 0 ? _a : returnType;
                     var unwrappedExprType = functionFlags & 2
-                        ? checkAwaitedType(exprType, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
+                        ? checkAwaitedType(exprType, false, node, ts.Diagnostics.The_return_type_of_an_async_function_must_either_be_a_valid_promise_or_must_not_contain_a_callable_then_member)
                         : exprType;
                     if (unwrappedReturnType) {
                         checkTypeAssignableToAndOptionallyElaborate(unwrappedExprType, unwrappedReturnType, node, node.expression);
                     }
                 }
             }
-            else if (func.kind !== 166 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(func, returnType)) {
+            else if (container.kind !== 170 && compilerOptions.noImplicitReturns && !isUnwrappedReturnTypeVoidOrAny(container, returnType)) {
                 error(node, ts.Diagnostics.Not_all_code_paths_return_a_value);
             }
         }
@@ -63617,7 +68068,7 @@ var ts;
             var expressionType = checkExpression(node.expression);
             var expressionIsLiteral = isLiteralType(expressionType);
             ts.forEach(node.caseBlock.clauses, function (clause) {
-                if (clause.kind === 285 && !hasDuplicateDefaultClause) {
+                if (clause.kind === 289 && !hasDuplicateDefaultClause) {
                     if (firstDefaultClause === undefined) {
                         firstDefaultClause = clause;
                     }
@@ -63626,7 +68077,7 @@ var ts;
                         hasDuplicateDefaultClause = true;
                     }
                 }
-                if (produceDiagnostics && clause.kind === 284) {
+                if (produceDiagnostics && clause.kind === 288) {
                     var caseType = checkExpression(clause.expression);
                     var caseIsLiteral = isLiteralType(caseType);
                     var comparedExpressionType = expressionType;
@@ -63653,7 +68104,7 @@ var ts;
                     if (ts.isFunctionLike(current)) {
                         return "quit";
                     }
-                    if (current.kind === 245 && current.label.escapedText === node.label.escapedText) {
+                    if (current.kind === 249 && current.label.escapedText === node.label.escapedText) {
                         grammarErrorOnNode(node.label, ts.Diagnostics.Duplicate_label_0, ts.getTextOfNode(node.label));
                         return true;
                     }
@@ -63679,10 +68130,11 @@ var ts;
             if (catchClause) {
                 if (catchClause.variableDeclaration) {
                     var declaration = catchClause.variableDeclaration;
-                    if (declaration.type) {
+                    var typeNode = ts.getEffectiveTypeAnnotationNode(ts.getRootDeclaration(declaration));
+                    if (typeNode) {
                         var type = getTypeForVariableLikeDeclaration(declaration, false);
                         if (type && !(type.flags & 3)) {
-                            grammarErrorOnFirstToken(declaration.type, ts.Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
+                            grammarErrorOnFirstToken(typeNode, ts.Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified);
                         }
                     }
                     else if (declaration.initializer) {
@@ -63693,7 +68145,7 @@ var ts;
                         if (blockLocals_1) {
                             ts.forEachKey(catchClause.locals, function (caughtName) {
                                 var blockLocal = blockLocals_1.get(caughtName);
-                                if (blockLocal && (blockLocal.flags & 2) !== 0) {
+                                if ((blockLocal === null || blockLocal === void 0 ? void 0 : blockLocal.valueDeclaration) && (blockLocal.flags & 2) !== 0) {
                                     grammarErrorOnNode(blockLocal.valueDeclaration, ts.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause, caughtName);
                                 }
                             });
@@ -63706,79 +68158,82 @@ var ts;
                 checkBlock(node.finallyBlock);
             }
         }
-        function checkIndexConstraints(type) {
-            var declaredNumberIndexer = getIndexDeclarationOfSymbol(type.symbol, 1);
-            var declaredStringIndexer = getIndexDeclarationOfSymbol(type.symbol, 0);
-            var stringIndexType = getIndexTypeOfType(type, 0);
-            var numberIndexType = getIndexTypeOfType(type, 1);
-            if (stringIndexType || numberIndexType) {
-                ts.forEach(getPropertiesOfObjectType(type), function (prop) {
-                    var propType = getTypeOfSymbol(prop);
-                    checkIndexConstraintForProperty(prop, propType, type, declaredStringIndexer, stringIndexType, 0);
-                    checkIndexConstraintForProperty(prop, propType, type, declaredNumberIndexer, numberIndexType, 1);
-                });
-                var classDeclaration = type.symbol.valueDeclaration;
-                if (ts.getObjectFlags(type) & 1 && ts.isClassLike(classDeclaration)) {
-                    for (var _i = 0, _a = classDeclaration.members; _i < _a.length; _i++) {
-                        var member = _a[_i];
-                        if (!ts.hasSyntacticModifier(member, 32) && !hasBindableName(member)) {
-                            var symbol = getSymbolOfNode(member);
-                            var propType = getTypeOfSymbol(symbol);
-                            checkIndexConstraintForProperty(symbol, propType, type, declaredStringIndexer, stringIndexType, 0);
-                            checkIndexConstraintForProperty(symbol, propType, type, declaredNumberIndexer, numberIndexType, 1);
-                        }
+        function checkIndexConstraints(type, symbol, isStaticIndex) {
+            var indexInfos = getIndexInfosOfType(type);
+            if (indexInfos.length === 0) {
+                return;
+            }
+            for (var _i = 0, _a = getPropertiesOfObjectType(type); _i < _a.length; _i++) {
+                var prop = _a[_i];
+                if (!(isStaticIndex && prop.flags & 4194304)) {
+                    checkIndexConstraintForProperty(type, prop, getLiteralTypeFromProperty(prop, 8576, true), getNonMissingTypeOfSymbol(prop));
+                }
+            }
+            var typeDeclaration = symbol.valueDeclaration;
+            if (typeDeclaration && ts.isClassLike(typeDeclaration)) {
+                for (var _b = 0, _c = typeDeclaration.members; _b < _c.length; _b++) {
+                    var member = _c[_b];
+                    if (!ts.isStatic(member) && !hasBindableName(member)) {
+                        var symbol_3 = getSymbolOfNode(member);
+                        checkIndexConstraintForProperty(type, symbol_3, getTypeOfExpression(member.name.expression), getNonMissingTypeOfSymbol(symbol_3));
                     }
                 }
             }
-            var errorNode;
-            if (stringIndexType && numberIndexType) {
-                errorNode = declaredNumberIndexer || declaredStringIndexer;
-                if (!errorNode && (ts.getObjectFlags(type) & 2)) {
-                    var someBaseTypeHasBothIndexers = ts.forEach(getBaseTypes(type), function (base) { return getIndexTypeOfType(base, 0) && getIndexTypeOfType(base, 1); });
-                    errorNode = someBaseTypeHasBothIndexers ? undefined : type.symbol.declarations[0];
+            if (indexInfos.length > 1) {
+                for (var _d = 0, indexInfos_6 = indexInfos; _d < indexInfos_6.length; _d++) {
+                    var info = indexInfos_6[_d];
+                    checkIndexConstraintForIndexSignature(type, info);
                 }
             }
-            if (errorNode && !isTypeAssignableTo(numberIndexType, stringIndexType)) {
-                error(errorNode, ts.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1, typeToString(numberIndexType), typeToString(stringIndexType));
+        }
+        function checkIndexConstraintForProperty(type, prop, propNameType, propType) {
+            var declaration = prop.valueDeclaration;
+            var name = ts.getNameOfDeclaration(declaration);
+            if (name && ts.isPrivateIdentifier(name)) {
+                return;
             }
-            function checkIndexConstraintForProperty(prop, propertyType, containingType, indexDeclaration, indexType, indexKind) {
-                if (!indexType || ts.isKnownSymbol(prop)) {
-                    return;
-                }
-                var propDeclaration = prop.valueDeclaration;
-                var name = propDeclaration && ts.getNameOfDeclaration(propDeclaration);
-                if (name && ts.isPrivateIdentifier(name)) {
-                    return;
-                }
-                if (indexKind === 1 && !(name ? isNumericName(name) : isNumericLiteralName(prop.escapedName))) {
-                    return;
+            var indexInfos = getApplicableIndexInfos(type, propNameType);
+            var interfaceDeclaration = ts.getObjectFlags(type) & 2 ? ts.getDeclarationOfKind(type.symbol, 257) : undefined;
+            var localPropDeclaration = declaration && declaration.kind === 220 ||
+                name && name.kind === 161 || getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
+            var _loop_27 = function (info) {
+                var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
+                var errorNode = localPropDeclaration || localIndexDeclaration ||
+                    (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
+                if (errorNode && !isTypeAssignableTo(propType, info.type)) {
+                    error(errorNode, ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_2_index_type_3, symbolToString(prop), typeToString(propType), typeToString(info.keyType), typeToString(info.type));
                 }
-                var errorNode;
-                if (propDeclaration && name &&
-                    (propDeclaration.kind === 216 ||
-                        name.kind === 158 ||
-                        prop.parent === containingType.symbol)) {
-                    errorNode = propDeclaration;
-                }
-                else if (indexDeclaration) {
-                    errorNode = indexDeclaration;
-                }
-                else if (ts.getObjectFlags(containingType) & 2) {
-                    var someBaseClassHasBothPropertyAndIndexer = ts.forEach(getBaseTypes(containingType), function (base) { return getPropertyOfObjectType(base, prop.escapedName) && getIndexTypeOfType(base, indexKind); });
-                    errorNode = someBaseClassHasBothPropertyAndIndexer ? undefined : containingType.symbol.declarations[0];
-                }
-                if (errorNode && !isTypeAssignableTo(propertyType, indexType)) {
-                    var errorMessage = indexKind === 0
-                        ? ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2
-                        : ts.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2;
-                    error(errorNode, errorMessage, symbolToString(prop), typeToString(propertyType), typeToString(indexType));
+            };
+            for (var _i = 0, indexInfos_7 = indexInfos; _i < indexInfos_7.length; _i++) {
+                var info = indexInfos_7[_i];
+                _loop_27(info);
+            }
+        }
+        function checkIndexConstraintForIndexSignature(type, checkInfo) {
+            var declaration = checkInfo.declaration;
+            var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
+            var interfaceDeclaration = ts.getObjectFlags(type) & 2 ? ts.getDeclarationOfKind(type.symbol, 257) : undefined;
+            var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
+            var _loop_28 = function (info) {
+                if (info === checkInfo)
+                    return "continue";
+                var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
+                var errorNode = localCheckDeclaration || localIndexDeclaration ||
+                    (interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getIndexInfoOfType(base, checkInfo.keyType) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
+                if (errorNode && !isTypeAssignableTo(checkInfo.type, info.type)) {
+                    error(errorNode, ts.Diagnostics._0_index_type_1_is_not_assignable_to_2_index_type_3, typeToString(checkInfo.keyType), typeToString(checkInfo.type), typeToString(info.keyType), typeToString(info.type));
                 }
+            };
+            for (var _i = 0, indexInfos_8 = indexInfos; _i < indexInfos_8.length; _i++) {
+                var info = indexInfos_8[_i];
+                _loop_28(info);
             }
         }
         function checkTypeNameIsReserved(name, message) {
             switch (name.escapedText) {
                 case "any":
                 case "unknown":
+                case "never":
                 case "number":
                 case "bigint":
                 case "boolean":
@@ -63790,8 +68245,8 @@ var ts;
             }
         }
         function checkClassNameCollisionWithObject(name) {
-            if (languageVersion === 1 && name.escapedText === "Object"
-                && moduleKind < ts.ModuleKind.ES2015) {
+            if (languageVersion >= 1 && name.escapedText === "Object"
+                && (moduleKind < ts.ModuleKind.ES2015 || ts.getSourceFileOfNode(name).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
                 error(name, ts.Diagnostics.Class_name_cannot_be_Object_when_targeting_ES5_with_module_0, ts.ModuleKind[moduleKind]);
             }
         }
@@ -63821,7 +68276,7 @@ var ts;
         function checkTypeParametersNotReferenced(root, typeParameters, index) {
             visit(root);
             function visit(node) {
-                if (node.kind === 173) {
+                if (node.kind === 177) {
                     var type = getTypeFromTypeReference(node);
                     if (type.flags & 262144) {
                         for (var i = index; i < typeParameters.length; i++) {
@@ -63835,14 +68290,14 @@ var ts;
             }
         }
         function checkTypeParameterListsIdentical(symbol) {
-            if (symbol.declarations.length === 1) {
+            if (symbol.declarations && symbol.declarations.length === 1) {
                 return;
             }
             var links = getSymbolLinks(symbol);
             if (!links.typeParametersChecked) {
                 links.typeParametersChecked = true;
                 var declarations = getClassOrInterfaceDeclarationsOfSymbol(symbol);
-                if (declarations.length <= 1) {
+                if (!declarations || declarations.length <= 1) {
                     return;
                 }
                 var type = getDeclaredTypeOfSymbol(symbol);
@@ -63896,6 +68351,9 @@ var ts;
             registerForUnusedIdentifiersCheck(node);
         }
         function checkClassDeclaration(node) {
+            if (ts.some(node.decorators) && ts.some(node.members, function (p) { return ts.hasStaticModifier(p) && ts.isPrivateIdentifierClassElementDeclaration(p); })) {
+                grammarErrorOnNode(node.decorators[0], ts.Diagnostics.Class_decorators_can_t_be_used_with_static_private_identifier_Consider_removing_the_experimental_decorator);
+            }
             if (!node.name && !ts.hasSyntacticModifier(node, 512)) {
                 grammarErrorOnFirstToken(node, ts.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name);
             }
@@ -63906,14 +68364,7 @@ var ts;
         function checkClassLikeDeclaration(node) {
             checkGrammarClassLikeDeclaration(node);
             checkDecorators(node);
-            if (node.name) {
-                checkTypeNameIsReserved(node.name, ts.Diagnostics.Class_name_cannot_be_0);
-                checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
-                checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
-                if (!(node.flags & 8388608)) {
-                    checkClassNameCollisionWithObject(node.name);
-                }
-            }
+            checkCollisionsForDeclarationName(node, node.name);
             checkTypeParameters(ts.getEffectiveTypeParameterDeclarations(node));
             checkExportsOnMergedDeclarations(node);
             var symbol = getSymbolOfNode(node);
@@ -63923,7 +68374,8 @@ var ts;
             checkTypeParameterListsIdentical(symbol);
             checkFunctionOrConstructorSymbol(symbol);
             checkClassForDuplicateDeclarations(node);
-            if (!(node.flags & 8388608)) {
+            var nodeInAmbientContext = !!(node.flags & 8388608);
+            if (!nodeInAmbientContext) {
                 checkClassForStaticPropertyNameConflicts(node);
             }
             var baseTypeNode = ts.getEffectiveBaseTypeNode(node);
@@ -63979,6 +68431,7 @@ var ts;
                     checkKindsOfPropertyMemberOverrides(type, baseType_1);
                 }
             }
+            checkMembersForOverrideModifier(node, type, typeWithThis, staticType);
             var implementedTypeNodes = ts.getEffectiveImplementsTypeNodes(node);
             if (implementedTypeNodes) {
                 for (var _b = 0, implementedTypeNodes_1 = implementedTypeNodes; _b < implementedTypeNodes_1.length; _b++) {
@@ -63989,7 +68442,7 @@ var ts;
                     checkTypeReferenceNode(typeRefNode);
                     if (produceDiagnostics) {
                         var t = getReducedType(getTypeFromTypeNode(typeRefNode));
-                        if (t !== errorType) {
+                        if (!isErrorType(t)) {
                             if (isValidBaseType(t)) {
                                 var genericDiag = t.symbol && t.symbol.flags & 32 ?
                                     ts.Diagnostics.Class_0_incorrectly_implements_class_1_Did_you_mean_to_extend_1_and_inherit_its_members_as_a_subclass :
@@ -64007,15 +68460,109 @@ var ts;
                 }
             }
             if (produceDiagnostics) {
-                checkIndexConstraints(type);
+                checkIndexConstraints(type, symbol);
+                checkIndexConstraints(staticType, symbol, true);
                 checkTypeForDuplicateIndexSignatures(node);
                 checkPropertyInitialization(node);
             }
         }
+        function checkMembersForOverrideModifier(node, type, typeWithThis, staticType) {
+            var baseTypeNode = ts.getEffectiveBaseTypeNode(node);
+            var baseTypes = baseTypeNode && getBaseTypes(type);
+            var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
+            var baseStaticType = getBaseConstructorTypeOfClass(type);
+            var _loop_29 = function (member) {
+                if (ts.hasAmbientModifier(member)) {
+                    return "continue";
+                }
+                if (ts.isConstructorDeclaration(member)) {
+                    ts.forEach(member.parameters, function (param) {
+                        if (ts.isParameterPropertyDeclaration(param, member)) {
+                            checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, param, true);
+                        }
+                    });
+                }
+                checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, false);
+            };
+            for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+                var member = _a[_i];
+                _loop_29(member);
+            }
+        }
+        function checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, memberIsParameterProperty, reportErrors) {
+            if (reportErrors === void 0) { reportErrors = true; }
+            var declaredProp = member.name
+                && getSymbolAtLocation(member.name)
+                || getSymbolAtLocation(member);
+            if (!declaredProp) {
+                return 0;
+            }
+            return checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, ts.hasOverrideModifier(member), ts.hasAbstractModifier(member), ts.isStatic(member), memberIsParameterProperty, ts.symbolName(declaredProp), reportErrors ? member : undefined);
+        }
+        function checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, memberHasAbstractModifier, memberIsStatic, memberIsParameterProperty, memberName, errorNode) {
+            var isJs = ts.isInJSFile(node);
+            var nodeInAmbientContext = !!(node.flags & 8388608);
+            if (baseWithThis && (memberHasOverrideModifier || compilerOptions.noImplicitOverride)) {
+                var memberEscapedName = ts.escapeLeadingUnderscores(memberName);
+                var thisType = memberIsStatic ? staticType : typeWithThis;
+                var baseType = memberIsStatic ? baseStaticType : baseWithThis;
+                var prop = getPropertyOfType(thisType, memberEscapedName);
+                var baseProp = getPropertyOfType(baseType, memberEscapedName);
+                var baseClassName = typeToString(baseWithThis);
+                if (prop && !baseProp && memberHasOverrideModifier) {
+                    if (errorNode) {
+                        var suggestion = getSuggestedSymbolForNonexistentClassMember(memberName, baseType);
+                        suggestion ?
+                            error(errorNode, isJs ?
+                                ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1 :
+                                ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1, baseClassName, symbolToString(suggestion)) :
+                            error(errorNode, isJs ?
+                                ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0 :
+                                ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_it_is_not_declared_in_the_base_class_0, baseClassName);
+                    }
+                    return 2;
+                }
+                else if (prop && (baseProp === null || baseProp === void 0 ? void 0 : baseProp.declarations) && compilerOptions.noImplicitOverride && !nodeInAmbientContext) {
+                    var baseHasAbstract = ts.some(baseProp.declarations, ts.hasAbstractModifier);
+                    if (memberHasOverrideModifier) {
+                        return 0;
+                    }
+                    if (!baseHasAbstract) {
+                        if (errorNode) {
+                            var diag = memberIsParameterProperty ?
+                                isJs ?
+                                    ts.Diagnostics.This_parameter_property_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 :
+                                    ts.Diagnostics.This_parameter_property_must_have_an_override_modifier_because_it_overrides_a_member_in_base_class_0 :
+                                isJs ?
+                                    ts.Diagnostics.This_member_must_have_a_JSDoc_comment_with_an_override_tag_because_it_overrides_a_member_in_the_base_class_0 :
+                                    ts.Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_a_member_in_the_base_class_0;
+                            error(errorNode, diag, baseClassName);
+                        }
+                        return 1;
+                    }
+                    else if (memberHasAbstractModifier && baseHasAbstract) {
+                        if (errorNode) {
+                            error(errorNode, ts.Diagnostics.This_member_must_have_an_override_modifier_because_it_overrides_an_abstract_method_that_is_declared_in_the_base_class_0, baseClassName);
+                        }
+                        return 1;
+                    }
+                }
+            }
+            else if (memberHasOverrideModifier) {
+                if (errorNode) {
+                    var className = typeToString(type);
+                    error(errorNode, isJs ?
+                        ts.Diagnostics.This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_its_containing_class_0_does_not_extend_another_class :
+                        ts.Diagnostics.This_member_cannot_have_an_override_modifier_because_its_containing_class_0_does_not_extend_another_class, className);
+                }
+                return 2;
+            }
+            return 0;
+        }
         function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
             var issuedMemberError = false;
-            var _loop_23 = function (member) {
-                if (ts.hasStaticModifier(member)) {
+            var _loop_30 = function (member) {
+                if (ts.isStatic(member)) {
                     return "continue";
                 }
                 var declaredProp = member.name && getSymbolAtLocation(member.name) || getSymbolAtLocation(member);
@@ -64032,7 +68579,7 @@ var ts;
             };
             for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                 var member = _a[_i];
-                _loop_23(member);
+                _loop_30(member);
             }
             if (!issuedMemberError) {
                 checkTypeAssignableTo(typeWithThis, baseWithThis, node.name || node, broadDiag);
@@ -64050,15 +68597,34 @@ var ts;
                 }
             }
         }
+        function getMemberOverrideModifierStatus(node, member) {
+            if (!member.name) {
+                return 0;
+            }
+            var symbol = getSymbolOfNode(node);
+            var type = getDeclaredTypeOfSymbol(symbol);
+            var typeWithThis = getTypeWithThisArgument(type);
+            var staticType = getTypeOfSymbol(symbol);
+            var baseTypeNode = ts.getEffectiveBaseTypeNode(node);
+            var baseTypes = baseTypeNode && getBaseTypes(type);
+            var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
+            var baseStaticType = getBaseConstructorTypeOfClass(type);
+            var memberHasOverrideModifier = member.parent
+                ? ts.hasOverrideModifier(member)
+                : ts.hasSyntacticModifier(member, 16384);
+            var memberName = ts.unescapeLeadingUnderscores(ts.getTextOfPropertyName(member.name));
+            return checkMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, memberHasOverrideModifier, ts.hasAbstractModifier(member), ts.isStatic(member), false, memberName);
+        }
         function getTargetSymbol(s) {
             return ts.getCheckFlags(s) & 1 ? s.target : s;
         }
         function getClassOrInterfaceDeclarationsOfSymbol(symbol) {
             return ts.filter(symbol.declarations, function (d) {
-                return d.kind === 252 || d.kind === 253;
+                return d.kind === 256 || d.kind === 257;
             });
         }
         function checkKindsOfPropertyMemberOverrides(type, baseType) {
+            var _a, _b;
             var baseProperties = getPropertiesOfType(baseType);
             basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
                 var baseProperty = baseProperties_1[_i];
@@ -64076,8 +68642,8 @@ var ts;
                 if (derived === base) {
                     var derivedClassDecl = ts.getClassLikeDeclarationOfSymbol(type.symbol);
                     if (baseDeclarationFlags & 128 && (!derivedClassDecl || !ts.hasSyntacticModifier(derivedClassDecl, 128))) {
-                        for (var _a = 0, _b = getBaseTypes(type); _a < _b.length; _a++) {
-                            var otherBaseType = _b[_a];
+                        for (var _c = 0, _d = getBaseTypes(type); _c < _d.length; _c++) {
+                            var otherBaseType = _d[_c];
                             if (otherBaseType === baseType)
                                 continue;
                             var baseSymbol_1 = getPropertyOfObjectType(otherBaseType, base.escapedName);
@@ -64086,7 +68652,7 @@ var ts;
                                 continue basePropertyCheck;
                             }
                         }
-                        if (derivedClassDecl.kind === 221) {
+                        if (derivedClassDecl.kind === 225) {
                             error(derivedClassDecl, ts.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, symbolToString(baseProperty), typeToString(baseType));
                         }
                         else {
@@ -64104,7 +68670,7 @@ var ts;
                     var derivedPropertyFlags = derived.flags & 98308;
                     if (basePropertyFlags && derivedPropertyFlags) {
                         if (baseDeclarationFlags & 128 && !(base.valueDeclaration && ts.isPropertyDeclaration(base.valueDeclaration) && base.valueDeclaration.initializer)
-                            || base.valueDeclaration && base.valueDeclaration.parent.kind === 253
+                            || base.valueDeclaration && base.valueDeclaration.parent.kind === 257
                             || derived.valueDeclaration && ts.isBinaryExpression(derived.valueDeclaration)) {
                             continue;
                         }
@@ -64116,13 +68682,13 @@ var ts;
                                 ts.Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;
                             error(ts.getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage_1, symbolToString(base), typeToString(baseType), typeToString(type));
                         }
-                        else if (compilerOptions.useDefineForClassFields) {
-                            var uninitialized = ts.find(derived.declarations, function (d) { return d.kind === 163 && !d.initializer; });
+                        else if (useDefineForClassFields) {
+                            var uninitialized = (_a = derived.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return d.kind === 166 && !d.initializer; });
                             if (uninitialized
                                 && !(derived.flags & 33554432)
                                 && !(baseDeclarationFlags & 128)
                                 && !(derivedDeclarationFlags & 128)
-                                && !derived.declarations.some(function (d) { return !!(d.flags & 8388608); })) {
+                                && !((_b = derived.declarations) === null || _b === void 0 ? void 0 : _b.some(function (d) { return !!(d.flags & 8388608); }))) {
                                 var constructor = findConstructorDeclaration(ts.getClassLikeDeclarationOfSymbol(type.symbol));
                                 var propName = uninitialized.name;
                                 if (uninitialized.exclamationToken
@@ -64161,7 +68727,9 @@ var ts;
                 return properties;
             }
             var seen = new ts.Map();
-            ts.forEach(properties, function (p) { seen.set(p.escapedName, p); });
+            ts.forEach(properties, function (p) {
+                seen.set(p.escapedName, p);
+            });
             for (var _i = 0, baseTypes_2 = baseTypes; _i < baseTypes_2.length; _i++) {
                 var base = baseTypes_2[_i];
                 var properties_5 = getPropertiesOfType(getTypeWithThisArgument(base, type.thisType));
@@ -64181,7 +68749,9 @@ var ts;
                 return true;
             }
             var seen = new ts.Map();
-            ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) { seen.set(p.escapedName, { prop: p, containingType: type }); });
+            ts.forEach(resolveDeclaredMembers(type).declaredProperties, function (p) {
+                seen.set(p.escapedName, { prop: p, containingType: type });
+            });
             var ok = true;
             for (var _i = 0, baseTypes_3 = baseTypes; _i < baseTypes_3.length; _i++) {
                 var base = baseTypes_3[_i];
@@ -64217,7 +68787,7 @@ var ts;
                 if (ts.getEffectiveModifierFlags(member) & 2) {
                     continue;
                 }
-                if (isInstancePropertyWithoutInitializer(member)) {
+                if (!ts.isStatic(member) && isPropertyWithoutInitializer(member)) {
                     var propName = member.name;
                     if (ts.isIdentifier(propName) || ts.isPrivateIdentifier(propName)) {
                         var type = getTypeOfSymbol(getSymbolOfNode(member));
@@ -64230,12 +68800,28 @@ var ts;
                 }
             }
         }
-        function isInstancePropertyWithoutInitializer(node) {
-            return node.kind === 163 &&
-                !ts.hasSyntacticModifier(node, 32 | 128) &&
+        function isPropertyWithoutInitializer(node) {
+            return node.kind === 166 &&
+                !ts.hasAbstractModifier(node) &&
                 !node.exclamationToken &&
                 !node.initializer;
         }
+        function isPropertyInitializedInStaticBlocks(propName, propType, staticBlocks, startPos, endPos) {
+            for (var _i = 0, staticBlocks_2 = staticBlocks; _i < staticBlocks_2.length; _i++) {
+                var staticBlock = staticBlocks_2[_i];
+                if (staticBlock.pos >= startPos && staticBlock.pos <= endPos) {
+                    var reference = ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propName);
+                    ts.setParent(reference.expression, reference);
+                    ts.setParent(reference, staticBlock);
+                    reference.flowNode = staticBlock.returnFlowNode;
+                    var flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType));
+                    if (!(getFalsyFlags(flowType) & 32768)) {
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
         function isPropertyInitializedInConstructor(propName, propType, constructor) {
             var reference = ts.factory.createPropertyAccessExpression(ts.factory.createThis(), propName);
             ts.setParent(reference.expression, reference);
@@ -64253,7 +68839,7 @@ var ts;
                 checkExportsOnMergedDeclarations(node);
                 var symbol = getSymbolOfNode(node);
                 checkTypeParameterListsIdentical(symbol);
-                var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 253);
+                var firstInterfaceDecl = ts.getDeclarationOfKind(symbol, 257);
                 if (node === firstInterfaceDecl) {
                     var type = getDeclaredTypeOfSymbol(symbol);
                     var typeWithThis = getTypeWithThisArgument(type);
@@ -64262,7 +68848,7 @@ var ts;
                             var baseType = _a[_i];
                             checkTypeAssignableTo(typeWithThis, getTypeWithThisArgument(baseType, type.thisType), node.name, ts.Diagnostics.Interface_0_incorrectly_extends_interface_1);
                         }
-                        checkIndexConstraints(type);
+                        checkIndexConstraints(type, symbol);
                     }
                 }
                 checkObjectTypeForDuplicateDeclarations(node);
@@ -64284,7 +68870,7 @@ var ts;
             checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_alias_name_cannot_be_0);
             checkExportsOnMergedDeclarations(node);
             checkTypeParameters(node.typeParameters);
-            if (node.type.kind === 136) {
+            if (node.type.kind === 138) {
                 if (!intrinsicTypeKinds.has(node.name.escapedText) || ts.length(node.typeParameters) !== 1) {
                     error(node.type, ts.Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types);
                 }
@@ -64313,7 +68899,7 @@ var ts;
             }
             else {
                 var text = ts.getTextOfPropertyName(member.name);
-                if (isNumericLiteralName(text) && !isInfinityOrNaNString(text)) {
+                if (isNumericLiteralName(text) && !ts.isInfinityOrNaNString(text)) {
                     error(member.name, ts.Diagnostics.An_enum_member_cannot_have_a_numeric_name);
                 }
             }
@@ -64363,7 +68949,7 @@ var ts;
             return value;
             function evaluate(expr) {
                 switch (expr.kind) {
-                    case 214:
+                    case 218:
                         var value_2 = evaluate(expr.operand);
                         if (typeof value_2 === "number") {
                             switch (expr.operator) {
@@ -64373,7 +68959,7 @@ var ts;
                             }
                         }
                         break;
-                    case 216:
+                    case 220:
                         var left = evaluate(expr.left);
                         var right = evaluate(expr.right);
                         if (typeof left === "number" && typeof right === "number") {
@@ -64402,22 +68988,22 @@ var ts;
                     case 8:
                         checkGrammarNumericLiteral(expr);
                         return +expr.text;
-                    case 207:
+                    case 211:
                         return evaluate(expr.expression);
-                    case 78:
+                    case 79:
                         var identifier = expr;
-                        if (isInfinityOrNaNString(identifier.escapedText)) {
+                        if (ts.isInfinityOrNaNString(identifier.escapedText)) {
                             return +(identifier.escapedText);
                         }
                         return ts.nodeIsMissing(expr) ? 0 : evaluateEnumMember(expr, getSymbolOfNode(member.parent), identifier.escapedText);
-                    case 202:
-                    case 201:
+                    case 206:
+                    case 205:
                         var ex = expr;
                         if (isConstantMemberAccess(ex)) {
                             var type = getTypeOfExpression(ex.expression);
                             if (type.symbol && type.symbol.flags & 384) {
                                 var name = void 0;
-                                if (ex.kind === 201) {
+                                if (ex.kind === 205) {
                                     name = ex.name.escapedText;
                                 }
                                 else {
@@ -64435,7 +69021,7 @@ var ts;
                 if (memberSymbol) {
                     var declaration = memberSymbol.valueDeclaration;
                     if (declaration !== member) {
-                        if (isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
+                        if (declaration && isBlockScopedNameDeclaredBeforeUse(declaration, member)) {
                             return getEnumMemberValue(declaration);
                         }
                         error(expr, ts.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
@@ -64449,9 +69035,9 @@ var ts;
             }
         }
         function isConstantMemberAccess(node) {
-            return node.kind === 78 ||
-                node.kind === 201 && isConstantMemberAccess(node.expression) ||
-                node.kind === 202 && isConstantMemberAccess(node.expression) &&
+            return node.kind === 79 ||
+                node.kind === 205 && isConstantMemberAccess(node.expression) ||
+                node.kind === 206 && isConstantMemberAccess(node.expression) &&
                     ts.isStringLiteralLike(node.argumentExpression);
         }
         function checkEnumDeclaration(node) {
@@ -64459,16 +69045,14 @@ var ts;
                 return;
             }
             checkGrammarDecoratorsAndModifiers(node);
-            checkTypeNameIsReserved(node.name, ts.Diagnostics.Enum_name_cannot_be_0);
-            checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
-            checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
+            checkCollisionsForDeclarationName(node, node.name);
             checkExportsOnMergedDeclarations(node);
             node.members.forEach(checkEnumMember);
             computeEnumMemberValues(node);
             var enumSymbol = getSymbolOfNode(node);
             var firstDeclaration = ts.getDeclarationOfKind(enumSymbol, node.kind);
             if (node === firstDeclaration) {
-                if (enumSymbol.declarations.length > 1) {
+                if (enumSymbol.declarations && enumSymbol.declarations.length > 1) {
                     var enumIsConst_1 = ts.isEnumConst(node);
                     ts.forEach(enumSymbol.declarations, function (decl) {
                         if (ts.isEnumDeclaration(decl) && ts.isEnumConst(decl) !== enumIsConst_1) {
@@ -64478,7 +69062,7 @@ var ts;
                 }
                 var seenEnumMissingInitialInitializer_1 = false;
                 ts.forEach(enumSymbol.declarations, function (declaration) {
-                    if (declaration.kind !== 255) {
+                    if (declaration.kind !== 259) {
                         return false;
                     }
                     var enumDeclaration = declaration;
@@ -64504,12 +69088,14 @@ var ts;
         }
         function getFirstNonAmbientClassOrFunctionDeclaration(symbol) {
             var declarations = symbol.declarations;
-            for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
-                var declaration = declarations_8[_i];
-                if ((declaration.kind === 252 ||
-                    (declaration.kind === 251 && ts.nodeIsPresent(declaration.body))) &&
-                    !(declaration.flags & 8388608)) {
-                    return declaration;
+            if (declarations) {
+                for (var _i = 0, declarations_8 = declarations; _i < declarations_8.length; _i++) {
+                    var declaration = declarations_8[_i];
+                    if ((declaration.kind === 256 ||
+                        (declaration.kind === 255 && ts.nodeIsPresent(declaration.body))) &&
+                        !(declaration.flags & 8388608)) {
+                        return declaration;
+                    }
                 }
             }
             return undefined;
@@ -64547,13 +69133,13 @@ var ts;
                     }
                 }
                 if (ts.isIdentifier(node.name)) {
-                    checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
-                    checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
+                    checkCollisionsForDeclarationName(node, node.name);
                 }
                 checkExportsOnMergedDeclarations(node);
                 var symbol = getSymbolOfNode(node);
                 if (symbol.flags & 512
                     && !inAmbientContext
+                    && symbol.declarations
                     && symbol.declarations.length > 1
                     && isInstantiatedModule(node, ts.shouldPreserveConstEnums(compilerOptions))) {
                     var firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol);
@@ -64565,7 +69151,7 @@ var ts;
                             error(node.name, ts.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged);
                         }
                     }
-                    var mergedClass = ts.getDeclarationOfKind(symbol, 252);
+                    var mergedClass = ts.getDeclarationOfKind(symbol, 256);
                     if (mergedClass &&
                         inSameLexicalScope(node, mergedClass)) {
                         getNodeLinks(node).flags |= 32768;
@@ -64607,37 +69193,38 @@ var ts;
             }
         }
         function checkModuleAugmentationElement(node, isGlobalAugmentation) {
+            var _a;
             switch (node.kind) {
-                case 232:
-                    for (var _i = 0, _a = node.declarationList.declarations; _i < _a.length; _i++) {
-                        var decl = _a[_i];
+                case 236:
+                    for (var _i = 0, _b = node.declarationList.declarations; _i < _b.length; _i++) {
+                        var decl = _b[_i];
                         checkModuleAugmentationElement(decl, isGlobalAugmentation);
                     }
                     break;
-                case 266:
-                case 267:
+                case 270:
+                case 271:
                     grammarErrorOnFirstToken(node, ts.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);
                     break;
-                case 260:
-                case 261:
+                case 264:
+                case 265:
                     grammarErrorOnFirstToken(node, ts.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);
                     break;
-                case 198:
-                case 249:
+                case 202:
+                case 253:
                     var name = node.name;
                     if (ts.isBindingPattern(name)) {
-                        for (var _b = 0, _c = name.elements; _b < _c.length; _b++) {
-                            var el = _c[_b];
+                        for (var _c = 0, _d = name.elements; _c < _d.length; _c++) {
+                            var el = _d[_c];
                             checkModuleAugmentationElement(el, isGlobalAugmentation);
                         }
                         break;
                     }
-                case 252:
-                case 255:
-                case 251:
-                case 253:
                 case 256:
-                case 254:
+                case 259:
+                case 255:
+                case 257:
+                case 260:
+                case 258:
                     if (isGlobalAugmentation) {
                         return;
                     }
@@ -64645,7 +69232,7 @@ var ts;
                     if (symbol) {
                         var reportError = !(symbol.flags & 33554432);
                         if (!reportError) {
-                            reportError = !!symbol.parent && ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
+                            reportError = !!((_a = symbol.parent) === null || _a === void 0 ? void 0 : _a.declarations) && ts.isExternalModuleAugmentation(symbol.parent.declarations[0]);
                         }
                     }
                     break;
@@ -64653,20 +69240,20 @@ var ts;
         }
         function getFirstNonModuleExportsIdentifier(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return node;
-                case 157:
+                case 160:
                     do {
                         node = node.left;
-                    } while (node.kind !== 78);
+                    } while (node.kind !== 79);
                     return node;
-                case 201:
+                case 205:
                     do {
                         if (ts.isModuleExportsAccessExpression(node.expression) && !ts.isPrivateIdentifier(node.name)) {
                             return node.name;
                         }
                         node = node.expression;
-                    } while (node.kind !== 78);
+                    } while (node.kind !== 79);
                     return node;
             }
         }
@@ -64679,9 +69266,9 @@ var ts;
                 error(moduleName, ts.Diagnostics.String_literal_expected);
                 return false;
             }
-            var inAmbientExternalModule = node.parent.kind === 257 && ts.isAmbientModule(node.parent.parent);
-            if (node.parent.kind !== 297 && !inAmbientExternalModule) {
-                error(moduleName, node.kind === 267 ?
+            var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
+            if (node.parent.kind !== 303 && !inAmbientExternalModule) {
+                error(moduleName, node.kind === 271 ?
                     ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace :
                     ts.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module);
                 return false;
@@ -64704,17 +69291,43 @@ var ts;
                     (symbol.flags & 788968 ? 788968 : 0) |
                     (symbol.flags & 1920 ? 1920 : 0);
                 if (target.flags & excludedMeanings) {
-                    var message = node.kind === 270 ?
+                    var message = node.kind === 274 ?
                         ts.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0 :
                         ts.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0;
                     error(node, message, symbolToString(symbol));
                 }
                 if (compilerOptions.isolatedModules
-                    && node.kind === 270
-                    && !node.parent.parent.isTypeOnly
-                    && !(target.flags & 111551)
+                    && !ts.isTypeOnlyImportOrExportDeclaration(node)
                     && !(node.flags & 8388608)) {
-                    error(node, ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type);
+                    var typeOnlyAlias = getTypeOnlyAliasDeclaration(symbol);
+                    var isType = !(target.flags & 111551);
+                    if (isType || typeOnlyAlias) {
+                        switch (node.kind) {
+                            case 266:
+                            case 269:
+                            case 264: {
+                                if (compilerOptions.preserveValueImports) {
+                                    ts.Debug.assertIsDefined(node.name, "An ImportClause with a symbol should have a name");
+                                    var message = isType
+                                        ? ts.Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled
+                                        : ts.Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_preserveValueImports_and_isolatedModules_are_both_enabled;
+                                    var name = ts.idText(node.kind === 269 ? node.propertyName || node.name : node.name);
+                                    addTypeOnlyDeclarationRelatedInfo(error(node, message, name), isType ? undefined : typeOnlyAlias, name);
+                                }
+                                break;
+                            }
+                            case 274: {
+                                if (ts.getSourceFileOfNode(typeOnlyAlias) !== ts.getSourceFileOfNode(node)) {
+                                    var message = isType
+                                        ? ts.Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type
+                                        : ts.Diagnostics._0_resolves_to_a_type_only_declaration_and_must_be_re_exported_using_a_type_only_re_export_when_isolatedModules_is_enabled;
+                                    var name = ts.idText(node.propertyName || node.name);
+                                    addTypeOnlyDeclarationRelatedInfo(error(node, message, name), isType ? undefined : typeOnlyAlias, name);
+                                    return;
+                                }
+                            }
+                        }
+                    }
                 }
                 if (ts.isImportSpecifier(node) && ((_a = target.declarations) === null || _a === void 0 ? void 0 : _a.every(function (d) { return !!(ts.getCombinedNodeFlags(d) & 134217728); }))) {
                     addDeprecatedSuggestion(node.name, target.declarations, symbol.escapedName);
@@ -64722,16 +69335,26 @@ var ts;
             }
         }
         function checkImportBinding(node) {
-            checkCollisionWithRequireExportsInGeneratedCode(node, node.name);
-            checkCollisionWithGlobalPromiseInGeneratedCode(node, node.name);
+            checkCollisionsForDeclarationName(node, node.name);
             checkAliasSymbol(node);
-            if (node.kind === 265 &&
+            if (node.kind === 269 &&
                 ts.idText(node.propertyName || node.name) === "default" &&
-                compilerOptions.esModuleInterop &&
-                moduleKind !== ts.ModuleKind.System && moduleKind < ts.ModuleKind.ES2015) {
+                ts.getESModuleInterop(compilerOptions) &&
+                moduleKind !== ts.ModuleKind.System && (moduleKind < ts.ModuleKind.ES2015 || ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
                 checkExternalEmitHelpers(node, 131072);
             }
         }
+        function checkAssertClause(declaration) {
+            var _a;
+            if (declaration.assertClause) {
+                if (moduleKind !== ts.ModuleKind.ESNext) {
+                    return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_are_only_supported_when_the_module_option_is_set_to_esnext);
+                }
+                if (ts.isImportDeclaration(declaration) ? (_a = declaration.importClause) === null || _a === void 0 ? void 0 : _a.isTypeOnly : declaration.isTypeOnly) {
+                    return grammarErrorOnNode(declaration.assertClause, ts.Diagnostics.Import_assertions_cannot_be_used_with_type_only_imports_or_exports);
+                }
+            }
+        }
         function checkImportDeclaration(node) {
             if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) {
                 return;
@@ -64746,9 +69369,9 @@ var ts;
                         checkImportBinding(importClause);
                     }
                     if (importClause.namedBindings) {
-                        if (importClause.namedBindings.kind === 263) {
+                        if (importClause.namedBindings.kind === 267) {
                             checkImportBinding(importClause.namedBindings);
-                            if (moduleKind !== ts.ModuleKind.System && moduleKind < ts.ModuleKind.ES2015 && compilerOptions.esModuleInterop) {
+                            if (moduleKind !== ts.ModuleKind.System && (moduleKind < ts.ModuleKind.ES2015 || ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS) && ts.getESModuleInterop(compilerOptions)) {
                                 checkExternalEmitHelpers(node, 65536);
                             }
                         }
@@ -64761,6 +69384,7 @@ var ts;
                     }
                 }
             }
+            checkAssertClause(node);
         }
         function checkImportEqualsDeclaration(node) {
             if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)) {
@@ -64772,7 +69396,7 @@ var ts;
                 if (ts.hasSyntacticModifier(node, 1)) {
                     markExportAsReferenced(node);
                 }
-                if (node.moduleReference.kind !== 272) {
+                if (node.moduleReference.kind !== 276) {
                     var target = resolveAlias(getSymbolOfNode(node));
                     if (target !== unknownSymbol) {
                         if (target.flags & 111551) {
@@ -64790,7 +69414,7 @@ var ts;
                     }
                 }
                 else {
-                    if (moduleKind >= ts.ModuleKind.ES2015 && !node.isTypeOnly && !(node.flags & 8388608)) {
+                    if (moduleKind >= ts.ModuleKind.ES2015 && ts.getSourceFileOfNode(node).impliedNodeFormat === undefined && !node.isTypeOnly && !(node.flags & 8388608)) {
                         grammarErrorOnNode(node, ts.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead);
                     }
                 }
@@ -64804,16 +69428,16 @@ var ts;
                 grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_declaration_cannot_have_modifiers);
             }
             if (node.moduleSpecifier && node.exportClause && ts.isNamedExports(node.exportClause) && ts.length(node.exportClause.elements) && languageVersion === 0) {
-                checkExternalEmitHelpers(node, 2097152);
+                checkExternalEmitHelpers(node, 4194304);
             }
             checkGrammarExportDeclaration(node);
             if (!node.moduleSpecifier || checkExternalImportOrExportDeclaration(node)) {
                 if (node.exportClause && !ts.isNamespaceExport(node.exportClause)) {
                     ts.forEach(node.exportClause.elements, checkExportSpecifier);
-                    var inAmbientExternalModule = node.parent.kind === 257 && ts.isAmbientModule(node.parent.parent);
-                    var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 257 &&
+                    var inAmbientExternalModule = node.parent.kind === 261 && ts.isAmbientModule(node.parent.parent);
+                    var inAmbientNamespaceDeclaration = !inAmbientExternalModule && node.parent.kind === 261 &&
                         !node.moduleSpecifier && node.flags & 8388608;
-                    if (node.parent.kind !== 297 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
+                    if (node.parent.kind !== 303 && !inAmbientExternalModule && !inAmbientNamespaceDeclaration) {
                         error(node, ts.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace);
                     }
                 }
@@ -64825,9 +69449,9 @@ var ts;
                     else if (node.exportClause) {
                         checkAliasSymbol(node.exportClause);
                     }
-                    if (moduleKind !== ts.ModuleKind.System && moduleKind < ts.ModuleKind.ES2015) {
+                    if (moduleKind !== ts.ModuleKind.System && (moduleKind < ts.ModuleKind.ES2015 || ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS)) {
                         if (node.exportClause) {
-                            if (compilerOptions.esModuleInterop) {
+                            if (ts.getESModuleInterop(compilerOptions)) {
                                 checkExternalEmitHelpers(node, 65536);
                             }
                         }
@@ -64837,17 +69461,22 @@ var ts;
                     }
                 }
             }
+            checkAssertClause(node);
         }
         function checkGrammarExportDeclaration(node) {
             var _a;
-            var isTypeOnlyExportStar = node.isTypeOnly && ((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) !== 268;
-            if (isTypeOnlyExportStar) {
-                grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
+            if (node.isTypeOnly) {
+                if (((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) === 272) {
+                    return checkGrammarNamedImportsOrExports(node.exportClause);
+                }
+                else {
+                    return grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
+                }
             }
-            return !isTypeOnlyExportStar;
+            return false;
         }
         function checkGrammarModuleElementContext(node, errorMessage) {
-            var isInAppropriateContext = node.parent.kind === 297 || node.parent.kind === 257 || node.parent.kind === 256;
+            var isInAppropriateContext = node.parent.kind === 303 || node.parent.kind === 261 || node.parent.kind === 260;
             if (!isInAppropriateContext) {
                 grammarErrorOnFirstToken(node, errorMessage);
             }
@@ -64895,7 +69524,7 @@ var ts;
             if (!node.parent.parent.moduleSpecifier) {
                 var exportedName = node.propertyName || node.name;
                 var symbol = resolveName(exportedName, exportedName.escapedText, 111551 | 788968 | 1920 | 2097152, undefined, undefined, true);
-                if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) {
+                if (symbol && (symbol === undefinedSymbol || symbol === globalThisSymbol || symbol.declarations && isGlobalSourceFile(getDeclarationContainer(symbol.declarations[0])))) {
                     error(exportedName, ts.Diagnostics.Cannot_export_0_Only_local_declarations_can_be_exported_from_a_module, ts.idText(exportedName));
                 }
                 else {
@@ -64907,20 +69536,23 @@ var ts;
                 }
             }
             else {
-                if (compilerOptions.esModuleInterop &&
+                if (ts.getESModuleInterop(compilerOptions) &&
                     moduleKind !== ts.ModuleKind.System &&
-                    moduleKind < ts.ModuleKind.ES2015 &&
+                    (moduleKind < ts.ModuleKind.ES2015 || ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS) &&
                     ts.idText(node.propertyName || node.name) === "default") {
                     checkExternalEmitHelpers(node, 131072);
                 }
             }
         }
         function checkExportAssignment(node) {
-            if (checkGrammarModuleElementContext(node, ts.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)) {
+            var illegalContextMessage = node.isExportEquals
+                ? ts.Diagnostics.An_export_assignment_must_be_at_the_top_level_of_a_file_or_module_declaration
+                : ts.Diagnostics.A_default_export_must_be_at_the_top_level_of_a_file_or_module_declaration;
+            if (checkGrammarModuleElementContext(node, illegalContextMessage)) {
                 return;
             }
-            var container = node.parent.kind === 297 ? node.parent : node.parent.parent;
-            if (container.kind === 256 && !ts.isAmbientModule(container)) {
+            var container = node.parent.kind === 303 ? node.parent : node.parent.parent;
+            if (container.kind === 260 && !ts.isAmbientModule(container)) {
                 if (node.isExportEquals) {
                     error(node, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);
                 }
@@ -64932,7 +69564,11 @@ var ts;
             if (!checkGrammarDecoratorsAndModifiers(node) && ts.hasEffectiveModifiers(node)) {
                 grammarErrorOnFirstToken(node, ts.Diagnostics.An_export_assignment_cannot_have_modifiers);
             }
-            if (node.expression.kind === 78) {
+            var typeAnnotationNode = ts.getEffectiveTypeAnnotationNode(node);
+            if (typeAnnotationNode) {
+                checkTypeAssignableTo(checkExpressionCached(node.expression), getTypeFromTypeNode(typeAnnotationNode), node.expression);
+            }
+            if (node.expression.kind === 79) {
                 var id = node.expression;
                 var sym = resolveEntityName(id, 67108863, true, true, node);
                 if (sym) {
@@ -64957,7 +69593,7 @@ var ts;
                 grammarErrorOnNode(node.expression, ts.Diagnostics.The_expression_of_an_export_assignment_must_be_an_identifier_or_qualified_name_in_an_ambient_context);
             }
             if (node.isExportEquals && !(node.flags & 8388608)) {
-                if (moduleKind >= ts.ModuleKind.ES2015) {
+                if (moduleKind >= ts.ModuleKind.ES2015 && ts.getSourceFileOfNode(node).impliedNodeFormat !== ts.ModuleKind.CommonJS) {
                     grammarErrorOnNode(node, ts.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_modules_Consider_using_export_default_or_another_module_format_instead);
                 }
                 else if (moduleKind === ts.ModuleKind.System) {
@@ -64975,7 +69611,7 @@ var ts;
                 var exportEqualsSymbol = moduleSymbol.exports.get("export=");
                 if (exportEqualsSymbol && hasExportedMembers(moduleSymbol)) {
                     var declaration = getDeclarationOfAliasSymbol(exportEqualsSymbol) || exportEqualsSymbol.valueDeclaration;
-                    if (!isTopLevelInExternalModuleAugmentation(declaration) && !ts.isInJSFile(declaration)) {
+                    if (declaration && !isTopLevelInExternalModuleAugmentation(declaration) && !ts.isInJSFile(declaration)) {
                         error(declaration, ts.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements);
                     }
                 }
@@ -64994,10 +69630,12 @@ var ts;
                             return;
                         }
                         if (exportedDeclarationsCount > 1) {
-                            for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
-                                var declaration = declarations_9[_i];
-                                if (isNotOverload(declaration)) {
-                                    diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, ts.unescapeLeadingUnderscores(id)));
+                            if (!isDuplicatedCommonJSExport(declarations)) {
+                                for (var _i = 0, _b = declarations; _i < _b.length; _i++) {
+                                    var declaration = _b[_i];
+                                    if (isNotOverload(declaration)) {
+                                        diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Cannot_redeclare_exported_variable_0, ts.unescapeLeadingUnderscores(id)));
+                                    }
                                 }
                             }
                         }
@@ -65006,6 +69644,11 @@ var ts;
                 links.exportsChecked = true;
             }
         }
+        function isDuplicatedCommonJSExport(declarations) {
+            return declarations
+                && declarations.length > 1
+                && declarations.every(function (d) { return ts.isInJSFile(d) && ts.isAccessExpression(d) && (ts.isExportsIdentifier(d.expression) || ts.isModuleExportsAccessExpression(d.expression)); });
+        }
         function checkSourceElement(node) {
             if (node) {
                 var saveCurrentNode = currentNode;
@@ -65025,170 +69668,176 @@ var ts;
             var kind = node.kind;
             if (cancellationToken) {
                 switch (kind) {
+                    case 260:
                     case 256:
-                    case 252:
-                    case 253:
-                    case 251:
+                    case 257:
+                    case 255:
                         cancellationToken.throwIfCancellationRequested();
                 }
             }
-            if (kind >= 232 && kind <= 248 && node.flowNode && !isReachableFlowNode(node.flowNode)) {
+            if (kind >= 236 && kind <= 252 && node.flowNode && !isReachableFlowNode(node.flowNode)) {
                 errorOrSuggestion(compilerOptions.allowUnreachableCode === false, node, ts.Diagnostics.Unreachable_code_detected);
             }
             switch (kind) {
-                case 159:
+                case 162:
                     return checkTypeParameter(node);
-                case 160:
-                    return checkParameter(node);
                 case 163:
+                    return checkParameter(node);
+                case 166:
                     return checkPropertyDeclaration(node);
-                case 162:
+                case 165:
                     return checkPropertySignature(node);
-                case 175:
+                case 179:
+                case 178:
+                case 173:
                 case 174:
-                case 169:
-                case 170:
-                case 171:
+                case 175:
                     return checkSignatureDeclaration(node);
-                case 165:
-                case 164:
+                case 168:
+                case 167:
                     return checkMethodDeclaration(node);
-                case 166:
+                case 169:
+                    return checkClassStaticBlockDeclaration(node);
+                case 170:
                     return checkConstructorDeclaration(node);
-                case 167:
-                case 168:
+                case 171:
+                case 172:
                     return checkAccessorDeclaration(node);
-                case 173:
+                case 177:
                     return checkTypeReferenceNode(node);
-                case 172:
-                    return checkTypePredicate(node);
                 case 176:
+                    return checkTypePredicate(node);
+                case 180:
                     return checkTypeQuery(node);
-                case 177:
+                case 181:
                     return checkTypeLiteral(node);
-                case 178:
-                    return checkArrayType(node);
-                case 179:
-                    return checkTupleType(node);
                 case 182:
+                    return checkArrayType(node);
                 case 183:
-                    return checkUnionOrIntersectionType(node);
+                    return checkTupleType(node);
                 case 186:
-                case 180:
-                case 181:
-                    return checkSourceElement(node.type);
                 case 187:
+                    return checkUnionOrIntersectionType(node);
+                case 190:
+                case 184:
+                case 185:
+                    return checkSourceElement(node.type);
+                case 191:
                     return checkThisType(node);
-                case 188:
+                case 192:
                     return checkTypeOperator(node);
-                case 184:
+                case 188:
                     return checkConditionalType(node);
-                case 185:
+                case 189:
                     return checkInferType(node);
-                case 193:
+                case 197:
                     return checkTemplateLiteralType(node);
-                case 195:
+                case 199:
                     return checkImportType(node);
-                case 192:
+                case 196:
                     return checkNamedTupleMember(node);
-                case 315:
+                case 326:
                     return checkJSDocAugmentsTag(node);
-                case 316:
+                case 327:
                     return checkJSDocImplementsTag(node);
-                case 331:
-                case 324:
-                case 325:
+                case 343:
+                case 336:
+                case 337:
                     return checkJSDocTypeAliasTag(node);
-                case 330:
+                case 342:
                     return checkJSDocTemplateTag(node);
-                case 329:
+                case 341:
                     return checkJSDocTypeTag(node);
-                case 326:
+                case 338:
                     return checkJSDocParameterTag(node);
-                case 333:
+                case 345:
                     return checkJSDocPropertyTag(node);
-                case 308:
+                case 315:
                     checkJSDocFunctionType(node);
-                case 306:
-                case 305:
-                case 303:
-                case 304:
+                case 313:
                 case 312:
+                case 310:
+                case 311:
+                case 320:
                     checkJSDocTypeIsInJsFile(node);
                     ts.forEachChild(node, checkSourceElement);
                     return;
-                case 309:
+                case 316:
                     checkJSDocVariadicType(node);
                     return;
-                case 301:
+                case 307:
                     return checkSourceElement(node.type);
-                case 189:
+                case 331:
+                case 333:
+                case 332:
+                    return checkJSDocAccessibilityModifiers(node);
+                case 193:
                     return checkIndexedAccessType(node);
-                case 190:
+                case 194:
                     return checkMappedType(node);
-                case 251:
+                case 255:
                     return checkFunctionDeclaration(node);
-                case 230:
-                case 257:
+                case 234:
+                case 261:
                     return checkBlock(node);
-                case 232:
+                case 236:
                     return checkVariableStatement(node);
-                case 233:
+                case 237:
                     return checkExpressionStatement(node);
-                case 234:
+                case 238:
                     return checkIfStatement(node);
-                case 235:
+                case 239:
                     return checkDoStatement(node);
-                case 236:
+                case 240:
                     return checkWhileStatement(node);
-                case 237:
+                case 241:
                     return checkForStatement(node);
-                case 238:
+                case 242:
                     return checkForInStatement(node);
-                case 239:
+                case 243:
                     return checkForOfStatement(node);
-                case 240:
-                case 241:
+                case 244:
+                case 245:
                     return checkBreakOrContinueStatement(node);
-                case 242:
+                case 246:
                     return checkReturnStatement(node);
-                case 243:
+                case 247:
                     return checkWithStatement(node);
-                case 244:
+                case 248:
                     return checkSwitchStatement(node);
-                case 245:
+                case 249:
                     return checkLabeledStatement(node);
-                case 246:
+                case 250:
                     return checkThrowStatement(node);
-                case 247:
+                case 251:
                     return checkTryStatement(node);
-                case 249:
+                case 253:
                     return checkVariableDeclaration(node);
-                case 198:
+                case 202:
                     return checkBindingElement(node);
-                case 252:
+                case 256:
                     return checkClassDeclaration(node);
-                case 253:
+                case 257:
                     return checkInterfaceDeclaration(node);
-                case 254:
+                case 258:
                     return checkTypeAliasDeclaration(node);
-                case 255:
+                case 259:
                     return checkEnumDeclaration(node);
-                case 256:
+                case 260:
                     return checkModuleDeclaration(node);
-                case 261:
+                case 265:
                     return checkImportDeclaration(node);
-                case 260:
+                case 264:
                     return checkImportEqualsDeclaration(node);
-                case 267:
+                case 271:
                     return checkExportDeclaration(node);
-                case 266:
+                case 270:
                     return checkExportAssignment(node);
-                case 231:
-                case 248:
+                case 235:
+                case 252:
                     checkGrammarStatementInAmbientContext(node);
                     return;
-                case 271:
+                case 275:
                     return checkMissingDeclaration(node);
             }
         }
@@ -65230,8 +69879,11 @@ var ts;
             var paramTag = node.parent.parent;
             if (ts.isJSDocTypeExpression(node.parent) && ts.isJSDocParameterTag(paramTag)) {
                 var host_1 = ts.getHostSignatureFromJSDoc(paramTag);
-                if (host_1) {
-                    var lastParamDeclaration = ts.lastOrUndefined(host_1.parameters);
+                var isCallbackTag = ts.isJSDocCallbackTag(paramTag.parent.parent);
+                if (host_1 || isCallbackTag) {
+                    var lastParamDeclaration = isCallbackTag
+                        ? ts.lastOrUndefined(paramTag.parent.parent.typeExpression.parameters)
+                        : ts.lastOrUndefined(host_1.parameters);
                     var symbol = ts.getParameterSymbolFromJSDoc(paramTag);
                     if (!lastParamDeclaration ||
                         symbol && lastParamDeclaration.symbol === symbol && ts.isRestParameter(lastParamDeclaration)) {
@@ -65265,30 +69917,30 @@ var ts;
             currentNode = node;
             instantiationCount = 0;
             switch (node.kind) {
-                case 203:
-                case 204:
-                case 205:
-                case 161:
-                case 275:
-                    resolveUntypedCall(node);
-                    break;
+                case 207:
                 case 208:
                 case 209:
-                case 165:
                 case 164:
-                    checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
+                case 279:
+                    resolveUntypedCall(node);
                     break;
-                case 167:
+                case 212:
+                case 213:
                 case 168:
+                case 167:
+                    checkFunctionExpressionOrObjectLiteralMethodDeferred(node);
+                    break;
+                case 171:
+                case 172:
                     checkAccessorDeclaration(node);
                     break;
-                case 221:
+                case 225:
                     checkClassExpressionDeferred(node);
                     break;
-                case 274:
+                case 278:
                     checkJsxSelfClosingElementDeferred(node);
                     break;
-                case 273:
+                case 277:
                     checkJsxElementDeferred(node);
                     break;
             }
@@ -65328,7 +69980,8 @@ var ts;
                 checkGrammarSourceFile(node);
                 ts.clear(potentialThisCollisions);
                 ts.clear(potentialNewTargetCollisions);
-                ts.clear(potentialWeakMapCollisions);
+                ts.clear(potentialWeakMapSetCollisions);
+                ts.clear(potentialReflectCollisions);
                 ts.forEach(node.statements, checkSourceElement);
                 checkSourceElement(node.endOfFileToken);
                 checkDeferredNodes(node);
@@ -65358,9 +70011,13 @@ var ts;
                     ts.forEach(potentialNewTargetCollisions, checkIfNewTargetIsCapturedInEnclosingScope);
                     ts.clear(potentialNewTargetCollisions);
                 }
-                if (potentialWeakMapCollisions.length) {
-                    ts.forEach(potentialWeakMapCollisions, checkWeakMapCollision);
-                    ts.clear(potentialWeakMapCollisions);
+                if (potentialWeakMapSetCollisions.length) {
+                    ts.forEach(potentialWeakMapSetCollisions, checkWeakMapSetCollision);
+                    ts.clear(potentialWeakMapSetCollisions);
+                }
+                if (potentialReflectCollisions.length) {
+                    ts.forEach(potentialReflectCollisions, checkReflectCollision);
+                    ts.clear(potentialReflectCollisions);
                 }
                 links.flags |= 1;
             }
@@ -65408,7 +70065,7 @@ var ts;
                 return [];
             }
             var symbols = ts.createSymbolTable();
-            var isStatic = false;
+            var isStaticSymbol = false;
             populateSymbols();
             symbols.delete("this");
             return symbolsToArray(symbols);
@@ -65418,27 +70075,27 @@ var ts;
                         copySymbols(location.locals, meaning);
                     }
                     switch (location.kind) {
-                        case 297:
-                            if (!ts.isExternalOrCommonJsModule(location))
+                        case 303:
+                            if (!ts.isExternalModule(location))
                                 break;
-                        case 256:
-                            copySymbols(getSymbolOfNode(location).exports, meaning & 2623475);
+                        case 260:
+                            copyLocallyVisibleExportSymbols(getSymbolOfNode(location).exports, meaning & 2623475);
                             break;
-                        case 255:
+                        case 259:
                             copySymbols(getSymbolOfNode(location).exports, meaning & 8);
                             break;
-                        case 221:
+                        case 225:
                             var className = location.name;
                             if (className) {
                                 copySymbol(location.symbol, meaning);
                             }
-                        case 252:
-                        case 253:
-                            if (!isStatic) {
+                        case 256:
+                        case 257:
+                            if (!isStaticSymbol) {
                                 copySymbols(getMembersOfSymbol(getSymbolOfNode(location)), meaning & 788968);
                             }
                             break;
-                        case 208:
+                        case 212:
                             var funcName = location.name;
                             if (funcName) {
                                 copySymbol(location.symbol, meaning);
@@ -65448,7 +70105,7 @@ var ts;
                     if (ts.introducesArgumentsExoticObject(location)) {
                         copySymbol(argumentsSymbol, meaning);
                     }
-                    isStatic = ts.hasSyntacticModifier(location, 32);
+                    isStaticSymbol = ts.isStatic(location);
                     location = location.parent;
                 }
                 copySymbols(globals, meaning);
@@ -65468,52 +70125,52 @@ var ts;
                     });
                 }
             }
+            function copyLocallyVisibleExportSymbols(source, meaning) {
+                if (meaning) {
+                    source.forEach(function (symbol) {
+                        if (!ts.getDeclarationOfKind(symbol, 274) && !ts.getDeclarationOfKind(symbol, 273)) {
+                            copySymbol(symbol, meaning);
+                        }
+                    });
+                }
+            }
         }
         function isTypeDeclarationName(name) {
-            return name.kind === 78 &&
+            return name.kind === 79 &&
                 isTypeDeclaration(name.parent) &&
                 ts.getNameOfDeclaration(name.parent) === name;
         }
         function isTypeDeclaration(node) {
             switch (node.kind) {
-                case 159:
-                case 252:
-                case 253:
-                case 254:
-                case 255:
-                case 331:
-                case 324:
-                case 325:
+                case 162:
+                case 256:
+                case 257:
+                case 258:
+                case 259:
+                case 343:
+                case 336:
+                case 337:
                     return true;
-                case 262:
+                case 266:
                     return node.isTypeOnly;
-                case 265:
-                case 270:
+                case 269:
+                case 274:
                     return node.parent.parent.isTypeOnly;
                 default:
                     return false;
             }
         }
         function isTypeReferenceIdentifier(node) {
-            while (node.parent.kind === 157) {
+            while (node.parent.kind === 160) {
                 node = node.parent;
             }
-            return node.parent.kind === 173;
+            return node.parent.kind === 177;
         }
         function isHeritageClauseElementIdentifier(node) {
-            while (node.parent.kind === 201) {
+            while (node.parent.kind === 205) {
                 node = node.parent;
             }
-            return node.parent.kind === 223;
-        }
-        function isJSDocEntryNameReference(node) {
-            while (node.parent.kind === 157) {
-                node = node.parent;
-            }
-            while (node.parent.kind === 201) {
-                node = node.parent;
-            }
-            return node.parent.kind === 302;
+            return node.parent.kind === 227;
         }
         function forEachEnclosingClass(node, callback) {
             var result;
@@ -65541,13 +70198,13 @@ var ts;
             return !!forEachEnclosingClass(node, function (n) { return n === classDeclaration; });
         }
         function getLeftSideOfImportEqualsOrExportAssignment(nodeOnRightSide) {
-            while (nodeOnRightSide.parent.kind === 157) {
+            while (nodeOnRightSide.parent.kind === 160) {
                 nodeOnRightSide = nodeOnRightSide.parent;
             }
-            if (nodeOnRightSide.parent.kind === 260) {
+            if (nodeOnRightSide.parent.kind === 264) {
                 return nodeOnRightSide.parent.moduleReference === nodeOnRightSide ? nodeOnRightSide.parent : undefined;
             }
-            if (nodeOnRightSide.parent.kind === 266) {
+            if (nodeOnRightSide.parent.kind === 270) {
                 return nodeOnRightSide.parent.expression === nodeOnRightSide ? nodeOnRightSide.parent : undefined;
             }
             return undefined;
@@ -65573,7 +70230,7 @@ var ts;
                 node = parent;
                 parent = parent.parent;
             }
-            if (parent && parent.kind === 195 && parent.qualifier === node) {
+            if (parent && parent.kind === 199 && parent.qualifier === node) {
                 return parent;
             }
             return undefined;
@@ -65583,27 +70240,27 @@ var ts;
                 return getSymbolOfNode(name.parent);
             }
             if (ts.isInJSFile(name) &&
-                name.parent.kind === 201 &&
+                name.parent.kind === 205 &&
                 name.parent === name.parent.parent.left) {
-                if (!ts.isPrivateIdentifier(name)) {
+                if (!ts.isPrivateIdentifier(name) && !ts.isJSDocMemberName(name)) {
                     var specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(name);
                     if (specialPropertyAssignmentSymbol) {
                         return specialPropertyAssignmentSymbol;
                     }
                 }
             }
-            if (name.parent.kind === 266 && ts.isEntityNameExpression(name)) {
+            if (name.parent.kind === 270 && ts.isEntityNameExpression(name)) {
                 var success = resolveEntityName(name, 111551 | 788968 | 1920 | 2097152, true);
                 if (success && success !== unknownSymbol) {
                     return success;
                 }
             }
-            else if (!ts.isPropertyAccessExpression(name) && !ts.isPrivateIdentifier(name) && isInRightSideOfImportOrExportAssignment(name)) {
-                var importEqualsDeclaration = ts.getAncestor(name, 260);
+            else if (ts.isEntityName(name) && isInRightSideOfImportOrExportAssignment(name)) {
+                var importEqualsDeclaration = ts.getAncestor(name, 264);
                 ts.Debug.assert(importEqualsDeclaration !== undefined);
                 return getSymbolOfPartOfRightHandSideOfImportEquals(name, true);
             }
-            if (!ts.isPropertyAccessExpression(name) && !ts.isPrivateIdentifier(name)) {
+            if (ts.isEntityName(name)) {
                 var possibleImportNode = isImportTypeQualifierPart(name);
                 if (possibleImportNode) {
                     getTypeFromTypeNode(possibleImportNode);
@@ -65611,12 +70268,12 @@ var ts;
                     return sym === unknownSymbol ? undefined : sym;
                 }
             }
-            while (ts.isRightSideOfQualifiedNameOrPropertyAccess(name)) {
+            while (ts.isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(name)) {
                 name = name.parent;
             }
             if (isHeritageClauseElementIdentifier(name)) {
                 var meaning = 0;
-                if (name.parent.kind === 223) {
+                if (name.parent.kind === 227) {
                     meaning = 788968;
                     if (ts.isExpressionWithTypeArgumentsInClassExtendsClause(name.parent)) {
                         meaning |= 111551;
@@ -65631,10 +70288,10 @@ var ts;
                     return entityNameSymbol;
                 }
             }
-            if (name.parent.kind === 326) {
+            if (name.parent.kind === 338) {
                 return ts.getParameterSymbolFromJSDoc(name.parent);
             }
-            if (name.parent.kind === 159 && name.parent.parent.kind === 330) {
+            if (name.parent.kind === 162 && name.parent.parent.kind === 342) {
                 ts.Debug.assert(!ts.isInJSFile(name));
                 var typeParameter = ts.getTypeParameterFromJsDoc(name.parent);
                 return typeParameter && typeParameter.symbol;
@@ -65643,42 +70300,76 @@ var ts;
                 if (ts.nodeIsMissing(name)) {
                     return undefined;
                 }
-                if (name.kind === 78) {
+                var isJSDoc_1 = ts.findAncestor(name, ts.or(ts.isJSDocLinkLike, ts.isJSDocNameReference, ts.isJSDocMemberName));
+                var meaning = isJSDoc_1 ? 788968 | 1920 | 111551 : 111551;
+                if (name.kind === 79) {
                     if (ts.isJSXTagName(name) && isJsxIntrinsicIdentifier(name)) {
                         var symbol = getIntrinsicTagSymbol(name.parent);
                         return symbol === unknownSymbol ? undefined : symbol;
                     }
-                    return resolveEntityName(name, 111551, false, true);
+                    var result = resolveEntityName(name, meaning, false, !isJSDoc_1, ts.getHostSignatureFromJSDoc(name));
+                    if (!result && isJSDoc_1) {
+                        var container = ts.findAncestor(name, ts.or(ts.isClassLike, ts.isInterfaceDeclaration));
+                        if (container) {
+                            return resolveJSDocMemberName(name, getSymbolOfNode(container));
+                        }
+                    }
+                    return result;
                 }
-                else if (name.kind === 201 || name.kind === 157) {
+                else if (ts.isPrivateIdentifier(name)) {
+                    return getSymbolForPrivateIdentifierExpression(name);
+                }
+                else if (name.kind === 205 || name.kind === 160) {
                     var links = getNodeLinks(name);
                     if (links.resolvedSymbol) {
                         return links.resolvedSymbol;
                     }
-                    if (name.kind === 201) {
-                        checkPropertyAccessExpression(name);
+                    if (name.kind === 205) {
+                        checkPropertyAccessExpression(name, 0);
                     }
                     else {
-                        checkQualifiedName(name);
+                        checkQualifiedName(name, 0);
+                    }
+                    if (!links.resolvedSymbol && isJSDoc_1 && ts.isQualifiedName(name)) {
+                        return resolveJSDocMemberName(name);
                     }
                     return links.resolvedSymbol;
                 }
+                else if (ts.isJSDocMemberName(name)) {
+                    return resolveJSDocMemberName(name);
+                }
             }
             else if (isTypeReferenceIdentifier(name)) {
-                var meaning = name.parent.kind === 173 ? 788968 : 1920;
-                return resolveEntityName(name, meaning, false, true);
-            }
-            else if (isJSDocEntryNameReference(name)) {
-                var meaning = 788968 | 1920 | 111551;
-                return resolveEntityName(name, meaning, false, true, ts.getHostSignatureFromJSDoc(name));
+                var meaning = name.parent.kind === 177 ? 788968 : 1920;
+                var symbol = resolveEntityName(name, meaning, false, true);
+                return symbol && symbol !== unknownSymbol ? symbol : getUnresolvedSymbolForEntityName(name);
             }
-            if (name.parent.kind === 172) {
+            if (name.parent.kind === 176) {
                 return resolveEntityName(name, 1);
             }
             return undefined;
         }
+        function resolveJSDocMemberName(name, container) {
+            if (ts.isEntityName(name)) {
+                var meaning = 788968 | 1920 | 111551;
+                var symbol = resolveEntityName(name, meaning, false, true, ts.getHostSignatureFromJSDoc(name));
+                if (!symbol && ts.isIdentifier(name) && container) {
+                    symbol = getMergedSymbol(getSymbol(getExportsOfSymbol(container), name.escapedText, meaning));
+                }
+                if (symbol) {
+                    return symbol;
+                }
+            }
+            var left = ts.isIdentifier(name) ? container : resolveJSDocMemberName(name.left);
+            var right = ts.isIdentifier(name) ? name.escapedText : name.right.escapedText;
+            if (left) {
+                var proto = left.flags & 111551 && getPropertyOfType(getTypeOfSymbol(left), "prototype");
+                var t = proto ? getTypeOfSymbol(proto) : getDeclaredTypeOfSymbol(left);
+                return getPropertyOfType(t, right);
+            }
+        }
         function getSymbolAtLocation(node, ignoreErrors) {
-            if (node.kind === 297) {
+            if (node.kind === 303) {
                 return ts.isExternalModule(node) ? getMergedSymbol(node.symbol) : undefined;
             }
             var parent = node.parent;
@@ -65695,12 +70386,12 @@ var ts;
             else if (ts.isLiteralComputedPropertyDeclarationName(node)) {
                 return getSymbolOfNode(parent.parent);
             }
-            if (node.kind === 78) {
+            if (node.kind === 79) {
                 if (isInRightSideOfImportOrExportAssignment(node)) {
                     return getSymbolOfNameOrPropertyAccessExpression(node);
                 }
-                else if (parent.kind === 198 &&
-                    grandParent.kind === 196 &&
+                else if (parent.kind === 202 &&
+                    grandParent.kind === 200 &&
                     node === parent.propertyName) {
                     var typeOfPattern = getTypeOfNode(grandParent);
                     var propertyDeclaration = getPropertyOfType(typeOfPattern, node.escapedText);
@@ -65708,14 +70399,24 @@ var ts;
                         return propertyDeclaration;
                     }
                 }
+                else if (ts.isMetaProperty(parent)) {
+                    var parentType = getTypeOfNode(parent);
+                    var propertyDeclaration = getPropertyOfType(parentType, node.escapedText);
+                    if (propertyDeclaration) {
+                        return propertyDeclaration;
+                    }
+                    if (parent.keywordToken === 103) {
+                        return checkNewTargetMetaProperty(parent).symbol;
+                    }
+                }
             }
             switch (node.kind) {
-                case 78:
                 case 79:
-                case 201:
-                case 157:
+                case 80:
+                case 205:
+                case 160:
                     return getSymbolOfNameOrPropertyAccessExpression(node);
-                case 107:
+                case 108:
                     var container = ts.getThisContainer(node, false);
                     if (ts.isFunctionLike(container)) {
                         var sig = getSignatureFromDeclaration(container);
@@ -65726,20 +70427,20 @@ var ts;
                     if (ts.isInExpressionContext(node)) {
                         return checkExpression(node).symbol;
                     }
-                case 187:
+                case 191:
                     return getTypeFromThisTypeNode(node).symbol;
-                case 105:
+                case 106:
                     return checkExpression(node).symbol;
-                case 132:
+                case 134:
                     var constructorDeclaration = node.parent;
-                    if (constructorDeclaration && constructorDeclaration.kind === 166) {
+                    if (constructorDeclaration && constructorDeclaration.kind === 170) {
                         return constructorDeclaration.parent.symbol;
                     }
                     return undefined;
                 case 10:
                 case 14:
                     if ((ts.isExternalModuleImportEqualsDeclaration(node.parent.parent) && ts.getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node) ||
-                        ((node.parent.kind === 261 || node.parent.kind === 267) && node.parent.moduleSpecifier === node) ||
+                        ((node.parent.kind === 265 || node.parent.kind === 271) && node.parent.moduleSpecifier === node) ||
                         ((ts.isInJSFile(node) && ts.isRequireCall(node.parent, false)) || ts.isImportCall(node.parent)) ||
                         (ts.isLiteralTypeNode(node.parent) && ts.isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent)) {
                         return resolveExternalModuleName(node, node, ignoreErrors);
@@ -65754,21 +70455,35 @@ var ts;
                             ? getTypeFromTypeNode(grandParent.objectType)
                             : undefined;
                     return objectType && getPropertyOfType(objectType, ts.escapeLeadingUnderscores(node.text));
-                case 87:
-                case 97:
+                case 88:
+                case 98:
                 case 38:
-                case 83:
+                case 84:
                     return getSymbolOfNode(node.parent);
-                case 195:
+                case 199:
                     return ts.isLiteralImportTypeNode(node) ? getSymbolAtLocation(node.argument.literal, ignoreErrors) : undefined;
-                case 92:
+                case 93:
                     return ts.isExportAssignment(node.parent) ? ts.Debug.checkDefined(node.parent.symbol) : undefined;
+                case 100:
+                case 103:
+                    return ts.isMetaProperty(node.parent) ? checkMetaPropertyKeyword(node.parent).symbol : undefined;
+                case 230:
+                    return checkExpression(node).symbol;
                 default:
                     return undefined;
             }
         }
+        function getIndexInfosAtLocation(node) {
+            if (ts.isIdentifier(node) && ts.isPropertyAccessExpression(node.parent) && node.parent.name === node) {
+                var keyType_1 = getLiteralTypeFromPropertyName(node);
+                var objectType = getTypeOfExpression(node.parent.expression);
+                var objectTypes = objectType.flags & 1048576 ? objectType.types : [objectType];
+                return ts.flatMap(objectTypes, function (t) { return ts.filter(getIndexInfosOfType(t), function (info) { return isApplicableIndexType(keyType_1, info.keyType); }); });
+            }
+            return undefined;
+        }
         function getShorthandAssignmentValueSymbol(location) {
-            if (location && location.kind === 289) {
+            if (location && location.kind === 295) {
                 return resolveEntityName(location.name, 111551 | 2097152);
             }
             return undefined;
@@ -65829,26 +70544,29 @@ var ts;
                 var symbol = getSymbolAtLocation(node);
                 if (symbol) {
                     var declaredType = getDeclaredTypeOfSymbol(symbol);
-                    return declaredType !== errorType ? declaredType : getTypeOfSymbol(symbol);
+                    return !isErrorType(declaredType) ? declaredType : getTypeOfSymbol(symbol);
                 }
             }
+            if (ts.isMetaProperty(node.parent) && node.parent.keywordToken === node.kind) {
+                return checkMetaPropertyKeyword(node.parent);
+            }
             return errorType;
         }
         function getTypeOfAssignmentPattern(expr) {
-            ts.Debug.assert(expr.kind === 200 || expr.kind === 199);
-            if (expr.parent.kind === 239) {
+            ts.Debug.assert(expr.kind === 204 || expr.kind === 203);
+            if (expr.parent.kind === 243) {
                 var iteratedType = checkRightHandSideOfForOf(expr.parent);
                 return checkDestructuringAssignment(expr, iteratedType || errorType);
             }
-            if (expr.parent.kind === 216) {
+            if (expr.parent.kind === 220) {
                 var iteratedType = getTypeOfExpression(expr.parent.right);
                 return checkDestructuringAssignment(expr, iteratedType || errorType);
             }
-            if (expr.parent.kind === 288) {
-                var node_2 = ts.cast(expr.parent.parent, ts.isObjectLiteralExpression);
-                var typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node_2) || errorType;
-                var propertyIndex = ts.indexOfNode(node_2.properties, expr.parent);
-                return checkObjectLiteralDestructuringPropertyAssignment(node_2, typeOfParentObjectLiteral, propertyIndex);
+            if (expr.parent.kind === 294) {
+                var node_3 = ts.cast(expr.parent.parent, ts.isObjectLiteralExpression);
+                var typeOfParentObjectLiteral = getTypeOfAssignmentPattern(node_3) || errorType;
+                var propertyIndex = ts.indexOfNode(node_3.properties, expr.parent);
+                return checkObjectLiteralDestructuringPropertyAssignment(node_3, typeOfParentObjectLiteral, propertyIndex);
             }
             var node = ts.cast(expr.parent, ts.isArrayLiteralExpression);
             var typeOfArrayLiteral = getTypeOfAssignmentPattern(node) || errorType;
@@ -65867,19 +70585,19 @@ var ts;
         }
         function getParentTypeOfClassElement(node) {
             var classSymbol = getSymbolOfNode(node.parent);
-            return ts.hasSyntacticModifier(node, 32)
+            return ts.isStatic(node)
                 ? getTypeOfSymbol(classSymbol)
                 : getDeclaredTypeOfSymbol(classSymbol);
         }
         function getClassElementPropertyKeyType(element) {
             var name = element.name;
             switch (name.kind) {
-                case 78:
-                    return getLiteralType(ts.idText(name));
+                case 79:
+                    return getStringLiteralType(ts.idText(name));
                 case 8:
                 case 10:
-                    return getLiteralType(name.text);
-                case 158:
+                    return getStringLiteralType(name.text);
+                case 161:
                     var nameType = checkComputedPropertyName(name);
                     return isTypeAssignableToKind(nameType, 12288) ? nameType : stringType;
                 default:
@@ -65965,6 +70683,7 @@ var ts;
             return ts.isModuleOrEnumDeclaration(node.parent) && node === node.parent.name;
         }
         function getReferencedExportContainer(nodeIn, prefixLocals) {
+            var _a;
             var node = ts.getParseTreeNode(nodeIn, ts.isIdentifier);
             if (node) {
                 var symbol = getReferencedValueSymbol(node, isNameOfModuleOrEnumDeclaration(node));
@@ -65978,7 +70697,7 @@ var ts;
                     }
                     var parentSymbol_1 = getParentOfSymbol(symbol);
                     if (parentSymbol_1) {
-                        if (parentSymbol_1.flags & 512 && parentSymbol_1.valueDeclaration.kind === 297) {
+                        if (parentSymbol_1.flags & 512 && ((_a = parentSymbol_1.valueDeclaration) === null || _a === void 0 ? void 0 : _a.kind) === 303) {
                             var symbolFile = parentSymbol_1.valueDeclaration;
                             var referenceFile = ts.getSourceFileOfNode(node);
                             var symbolIsUmdExport = symbolFile !== referenceFile;
@@ -66003,11 +70722,12 @@ var ts;
             return undefined;
         }
         function isSymbolOfDestructuredElementOfCatchBinding(symbol) {
-            return ts.isBindingElement(symbol.valueDeclaration)
-                && ts.walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 287;
+            return symbol.valueDeclaration
+                && ts.isBindingElement(symbol.valueDeclaration)
+                && ts.walkUpBindingElementsAndPatterns(symbol.valueDeclaration).parent.kind === 291;
         }
         function isSymbolOfDeclarationWithCollidingName(symbol) {
-            if (symbol.flags & 418 && !ts.isSourceFile(symbol.valueDeclaration)) {
+            if (symbol.flags & 418 && symbol.valueDeclaration && !ts.isSourceFile(symbol.valueDeclaration)) {
                 var links = getSymbolLinks(symbol);
                 if (links.isDeclarationWithCollidingName === undefined) {
                     var container = ts.getEnclosingBlockScopeContainer(symbol.valueDeclaration);
@@ -66019,7 +70739,7 @@ var ts;
                         else if (nodeLinks_1.flags & 262144) {
                             var isDeclaredInLoop = nodeLinks_1.flags & 524288;
                             var inLoopInitializer = ts.isIterationStatement(container, false);
-                            var inLoopBodyBlock = container.kind === 230 && ts.isIterationStatement(container.parent, false);
+                            var inLoopBodyBlock = container.kind === 234 && ts.isIterationStatement(container.parent, false);
                             links.isDeclarationWithCollidingName = !ts.isBlockScopedContainerTopLevel(container) && (!isDeclaredInLoop || (!inLoopInitializer && !inLoopBodyBlock));
                         }
                         else {
@@ -66055,34 +70775,37 @@ var ts;
         }
         function isValueAliasDeclaration(node) {
             switch (node.kind) {
-                case 260:
-                    return isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol);
-                case 262:
-                case 263:
-                case 265:
-                case 270:
-                    var symbol = getSymbolOfNode(node) || unknownSymbol;
-                    return isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol);
+                case 264:
+                    return isAliasResolvedToValue(getSymbolOfNode(node));
+                case 266:
                 case 267:
+                case 269:
+                case 274:
+                    var symbol = getSymbolOfNode(node);
+                    return !!symbol && isAliasResolvedToValue(symbol) && !getTypeOnlyAliasDeclaration(symbol);
+                case 271:
                     var exportClause = node.exportClause;
                     return !!exportClause && (ts.isNamespaceExport(exportClause) ||
                         ts.some(exportClause.elements, isValueAliasDeclaration));
-                case 266:
-                    return node.expression && node.expression.kind === 78 ?
-                        isAliasResolvedToValue(getSymbolOfNode(node) || unknownSymbol) :
+                case 270:
+                    return node.expression && node.expression.kind === 79 ?
+                        isAliasResolvedToValue(getSymbolOfNode(node)) :
                         true;
             }
             return false;
         }
         function isTopLevelValueImportEqualsWithEntityName(nodeIn) {
             var node = ts.getParseTreeNode(nodeIn, ts.isImportEqualsDeclaration);
-            if (node === undefined || node.parent.kind !== 297 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
+            if (node === undefined || node.parent.kind !== 303 || !ts.isInternalModuleImportEqualsDeclaration(node)) {
                 return false;
             }
             var isValue = isAliasResolvedToValue(getSymbolOfNode(node));
             return isValue && node.moduleReference && !ts.nodeIsMissing(node.moduleReference);
         }
         function isAliasResolvedToValue(symbol) {
+            if (!symbol) {
+                return false;
+            }
             var target = resolveAlias(symbol);
             if (target === unknownSymbol) {
                 return true;
@@ -66128,13 +70851,13 @@ var ts;
                 !isOptionalParameter(parameter) &&
                 !ts.isJSDocParameterTag(parameter) &&
                 !!parameter.initializer &&
-                !ts.hasSyntacticModifier(parameter, 92);
+                !ts.hasSyntacticModifier(parameter, 16476);
         }
         function isOptionalUninitializedParameterProperty(parameter) {
             return strictNullChecks &&
                 isOptionalParameter(parameter) &&
                 !parameter.initializer &&
-                ts.hasSyntacticModifier(parameter, 92);
+                ts.hasSyntacticModifier(parameter, 16476);
         }
         function isOptionalUninitializedParameter(parameter) {
             return !!strictNullChecks &&
@@ -66161,7 +70884,11 @@ var ts;
             return symbol && getPropertiesOfType(getTypeOfSymbol(symbol)) || ts.emptyArray;
         }
         function getNodeCheckFlags(node) {
-            return getNodeLinks(node).flags || 0;
+            var _a;
+            var nodeId = node.id || 0;
+            if (nodeId < 0 || nodeId >= nodeLinks.length)
+                return 0;
+            return ((_a = nodeLinks[nodeId]) === null || _a === void 0 ? void 0 : _a.flags) || 0;
         }
         function getEnumMemberValue(node) {
             computeEnumMemberValues(node.parent);
@@ -66169,15 +70896,15 @@ var ts;
         }
         function canHaveConstantValue(node) {
             switch (node.kind) {
-                case 291:
-                case 201:
-                case 202:
+                case 297:
+                case 205:
+                case 206:
                     return true;
             }
             return false;
         }
         function getConstantValue(node) {
-            if (node.kind === 291) {
+            if (node.kind === 297) {
                 return getEnumMemberValue(node);
             }
             var symbol = getNodeLinks(node).resolvedSymbol;
@@ -66193,7 +70920,7 @@ var ts;
             return !!(type.flags & 524288) && getSignaturesOfType(type, 0).length > 0;
         }
         function getTypeReferenceSerializationKind(typeNameIn, location) {
-            var _a;
+            var _a, _b;
             var typeName = ts.getParseTreeNode(typeNameIn, ts.isEntityName);
             if (!typeName)
                 return ts.TypeReferenceSerializationKind.Unknown;
@@ -66202,9 +70929,14 @@ var ts;
                 if (!location)
                     return ts.TypeReferenceSerializationKind.Unknown;
             }
+            var isTypeOnly = false;
+            if (ts.isQualifiedName(typeName)) {
+                var rootValueSymbol = resolveEntityName(ts.getFirstIdentifier(typeName), 111551, true, true, location);
+                isTypeOnly = !!((_a = rootValueSymbol === null || rootValueSymbol === void 0 ? void 0 : rootValueSymbol.declarations) === null || _a === void 0 ? void 0 : _a.every(ts.isTypeOnlyImportOrExportDeclaration));
+            }
             var valueSymbol = resolveEntityName(typeName, 111551, true, true, location);
-            var isTypeOnly = ((_a = valueSymbol === null || valueSymbol === void 0 ? void 0 : valueSymbol.declarations) === null || _a === void 0 ? void 0 : _a.every(ts.isTypeOnlyImportOrExportDeclaration)) || false;
             var resolvedSymbol = valueSymbol && valueSymbol.flags & 2097152 ? resolveAlias(valueSymbol) : valueSymbol;
+            isTypeOnly || (isTypeOnly = !!((_b = valueSymbol === null || valueSymbol === void 0 ? void 0 : valueSymbol.declarations) === null || _b === void 0 ? void 0 : _b.every(ts.isTypeOnlyImportOrExportDeclaration)));
             var typeSymbol = resolveEntityName(typeName, 788968, true, false, location);
             if (resolvedSymbol && resolvedSymbol === typeSymbol) {
                 var globalPromiseSymbol = getGlobalPromiseConstructorSymbol(false);
@@ -66220,7 +70952,7 @@ var ts;
                 return isTypeOnly ? ts.TypeReferenceSerializationKind.ObjectType : ts.TypeReferenceSerializationKind.Unknown;
             }
             var type = getDeclaredTypeOfSymbol(typeSymbol);
-            if (type === errorType) {
+            if (isErrorType(type)) {
                 return isTypeOnly ? ts.TypeReferenceSerializationKind.ObjectType : ts.TypeReferenceSerializationKind.Unknown;
             }
             else if (type.flags & 3) {
@@ -66260,7 +70992,7 @@ var ts;
         function createTypeOfDeclaration(declarationIn, enclosingDeclaration, flags, tracker, addUndefined) {
             var declaration = ts.getParseTreeNode(declarationIn, ts.isVariableLikeOrAccessor);
             if (!declaration) {
-                return ts.factory.createToken(128);
+                return ts.factory.createToken(130);
             }
             var symbol = getSymbolOfNode(declaration);
             var type = symbol && !(symbol.flags & (2048 | 131072))
@@ -66278,7 +71010,7 @@ var ts;
         function createReturnTypeOfSignatureDeclaration(signatureDeclarationIn, enclosingDeclaration, flags, tracker) {
             var signatureDeclaration = ts.getParseTreeNode(signatureDeclarationIn, ts.isFunctionLike);
             if (!signatureDeclaration) {
-                return ts.factory.createToken(128);
+                return ts.factory.createToken(130);
             }
             var signature = getSignatureFromDeclaration(signatureDeclaration);
             return nodeBuilder.typeToTypeNode(getReturnTypeOfSignature(signature), enclosingDeclaration, flags | 1024, tracker);
@@ -66286,7 +71018,7 @@ var ts;
         function createTypeOfExpression(exprIn, enclosingDeclaration, flags, tracker) {
             var expr = ts.getParseTreeNode(exprIn, ts.isExpression);
             if (!expr) {
-                return ts.factory.createToken(128);
+                return ts.factory.createToken(130);
             }
             var type = getWidenedType(getRegularTypeOfExpression(expr));
             return nodeBuilder.typeToTypeNode(type, enclosingDeclaration, flags | 1024, tracker);
@@ -66434,12 +71166,12 @@ var ts;
                 getJsxFragmentFactoryEntity: getJsxFragmentFactoryEntity,
                 getAllAccessorDeclarations: function (accessor) {
                     accessor = ts.getParseTreeNode(accessor, ts.isGetOrSetAccessorDeclaration);
-                    var otherKind = accessor.kind === 168 ? 167 : 168;
+                    var otherKind = accessor.kind === 172 ? 171 : 172;
                     var otherAccessor = ts.getDeclarationOfKind(getSymbolOfNode(accessor), otherKind);
                     var firstAccessor = otherAccessor && (otherAccessor.pos < accessor.pos) ? otherAccessor : accessor;
                     var secondAccessor = otherAccessor && (otherAccessor.pos < accessor.pos) ? accessor : otherAccessor;
-                    var setAccessor = accessor.kind === 168 ? accessor : otherAccessor;
-                    var getAccessor = accessor.kind === 167 ? accessor : otherAccessor;
+                    var setAccessor = accessor.kind === 172 ? accessor : otherAccessor;
+                    var getAccessor = accessor.kind === 171 ? accessor : otherAccessor;
                     return {
                         firstAccessor: firstAccessor,
                         secondAccessor: secondAccessor,
@@ -66455,7 +71187,7 @@ var ts;
                 },
                 getDeclarationStatementsForSourceFile: function (node, flags, tracker, bundled) {
                     var n = ts.getParseTreeNode(node);
-                    ts.Debug.assert(n && n.kind === 297, "Non-sourcefile node passed into getDeclarationsForSourceFile");
+                    ts.Debug.assert(n && n.kind === 303, "Non-sourcefile node passed into getDeclarationsForSourceFile");
                     var sym = getSymbolOfNode(node);
                     if (!sym) {
                         return !node.locals ? [] : nodeBuilder.symbolTableToDeclarationStatements(node.locals, node, flags, tracker, bundled);
@@ -66478,11 +71210,13 @@ var ts;
                     var s = _a[_i];
                     if (s.mergeId) {
                         var merged = getMergedSymbol(s);
-                        for (var _b = 0, _c = merged.declarations; _b < _c.length; _b++) {
-                            var d = _c[_b];
-                            var declFile = ts.getSourceFileOfNode(d);
-                            if (declFile === importTarget) {
-                                return true;
+                        if (merged.declarations) {
+                            for (var _b = 0, _c = merged.declarations; _b < _c.length; _b++) {
+                                var d = _c[_b];
+                                var declFile = ts.getSourceFileOfNode(d);
+                                if (declFile === importTarget) {
+                                    return true;
+                                }
                             }
                         }
                     }
@@ -66490,24 +71224,21 @@ var ts;
                 return false;
             }
             function isInHeritageClause(node) {
-                return node.parent && node.parent.kind === 223 && node.parent.parent && node.parent.parent.kind === 286;
+                return node.parent && node.parent.kind === 227 && node.parent.parent && node.parent.parent.kind === 290;
             }
             function getTypeReferenceDirectivesForEntityName(node) {
                 if (!fileToDirective) {
                     return undefined;
                 }
                 var meaning = 788968 | 1920;
-                if ((node.kind === 78 && isInTypeQuery(node)) || (node.kind === 201 && !isInHeritageClause(node))) {
+                if ((node.kind === 79 && isInTypeQuery(node)) || (node.kind === 205 && !isInHeritageClause(node))) {
                     meaning = 111551 | 1048576;
                 }
                 var symbol = resolveEntityName(node, meaning, true);
                 return symbol && symbol !== unknownSymbol ? getTypeReferenceDirectivesForSymbol(symbol, meaning) : undefined;
             }
             function getTypeReferenceDirectivesForSymbol(symbol, meaning) {
-                if (!fileToDirective) {
-                    return undefined;
-                }
-                if (!isSymbolFromTypeDeclarationFile(symbol)) {
+                if (!fileToDirective || !isSymbolFromTypeDeclarationFile(symbol)) {
                     return undefined;
                 }
                 var typeReferenceDirectives;
@@ -66540,7 +71271,7 @@ var ts;
                         break;
                     }
                 }
-                if (current.valueDeclaration && current.valueDeclaration.kind === 297 && current.flags & 512) {
+                if (current.valueDeclaration && current.valueDeclaration.kind === 303 && current.flags & 512) {
                     return false;
                 }
                 for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
@@ -66567,12 +71298,12 @@ var ts;
             }
         }
         function getExternalModuleFileFromDeclaration(declaration) {
-            var specifier = declaration.kind === 256 ? ts.tryCast(declaration.name, ts.isStringLiteral) : ts.getExternalModuleName(declaration);
+            var specifier = declaration.kind === 260 ? ts.tryCast(declaration.name, ts.isStringLiteral) : ts.getExternalModuleName(declaration);
             var moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, undefined);
             if (!moduleSymbol) {
                 return undefined;
             }
-            return ts.getDeclarationOfKind(moduleSymbol, 297);
+            return ts.getDeclarationOfKind(moduleSymbol, 303);
         }
         function initializeTypeChecker() {
             for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {
@@ -66588,7 +71319,7 @@ var ts;
                 }
                 if (!ts.isExternalOrCommonJsModule(file)) {
                     var fileGlobalThisSymbol = file.locals.get("globalThis");
-                    if (fileGlobalThisSymbol) {
+                    if (fileGlobalThisSymbol === null || fileGlobalThisSymbol === void 0 ? void 0 : fileGlobalThisSymbol.declarations) {
                         for (var _d = 0, _e = fileGlobalThisSymbol.declarations; _d < _e.length; _d++) {
                             var declaration = _e[_d];
                             diagnostics.add(ts.createDiagnosticForNode(declaration, ts.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, "globalThis"));
@@ -66642,7 +71373,7 @@ var ts;
             anyArrayType = createArrayType(anyType);
             autoArrayType = createArrayType(autoType);
             if (autoArrayType === emptyObjectType) {
-                autoArrayType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, undefined, undefined);
+                autoArrayType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
             }
             globalReadonlyArrayType = getGlobalTypeOrUndefined("ReadonlyArray", 1) || globalArrayType;
             anyReadonlyArrayType = globalReadonlyArrayType ? createTypeFromGenericGlobalType(globalReadonlyArrayType, [anyType]) : anyArrayType;
@@ -66689,13 +71420,28 @@ var ts;
                     var helpersModule = resolveHelpersModule(sourceFile, location);
                     if (helpersModule !== unknownSymbol) {
                         var uncheckedHelpers = helpers & ~requestedExternalEmitHelpers;
-                        for (var helper = 1; helper <= 2097152; helper <<= 1) {
+                        for (var helper = 1; helper <= 4194304; helper <<= 1) {
                             if (uncheckedHelpers & helper) {
                                 var name = getHelperName(helper);
                                 var symbol = getSymbol(helpersModule.exports, ts.escapeLeadingUnderscores(name), 111551);
                                 if (!symbol) {
                                     error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_which_does_not_exist_in_0_Consider_upgrading_your_version_of_0, ts.externalHelpersModuleNameText, name);
                                 }
+                                else if (helper & 524288) {
+                                    if (!ts.some(getSignaturesOfSymbol(symbol), function (signature) { return getParameterCount(signature) > 3; })) {
+                                        error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, ts.externalHelpersModuleNameText, name, 4);
+                                    }
+                                }
+                                else if (helper & 1048576) {
+                                    if (!ts.some(getSignaturesOfSymbol(symbol), function (signature) { return getParameterCount(signature) > 4; })) {
+                                        error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, ts.externalHelpersModuleNameText, name, 5);
+                                    }
+                                }
+                                else if (helper & 1024) {
+                                    if (!ts.some(getSignaturesOfSymbol(symbol), function (signature) { return getParameterCount(signature) > 2; })) {
+                                        error(location, ts.Diagnostics.This_syntax_requires_an_imported_helper_named_1_with_2_parameters_which_is_not_compatible_with_the_one_in_0_Consider_upgrading_your_version_of_0, ts.externalHelpersModuleNameText, name, 3);
+                                    }
+                                }
                             }
                         }
                     }
@@ -66726,7 +71472,8 @@ var ts;
                 case 262144: return "__makeTemplateObject";
                 case 524288: return "__classPrivateFieldGet";
                 case 1048576: return "__classPrivateFieldSet";
-                case 2097152: return "__createBinding";
+                case 2097152: return "__classPrivateFieldIn";
+                case 4194304: return "__createBinding";
                 default: return ts.Debug.fail("Unrecognized helper");
             }
         }
@@ -66744,14 +71491,14 @@ var ts;
                 return false;
             }
             if (!ts.nodeCanBeDecorated(node, node.parent, node.parent.parent)) {
-                if (node.kind === 165 && !ts.nodeIsPresent(node.body)) {
+                if (node.kind === 168 && !ts.nodeIsPresent(node.body)) {
                     return grammarErrorOnFirstToken(node, ts.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);
                 }
                 else {
                     return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_are_not_valid_here);
                 }
             }
-            else if (node.kind === 167 || node.kind === 168) {
+            else if (node.kind === 171 || node.kind === 172) {
                 var accessors = ts.getAllAccessorDeclarations(node.parent.members, node);
                 if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) {
                     return grammarErrorOnFirstToken(node, ts.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name);
@@ -66764,31 +71511,50 @@ var ts;
             if (quickResult !== undefined) {
                 return quickResult;
             }
-            var lastStatic, lastDeclare, lastAsync, lastReadonly;
+            var lastStatic, lastDeclare, lastAsync, lastReadonly, lastOverride;
             var flags = 0;
             for (var _i = 0, _a = node.modifiers; _i < _a.length; _i++) {
                 var modifier = _a[_i];
-                if (modifier.kind !== 142) {
-                    if (node.kind === 162 || node.kind === 164) {
+                if (modifier.kind !== 144) {
+                    if (node.kind === 165 || node.kind === 167) {
                         return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_type_member, ts.tokenToString(modifier.kind));
                     }
-                    if (node.kind === 171) {
+                    if (node.kind === 175 && (modifier.kind !== 124 || !ts.isClassLike(node.parent))) {
                         return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_an_index_signature, ts.tokenToString(modifier.kind));
                     }
                 }
                 switch (modifier.kind) {
-                    case 84:
-                        if (node.kind !== 255) {
-                            return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(84));
+                    case 85:
+                        if (node.kind !== 259) {
+                            return grammarErrorOnNode(node, ts.Diagnostics.A_class_member_cannot_have_the_0_keyword, ts.tokenToString(85));
+                        }
+                        break;
+                    case 158:
+                        if (flags & 16384) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "override");
+                        }
+                        else if (flags & 2) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "override", "declare");
+                        }
+                        else if (flags & 64) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "override", "readonly");
+                        }
+                        else if (flags & 256) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "override", "async");
                         }
+                        flags |= 16384;
+                        lastOverride = modifier;
                         break;
+                    case 123:
                     case 122:
                     case 121:
-                    case 120:
                         var text = visibilityToString(ts.modifierToFlag(modifier.kind));
                         if (flags & 28) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics.Accessibility_modifier_already_seen);
                         }
+                        else if (flags & 16384) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "override");
+                        }
                         else if (flags & 32) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "static");
                         }
@@ -66798,23 +71564,23 @@ var ts;
                         else if (flags & 256) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "async");
                         }
-                        else if (node.parent.kind === 257 || node.parent.kind === 297) {
+                        else if (node.parent.kind === 261 || node.parent.kind === 303) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, text);
                         }
                         else if (flags & 128) {
-                            if (modifier.kind === 120) {
+                            if (modifier.kind === 121) {
                                 return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, text, "abstract");
                             }
                             else {
                                 return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, text, "abstract");
                             }
                         }
-                        else if (ts.isPrivateIdentifierPropertyDeclaration(node)) {
+                        else if (ts.isPrivateIdentifierClassElementDeclaration(node)) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics.An_accessibility_modifier_cannot_be_used_with_a_private_identifier);
                         }
                         flags |= ts.modifierToFlag(modifier.kind);
                         break;
-                    case 123:
+                    case 124:
                         if (flags & 32) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "static");
                         }
@@ -66824,32 +71590,32 @@ var ts;
                         else if (flags & 256) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "async");
                         }
-                        else if (node.parent.kind === 257 || node.parent.kind === 297) {
+                        else if (node.parent.kind === 261 || node.parent.kind === 303) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_module_or_namespace_element, "static");
                         }
-                        else if (node.kind === 160) {
+                        else if (node.kind === 163) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "static");
                         }
                         else if (flags & 128) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "static", "abstract");
                         }
-                        else if (ts.isPrivateIdentifierPropertyDeclaration(node)) {
-                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "static");
+                        else if (flags & 16384) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "static", "override");
                         }
                         flags |= 32;
                         lastStatic = modifier;
                         break;
-                    case 142:
+                    case 144:
                         if (flags & 64) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "readonly");
                         }
-                        else if (node.kind !== 163 && node.kind !== 162 && node.kind !== 171 && node.kind !== 160) {
+                        else if (node.kind !== 166 && node.kind !== 165 && node.kind !== 175 && node.kind !== 163) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics.readonly_modifier_can_only_appear_on_a_property_declaration_or_index_signature);
                         }
                         flags |= 64;
                         lastReadonly = modifier;
                         break;
-                    case 92:
+                    case 93:
                         if (flags & 1) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "export");
                         }
@@ -66865,53 +71631,59 @@ var ts;
                         else if (ts.isClassLike(node.parent)) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "export");
                         }
-                        else if (node.kind === 160) {
+                        else if (node.kind === 163) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "export");
                         }
                         flags |= 1;
                         break;
-                    case 87:
-                        var container = node.parent.kind === 297 ? node.parent : node.parent.parent;
-                        if (container.kind === 256 && !ts.isAmbientModule(container)) {
+                    case 88:
+                        var container = node.parent.kind === 303 ? node.parent : node.parent.parent;
+                        if (container.kind === 260 && !ts.isAmbientModule(container)) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics.A_default_export_can_only_be_used_in_an_ECMAScript_style_module);
                         }
+                        else if (!(flags & 1)) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "export", "default");
+                        }
                         flags |= 512;
                         break;
-                    case 133:
+                    case 135:
                         if (flags & 2) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "declare");
                         }
                         else if (flags & 256) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
                         }
+                        else if (flags & 16384) {
+                            return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "override");
+                        }
                         else if (ts.isClassLike(node.parent) && !ts.isPropertyDeclaration(node)) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_class_elements_of_this_kind, "declare");
                         }
-                        else if (node.kind === 160) {
+                        else if (node.kind === 163) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "declare");
                         }
-                        else if ((node.parent.flags & 8388608) && node.parent.kind === 257) {
+                        else if ((node.parent.flags & 8388608) && node.parent.kind === 261) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);
                         }
-                        else if (ts.isPrivateIdentifierPropertyDeclaration(node)) {
+                        else if (ts.isPrivateIdentifierClassElementDeclaration(node)) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "declare");
                         }
                         flags |= 2;
                         lastDeclare = modifier;
                         break;
-                    case 125:
+                    case 126:
                         if (flags & 128) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "abstract");
                         }
-                        if (node.kind !== 252 &&
-                            node.kind !== 175) {
-                            if (node.kind !== 165 &&
-                                node.kind !== 163 &&
-                                node.kind !== 167 &&
-                                node.kind !== 168) {
+                        if (node.kind !== 256 &&
+                            node.kind !== 179) {
+                            if (node.kind !== 168 &&
+                                node.kind !== 166 &&
+                                node.kind !== 171 &&
+                                node.kind !== 172) {
                                 return grammarErrorOnNode(modifier, ts.Diagnostics.abstract_modifier_can_only_appear_on_a_class_method_or_property_declaration);
                             }
-                            if (!(node.parent.kind === 252 && ts.hasSyntacticModifier(node.parent, 128))) {
+                            if (!(node.parent.kind === 256 && ts.hasSyntacticModifier(node.parent, 128))) {
                                 return grammarErrorOnNode(modifier, ts.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);
                             }
                             if (flags & 32) {
@@ -66923,20 +71695,23 @@ var ts;
                             if (flags & 256 && lastAsync) {
                                 return grammarErrorOnNode(lastAsync, ts.Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract");
                             }
+                            if (flags & 16384) {
+                                return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_must_precede_1_modifier, "abstract", "override");
+                            }
                         }
-                        if (ts.isNamedDeclaration(node) && node.name.kind === 79) {
+                        if (ts.isNamedDeclaration(node) && node.name.kind === 80) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract");
                         }
                         flags |= 128;
                         break;
-                    case 129:
+                    case 131:
                         if (flags & 256) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_already_seen, "async");
                         }
                         else if (flags & 2 || node.parent.flags & 8388608) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async");
                         }
-                        else if (node.kind === 160) {
+                        else if (node.kind === 163) {
                             return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async");
                         }
                         if (flags & 128) {
@@ -66947,13 +71722,16 @@ var ts;
                         break;
                 }
             }
-            if (node.kind === 166) {
+            if (node.kind === 170) {
                 if (flags & 32) {
                     return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "static");
                 }
                 if (flags & 128) {
                     return grammarErrorOnNode(lastStatic, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "abstract");
                 }
+                if (flags & 16384) {
+                    return grammarErrorOnNode(lastOverride, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "override");
+                }
                 else if (flags & 256) {
                     return grammarErrorOnNode(lastAsync, ts.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration, "async");
                 }
@@ -66962,13 +71740,13 @@ var ts;
                 }
                 return false;
             }
-            else if ((node.kind === 261 || node.kind === 260) && flags & 2) {
+            else if ((node.kind === 265 || node.kind === 264) && flags & 2) {
                 return grammarErrorOnNode(lastDeclare, ts.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration, "declare");
             }
-            else if (node.kind === 160 && (flags & 92) && ts.isBindingPattern(node.name)) {
+            else if (node.kind === 163 && (flags & 16476) && ts.isBindingPattern(node.name)) {
                 return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_may_not_be_declared_using_a_binding_pattern);
             }
-            else if (node.kind === 160 && (flags & 92) && node.dotDotDotToken) {
+            else if (node.kind === 163 && (flags & 16476) && node.dotDotDotToken) {
                 return grammarErrorOnNode(node, ts.Diagnostics.A_parameter_property_cannot_be_declared_using_a_rest_parameter);
             }
             if (flags & 256) {
@@ -66985,39 +71763,40 @@ var ts;
         }
         function shouldReportBadModifier(node) {
             switch (node.kind) {
-                case 167:
-                case 168:
+                case 171:
+                case 172:
+                case 170:
                 case 166:
-                case 163:
-                case 162:
                 case 165:
-                case 164:
-                case 171:
-                case 256:
-                case 261:
+                case 168:
+                case 167:
+                case 175:
                 case 260:
-                case 267:
-                case 266:
-                case 208:
-                case 209:
-                case 160:
+                case 265:
+                case 264:
+                case 271:
+                case 270:
+                case 212:
+                case 213:
+                case 163:
                     return false;
                 default:
-                    if (node.parent.kind === 257 || node.parent.kind === 297) {
+                    if (node.parent.kind === 261 || node.parent.kind === 303) {
                         return false;
                     }
                     switch (node.kind) {
-                        case 251:
-                            return nodeHasAnyModifiersExcept(node, 129);
-                        case 252:
-                        case 175:
-                            return nodeHasAnyModifiersExcept(node, 125);
-                        case 253:
-                        case 232:
-                        case 254:
-                            return true;
                         case 255:
-                            return nodeHasAnyModifiersExcept(node, 84);
+                            return nodeHasAnyModifiersExcept(node, 131);
+                        case 256:
+                        case 179:
+                            return nodeHasAnyModifiersExcept(node, 126);
+                        case 257:
+                        case 236:
+                        case 258:
+                        case 169:
+                            return true;
+                        case 259:
+                            return nodeHasAnyModifiersExcept(node, 85);
                         default:
                             ts.Debug.fail();
                     }
@@ -67028,10 +71807,10 @@ var ts;
         }
         function checkGrammarAsyncModifier(node, asyncModifier) {
             switch (node.kind) {
-                case 165:
-                case 251:
-                case 208:
-                case 209:
+                case 168:
+                case 255:
+                case 212:
+                case 213:
                     return false;
             }
             return grammarErrorOnNode(asyncModifier, ts.Diagnostics._0_modifier_cannot_be_used_here, "async");
@@ -67094,7 +71873,7 @@ var ts;
                             ts.addRelatedInfo(error(parameter, ts.Diagnostics.This_parameter_is_not_allowed_with_use_strict_directive), ts.createDiagnosticForNode(useStrictDirective_1, ts.Diagnostics.use_strict_directive_used_here));
                         });
                         var diagnostics_2 = nonSimpleParameters.map(function (parameter, index) { return (index === 0 ? ts.createDiagnosticForNode(parameter, ts.Diagnostics.Non_simple_parameter_declared_here) : ts.createDiagnosticForNode(parameter, ts.Diagnostics.and_here)); });
-                        ts.addRelatedInfo.apply(void 0, __spreadArray([error(useStrictDirective_1, ts.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)], diagnostics_2));
+                        ts.addRelatedInfo.apply(void 0, __spreadArray([error(useStrictDirective_1, ts.Diagnostics.use_strict_directive_cannot_be_used_with_non_simple_parameter_list)], diagnostics_2, false));
                         return true;
                     }
                 }
@@ -67118,6 +71897,11 @@ var ts;
             if (!ts.isArrowFunction(node)) {
                 return false;
             }
+            if (node.typeParameters && !(ts.length(node.typeParameters) > 1 || node.typeParameters.hasTrailingComma || node.typeParameters[0].constraint)) {
+                if (file && ts.fileExtensionIsOneOf(file.fileName, [".mts", ".cts"])) {
+                    grammarErrorOnNode(node.typeParameters[0], ts.Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Add_a_trailing_comma_or_explicit_constraint);
+                }
+            }
             var equalsGreaterThanToken = node.equalsGreaterThanToken;
             var startLine = ts.getLineAndCharacterOfPosition(file, equalsGreaterThanToken.pos).line;
             var endLine = ts.getLineAndCharacterOfPosition(file, equalsGreaterThanToken.end).line;
@@ -67149,15 +71933,12 @@ var ts;
             if (!parameter.type) {
                 return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation);
             }
-            if (parameter.type.kind !== 147 && parameter.type.kind !== 144) {
-                var type = getTypeFromTypeNode(parameter.type);
-                if (type.flags & 4 || type.flags & 8) {
-                    return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_type_alias_Consider_writing_0_Colon_1_Colon_2_instead, ts.getTextOfNode(parameter.name), typeToString(type), typeToString(node.type ? getTypeFromTypeNode(node.type) : anyType));
-                }
-                if (type.flags & 1048576 && allTypesAssignableToKind(type, 384, true)) {
-                    return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_union_type_Consider_using_a_mapped_object_type_instead);
-                }
-                return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_either_string_or_number);
+            var type = getTypeFromTypeNode(parameter.type);
+            if (someType(type, function (t) { return !!(t.flags & 8576); }) || isGenericType(type)) {
+                return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead);
+            }
+            if (!everyType(type, isValidIndexKeyType)) {
+                return grammarErrorOnNode(parameter.name, ts.Diagnostics.An_index_signature_parameter_type_must_be_string_number_symbol_or_a_template_literal_type);
             }
             if (!node.type) {
                 return grammarErrorOnNode(node, ts.Diagnostics.An_index_signature_must_have_a_type_annotation);
@@ -67190,7 +71971,7 @@ var ts;
             if (args) {
                 for (var _i = 0, args_4 = args; _i < args_4.length; _i++) {
                     var arg = args_4[_i];
-                    if (arg.kind === 222) {
+                    if (arg.kind === 226) {
                         return grammarErrorAtPos(arg, arg.pos, 0, ts.Diagnostics.Argument_expression_expected);
                     }
                 }
@@ -67220,7 +72001,7 @@ var ts;
             if (!checkGrammarDecoratorsAndModifiers(node) && node.heritageClauses) {
                 for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) {
                     var heritageClause = _a[_i];
-                    if (heritageClause.token === 93) {
+                    if (heritageClause.token === 94) {
                         if (seenExtendsClause) {
                             return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen);
                         }
@@ -67233,7 +72014,7 @@ var ts;
                         seenExtendsClause = true;
                     }
                     else {
-                        ts.Debug.assert(heritageClause.token === 116);
+                        ts.Debug.assert(heritageClause.token === 117);
                         if (seenImplementsClause) {
                             return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.implements_clause_already_seen);
                         }
@@ -67248,14 +72029,14 @@ var ts;
             if (node.heritageClauses) {
                 for (var _i = 0, _a = node.heritageClauses; _i < _a.length; _i++) {
                     var heritageClause = _a[_i];
-                    if (heritageClause.token === 93) {
+                    if (heritageClause.token === 94) {
                         if (seenExtendsClause) {
                             return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.extends_clause_already_seen);
                         }
                         seenExtendsClause = true;
                     }
                     else {
-                        ts.Debug.assert(heritageClause.token === 116);
+                        ts.Debug.assert(heritageClause.token === 117);
                         return grammarErrorOnFirstToken(heritageClause, ts.Diagnostics.Interface_declaration_cannot_have_implements_clause);
                     }
                     checkGrammarHeritageClause(heritageClause);
@@ -67264,20 +72045,20 @@ var ts;
             return false;
         }
         function checkGrammarComputedPropertyName(node) {
-            if (node.kind !== 158) {
+            if (node.kind !== 161) {
                 return false;
             }
             var computedPropertyName = node;
-            if (computedPropertyName.expression.kind === 216 && computedPropertyName.expression.operatorToken.kind === 27) {
+            if (computedPropertyName.expression.kind === 220 && computedPropertyName.expression.operatorToken.kind === 27) {
                 return grammarErrorOnNode(computedPropertyName.expression, ts.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name);
             }
             return false;
         }
         function checkGrammarForGenerator(node) {
             if (node.asteriskToken) {
-                ts.Debug.assert(node.kind === 251 ||
-                    node.kind === 208 ||
-                    node.kind === 165);
+                ts.Debug.assert(node.kind === 255 ||
+                    node.kind === 212 ||
+                    node.kind === 168);
                 if (node.flags & 8388608) {
                     return grammarErrorOnNode(node.asteriskToken, ts.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);
                 }
@@ -67296,7 +72077,7 @@ var ts;
             var seen = new ts.Map();
             for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
                 var prop = _a[_i];
-                if (prop.kind === 290) {
+                if (prop.kind === 296) {
                     if (inDestructuring) {
                         var expression = ts.skipParentheses(prop.expression);
                         if (ts.isArrayLiteralExpression(expression) || ts.isObjectLiteralExpression(expression)) {
@@ -67306,41 +72087,41 @@ var ts;
                     continue;
                 }
                 var name = prop.name;
-                if (name.kind === 158) {
+                if (name.kind === 161) {
                     checkGrammarComputedPropertyName(name);
                 }
-                if (prop.kind === 289 && !inDestructuring && prop.objectAssignmentInitializer) {
+                if (prop.kind === 295 && !inDestructuring && prop.objectAssignmentInitializer) {
                     return grammarErrorOnNode(prop.equalsToken, ts.Diagnostics.Did_you_mean_to_use_a_Colon_An_can_only_follow_a_property_name_when_the_containing_object_literal_is_part_of_a_destructuring_pattern);
                 }
-                if (name.kind === 79) {
-                    return grammarErrorOnNode(name, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
+                if (name.kind === 80) {
+                    grammarErrorOnNode(name, ts.Diagnostics.Private_identifiers_are_not_allowed_outside_class_bodies);
                 }
                 if (prop.modifiers) {
                     for (var _b = 0, _c = prop.modifiers; _b < _c.length; _b++) {
                         var mod = _c[_b];
-                        if (mod.kind !== 129 || prop.kind !== 165) {
+                        if (mod.kind !== 131 || prop.kind !== 168) {
                             grammarErrorOnNode(mod, ts.Diagnostics._0_modifier_cannot_be_used_here, ts.getTextOfNode(mod));
                         }
                     }
                 }
                 var currentKind = void 0;
                 switch (prop.kind) {
-                    case 289:
+                    case 295:
                         checkGrammarForInvalidExclamationToken(prop.exclamationToken, ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context);
-                    case 288:
+                    case 294:
                         checkGrammarForInvalidQuestionMark(prop.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional);
                         if (name.kind === 8) {
                             checkGrammarNumericLiteral(name);
                         }
                         currentKind = 4;
                         break;
-                    case 165:
+                    case 168:
                         currentKind = 8;
                         break;
-                    case 167:
+                    case 171:
                         currentKind = 1;
                         break;
-                    case 168:
+                    case 172:
                         currentKind = 2;
                         break;
                     default:
@@ -67375,11 +72156,12 @@ var ts;
             }
         }
         function checkGrammarJsxElement(node) {
+            checkGrammarJsxName(node.tagName);
             checkGrammarTypeArguments(node, node.typeArguments);
             var seen = new ts.Map();
             for (var _i = 0, _a = node.attributes.properties; _i < _a.length; _i++) {
                 var attr = _a[_i];
-                if (attr.kind === 282) {
+                if (attr.kind === 286) {
                     continue;
                 }
                 var name = attr.name, initializer = attr.initializer;
@@ -67389,11 +72171,32 @@ var ts;
                 else {
                     return grammarErrorOnNode(name, ts.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
                 }
-                if (initializer && initializer.kind === 283 && !initializer.expression) {
+                if (initializer && initializer.kind === 287 && !initializer.expression) {
                     return grammarErrorOnNode(initializer, ts.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression);
                 }
             }
         }
+        function checkGrammarJsxName(node) {
+            if (ts.isPropertyAccessExpression(node)) {
+                var propName = node;
+                do {
+                    var check_1 = checkGrammarJsxNestedIdentifier(propName.name);
+                    if (check_1) {
+                        return check_1;
+                    }
+                    propName = propName.expression;
+                } while (ts.isPropertyAccessExpression(propName));
+                var check = checkGrammarJsxNestedIdentifier(propName);
+                if (check) {
+                    return check;
+                }
+            }
+            function checkGrammarJsxNestedIdentifier(name) {
+                if (ts.isIdentifier(name) && ts.idText(name).indexOf(":") !== -1) {
+                    return grammarErrorOnNode(name, ts.Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names);
+                }
+            }
+        }
         function checkGrammarJsxExpression(node) {
             if (node.expression && ts.isCommaSequence(node.expression)) {
                 return grammarErrorOnNode(node.expression, ts.Diagnostics.JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array);
@@ -67403,7 +72206,7 @@ var ts;
             if (checkGrammarStatementInAmbientContext(forInOrOfStatement)) {
                 return true;
             }
-            if (forInOrOfStatement.kind === 239 && forInOrOfStatement.awaitModifier) {
+            if (forInOrOfStatement.kind === 243 && forInOrOfStatement.awaitModifier) {
                 if (!(forInOrOfStatement.flags & 32768)) {
                     var sourceFile = ts.getSourceFileOfNode(forInOrOfStatement);
                     if (ts.isInTopLevelContext(forInOrOfStatement)) {
@@ -67411,8 +72214,8 @@ var ts;
                             if (!ts.isEffectiveExternalModule(sourceFile, compilerOptions)) {
                                 diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.for_await_loops_are_only_allowed_at_the_top_level_of_a_file_when_that_file_is_a_module_but_this_file_has_no_imports_or_exports_Consider_adding_an_empty_export_to_make_this_file_a_module));
                             }
-                            if ((moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System) || languageVersion < 4) {
-                                diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_esnext_or_system_and_the_target_option_is_set_to_es2017_or_higher));
+                            if ((moduleKind !== ts.ModuleKind.ES2022 && moduleKind !== ts.ModuleKind.ESNext && moduleKind !== ts.ModuleKind.System && !(moduleKind === ts.ModuleKind.NodeNext && ts.getSourceFileOfNode(forInOrOfStatement).impliedNodeFormat === ts.ModuleKind.ESNext)) || languageVersion < 4) {
+                                diagnostics.add(ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.Top_level_for_await_loops_are_only_allowed_when_the_module_option_is_set_to_es2022_esnext_system_or_nodenext_and_the_target_option_is_set_to_es2017_or_higher));
                             }
                         }
                     }
@@ -67420,7 +72223,7 @@ var ts;
                         if (!hasParseDiagnostics(sourceFile)) {
                             var diagnostic = ts.createDiagnosticForNode(forInOrOfStatement.awaitModifier, ts.Diagnostics.for_await_loops_are_only_allowed_within_async_functions_and_at_the_top_levels_of_modules);
                             var func = ts.getContainingFunction(forInOrOfStatement);
-                            if (func && func.kind !== 166) {
+                            if (func && func.kind !== 170) {
                                 ts.Debug.assert((ts.getFunctionFlags(func) & 2) === 0, "Enclosing function should never be an async function.");
                                 var relatedInfo = ts.createDiagnosticForNode(func, ts.Diagnostics.Did_you_mean_to_mark_this_function_as_async);
                                 ts.addRelatedInfo(diagnostic, relatedInfo);
@@ -67432,7 +72235,12 @@ var ts;
                     return false;
                 }
             }
-            if (forInOrOfStatement.initializer.kind === 250) {
+            if (ts.isForOfStatement(forInOrOfStatement) && !(forInOrOfStatement.flags & 32768) &&
+                ts.isIdentifier(forInOrOfStatement.initializer) && forInOrOfStatement.initializer.escapedText === "async") {
+                grammarErrorOnNode(forInOrOfStatement.initializer, ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_may_not_be_async);
+                return false;
+            }
+            if (forInOrOfStatement.initializer.kind === 254) {
                 var variableList = forInOrOfStatement.initializer;
                 if (!checkGrammarVariableDeclarationList(variableList)) {
                     var declarations = variableList.declarations;
@@ -67440,20 +72248,20 @@ var ts;
                         return false;
                     }
                     if (declarations.length > 1) {
-                        var diagnostic = forInOrOfStatement.kind === 238
+                        var diagnostic = forInOrOfStatement.kind === 242
                             ? ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement
                             : ts.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;
                         return grammarErrorOnFirstToken(variableList.declarations[1], diagnostic);
                     }
                     var firstDeclaration = declarations[0];
                     if (firstDeclaration.initializer) {
-                        var diagnostic = forInOrOfStatement.kind === 238
+                        var diagnostic = forInOrOfStatement.kind === 242
                             ? ts.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer
                             : ts.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;
                         return grammarErrorOnNode(firstDeclaration.name, diagnostic);
                     }
                     if (firstDeclaration.type) {
-                        var diagnostic = forInOrOfStatement.kind === 238
+                        var diagnostic = forInOrOfStatement.kind === 242
                             ? ts.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation
                             : ts.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;
                         return grammarErrorOnNode(firstDeclaration, diagnostic);
@@ -67463,26 +72271,34 @@ var ts;
             return false;
         }
         function checkGrammarAccessor(accessor) {
-            if (!(accessor.flags & 8388608)) {
+            if (!(accessor.flags & 8388608) && (accessor.parent.kind !== 181) && (accessor.parent.kind !== 257)) {
                 if (languageVersion < 1) {
                     return grammarErrorOnNode(accessor.name, ts.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);
                 }
+                if (languageVersion < 2 && ts.isPrivateIdentifier(accessor.name)) {
+                    return grammarErrorOnNode(accessor.name, ts.Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
+                }
                 if (accessor.body === undefined && !ts.hasSyntacticModifier(accessor, 128)) {
                     return grammarErrorAtPos(accessor, accessor.end - 1, ";".length, ts.Diagnostics._0_expected, "{");
                 }
             }
-            if (accessor.body && ts.hasSyntacticModifier(accessor, 128)) {
-                return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+            if (accessor.body) {
+                if (ts.hasSyntacticModifier(accessor, 128)) {
+                    return grammarErrorOnNode(accessor, ts.Diagnostics.An_abstract_accessor_cannot_have_an_implementation);
+                }
+                if (accessor.parent.kind === 181 || accessor.parent.kind === 257) {
+                    return grammarErrorOnNode(accessor.body, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
+                }
             }
             if (accessor.typeParameters) {
                 return grammarErrorOnNode(accessor.name, ts.Diagnostics.An_accessor_cannot_have_type_parameters);
             }
             if (!doesAccessorHaveCorrectParameterCount(accessor)) {
-                return grammarErrorOnNode(accessor.name, accessor.kind === 167 ?
+                return grammarErrorOnNode(accessor.name, accessor.kind === 171 ?
                     ts.Diagnostics.A_get_accessor_cannot_have_parameters :
                     ts.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);
             }
-            if (accessor.kind === 168) {
+            if (accessor.kind === 172) {
                 if (accessor.type) {
                     return grammarErrorOnNode(accessor.name, ts.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);
                 }
@@ -67500,17 +72316,17 @@ var ts;
             return false;
         }
         function doesAccessorHaveCorrectParameterCount(accessor) {
-            return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 167 ? 0 : 1);
+            return getAccessorThisParameter(accessor) || accessor.parameters.length === (accessor.kind === 171 ? 0 : 1);
         }
         function getAccessorThisParameter(accessor) {
-            if (accessor.parameters.length === (accessor.kind === 167 ? 1 : 2)) {
+            if (accessor.parameters.length === (accessor.kind === 171 ? 1 : 2)) {
                 return ts.getThisParameter(accessor);
             }
         }
         function checkGrammarTypeOperatorNode(node) {
-            if (node.operator === 151) {
-                if (node.type.kind !== 148) {
-                    return grammarErrorOnNode(node.type, ts.Diagnostics._0_expected, ts.tokenToString(148));
+            if (node.operator === 153) {
+                if (node.type.kind !== 150) {
+                    return grammarErrorOnNode(node.type, ts.Diagnostics._0_expected, ts.tokenToString(150));
                 }
                 var parent = ts.walkUpParenthesizedTypes(node.parent);
                 if (ts.isInJSFile(parent) && ts.isJSDocTypeExpression(parent)) {
@@ -67520,9 +72336,9 @@ var ts;
                     }
                 }
                 switch (parent.kind) {
-                    case 249:
+                    case 253:
                         var decl = parent;
-                        if (decl.name.kind !== 78) {
+                        if (decl.name.kind !== 79) {
                             return grammarErrorOnNode(node, ts.Diagnostics.unique_symbol_types_may_not_be_used_on_a_variable_declaration_with_a_binding_name);
                         }
                         if (!ts.isVariableDeclarationInVariableStatement(decl)) {
@@ -67532,13 +72348,13 @@ var ts;
                             return grammarErrorOnNode(parent.name, ts.Diagnostics.A_variable_whose_type_is_a_unique_symbol_type_must_be_const);
                         }
                         break;
-                    case 163:
-                        if (!ts.hasSyntacticModifier(parent, 32) ||
-                            !ts.hasEffectiveModifier(parent, 64)) {
+                    case 166:
+                        if (!ts.isStatic(parent) ||
+                            !ts.hasEffectiveReadonlyModifier(parent)) {
                             return grammarErrorOnNode(parent.name, ts.Diagnostics.A_property_of_a_class_whose_type_is_a_unique_symbol_type_must_be_both_static_and_readonly);
                         }
                         break;
-                    case 162:
+                    case 165:
                         if (!ts.hasSyntacticModifier(parent, 64)) {
                             return grammarErrorOnNode(parent.name, ts.Diagnostics.A_property_of_an_interface_or_type_literal_whose_type_is_a_unique_symbol_type_must_be_readonly);
                         }
@@ -67547,9 +72363,9 @@ var ts;
                         return grammarErrorOnNode(node, ts.Diagnostics.unique_symbol_types_are_not_allowed_here);
                 }
             }
-            else if (node.operator === 142) {
-                if (node.type.kind !== 178 && node.type.kind !== 179) {
-                    return grammarErrorOnFirstToken(node, ts.Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, ts.tokenToString(148));
+            else if (node.operator === 144) {
+                if (node.type.kind !== 182 && node.type.kind !== 183) {
+                    return grammarErrorOnFirstToken(node, ts.Diagnostics.readonly_type_modifier_is_only_permitted_on_array_and_tuple_literal_types, ts.tokenToString(150));
                 }
             }
         }
@@ -67562,9 +72378,9 @@ var ts;
             if (checkGrammarFunctionLikeDeclaration(node)) {
                 return true;
             }
-            if (node.kind === 165) {
-                if (node.parent.kind === 200) {
-                    if (node.modifiers && !(node.modifiers.length === 1 && ts.first(node.modifiers).kind === 129)) {
+            if (node.kind === 168) {
+                if (node.parent.kind === 204) {
+                    if (node.modifiers && !(node.modifiers.length === 1 && ts.first(node.modifiers).kind === 131)) {
                         return grammarErrorOnFirstToken(node, ts.Diagnostics.Modifiers_cannot_appear_here);
                     }
                     else if (checkGrammarForInvalidQuestionMark(node.questionToken, ts.Diagnostics.An_object_member_cannot_be_declared_optional)) {
@@ -67582,30 +72398,33 @@ var ts;
                 }
             }
             if (ts.isClassLike(node.parent)) {
+                if (languageVersion < 2 && ts.isPrivateIdentifier(node.name)) {
+                    return grammarErrorOnNode(node.name, ts.Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
+                }
                 if (node.flags & 8388608) {
                     return checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_an_ambient_context_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);
                 }
-                else if (node.kind === 165 && !node.body) {
+                else if (node.kind === 168 && !node.body) {
                     return checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_method_overload_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);
                 }
             }
-            else if (node.parent.kind === 253) {
+            else if (node.parent.kind === 257) {
                 return checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);
             }
-            else if (node.parent.kind === 177) {
+            else if (node.parent.kind === 181) {
                 return checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type);
             }
         }
         function checkGrammarBreakOrContinueStatement(node) {
             var current = node;
             while (current) {
-                if (ts.isFunctionLike(current)) {
+                if (ts.isFunctionLikeOrClassStaticBlockDeclaration(current)) {
                     return grammarErrorOnNode(node, ts.Diagnostics.Jump_target_cannot_cross_function_boundary);
                 }
                 switch (current.kind) {
-                    case 245:
+                    case 249:
                         if (node.label && current.label.escapedText === node.label.escapedText) {
-                            var isMisplacedContinueLabel = node.kind === 240
+                            var isMisplacedContinueLabel = node.kind === 244
                                 && !ts.isIterationStatement(current.statement, true);
                             if (isMisplacedContinueLabel) {
                                 return grammarErrorOnNode(node, ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement);
@@ -67613,8 +72432,8 @@ var ts;
                             return false;
                         }
                         break;
-                    case 244:
-                        if (node.kind === 241 && !node.label) {
+                    case 248:
+                        if (node.kind === 245 && !node.label) {
                             return false;
                         }
                         break;
@@ -67627,13 +72446,13 @@ var ts;
                 current = current.parent;
             }
             if (node.label) {
-                var message = node.kind === 241
+                var message = node.kind === 245
                     ? ts.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement
                     : ts.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;
                 return grammarErrorOnNode(node, message);
             }
             else {
-                var message = node.kind === 241
+                var message = node.kind === 245
                     ? ts.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement
                     : ts.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;
                 return grammarErrorOnNode(node, message);
@@ -67656,12 +72475,12 @@ var ts;
         }
         function isStringOrNumberLiteralExpression(expr) {
             return ts.isStringOrNumericLiteralLike(expr) ||
-                expr.kind === 214 && expr.operator === 40 &&
+                expr.kind === 218 && expr.operator === 40 &&
                     expr.operand.kind === 8;
         }
         function isBigIntLiteralExpression(expr) {
             return expr.kind === 9 ||
-                expr.kind === 214 && expr.operator === 40 &&
+                expr.kind === 218 && expr.operator === 40 &&
                     expr.operand.kind === 9;
         }
         function isSimpleLiteralEnumReference(expr) {
@@ -67675,7 +72494,7 @@ var ts;
             if (initializer) {
                 var isInvalidInitializer = !(isStringOrNumberLiteralExpression(initializer) ||
                     isSimpleLiteralEnumReference(initializer) ||
-                    initializer.kind === 109 || initializer.kind === 94 ||
+                    initializer.kind === 110 || initializer.kind === 95 ||
                     isBigIntLiteralExpression(initializer));
                 var isConstOrReadonly = ts.isDeclarationReadonly(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node);
                 if (isConstOrReadonly && !node.type) {
@@ -67692,7 +72511,7 @@ var ts;
             }
         }
         function checkGrammarVariableDeclaration(node) {
-            if (node.parent.parent.kind !== 238 && node.parent.parent.kind !== 239) {
+            if (node.parent.parent.kind !== 242 && node.parent.parent.kind !== 243) {
                 if (node.flags & 8388608) {
                     checkAmbientInitializer(node);
                 }
@@ -67705,7 +72524,7 @@ var ts;
                     }
                 }
             }
-            if (node.exclamationToken && (node.parent.parent.kind !== 232 || !node.type || node.initializer || node.flags & 8388608)) {
+            if (node.exclamationToken && (node.parent.parent.kind !== 236 || !node.type || node.initializer || node.flags & 8388608)) {
                 var message = node.initializer
                     ? ts.Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions
                     : !node.type
@@ -67713,8 +72532,7 @@ var ts;
                         : ts.Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context;
                 return grammarErrorOnNode(node.exclamationToken, message);
             }
-            var moduleKind = ts.getEmitModuleKind(compilerOptions);
-            if (moduleKind < ts.ModuleKind.ES2015 && moduleKind !== ts.ModuleKind.System &&
+            if ((moduleKind < ts.ModuleKind.ES2015 || ts.getSourceFileOfNode(node).impliedNodeFormat === ts.ModuleKind.CommonJS) && moduleKind !== ts.ModuleKind.System &&
                 !(node.parent.parent.flags & 8388608) && ts.hasSyntacticModifier(node.parent.parent, 1)) {
                 checkESModuleMarker(node.name);
             }
@@ -67722,7 +72540,7 @@ var ts;
             return checkLetConstNames && checkGrammarNameInLetOrConstDeclarations(node.name);
         }
         function checkESModuleMarker(name) {
-            if (name.kind === 78) {
+            if (name.kind === 79) {
                 if (ts.idText(name) === "__esModule") {
                     return grammarErrorOnNodeSkippedOn("noEmit", name, ts.Diagnostics.Identifier_expected_esModule_is_reserved_as_an_exported_marker_when_transforming_ECMAScript_modules);
                 }
@@ -67739,8 +72557,8 @@ var ts;
             return false;
         }
         function checkGrammarNameInLetOrConstDeclarations(name) {
-            if (name.kind === 78) {
-                if (name.originalKeywordKind === 118) {
+            if (name.kind === 79) {
+                if (name.originalKeywordKind === 119) {
                     return grammarErrorOnNode(name, ts.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations);
                 }
             }
@@ -67767,15 +72585,15 @@ var ts;
         }
         function allowLetAndConstDeclarations(parent) {
             switch (parent.kind) {
-                case 234:
-                case 235:
-                case 236:
-                case 243:
-                case 237:
                 case 238:
                 case 239:
+                case 240:
+                case 247:
+                case 241:
+                case 242:
+                case 243:
                     return false;
-                case 245:
+                case 249:
                     return allowLetAndConstDeclarations(parent.parent);
             }
             return true;
@@ -67793,12 +72611,12 @@ var ts;
         function checkGrammarMetaProperty(node) {
             var escapedText = node.name.escapedText;
             switch (node.keywordToken) {
-                case 102:
+                case 103:
                     if (escapedText !== "target") {
                         return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, ts.tokenToString(node.keywordToken), "target");
                     }
                     break;
-                case 99:
+                case 100:
                     if (escapedText !== "meta") {
                         return grammarErrorOnNode(node.name, ts.Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.escapedText, ts.tokenToString(node.keywordToken), "meta");
                     }
@@ -67856,18 +72674,21 @@ var ts;
             }
         }
         function checkGrammarProperty(node) {
+            if (ts.isComputedPropertyName(node.name) && ts.isBinaryExpression(node.name.expression) && node.name.expression.operatorToken.kind === 101) {
+                return grammarErrorOnNode(node.parent.members[0], ts.Diagnostics.A_mapped_type_may_not_declare_properties_or_methods);
+            }
             if (ts.isClassLike(node.parent)) {
                 if (ts.isStringLiteral(node.name) && node.name.text === "constructor") {
                     return grammarErrorOnNode(node.name, ts.Diagnostics.Classes_may_not_have_a_field_named_constructor);
                 }
-                if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
+                if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_have_a_simple_literal_type_or_a_unique_symbol_type)) {
                     return true;
                 }
                 if (languageVersion < 2 && ts.isPrivateIdentifier(node.name)) {
                     return grammarErrorOnNode(node.name, ts.Diagnostics.Private_identifiers_are_only_available_when_targeting_ECMAScript_2015_and_higher);
                 }
             }
-            else if (node.parent.kind === 253) {
+            else if (node.parent.kind === 257) {
                 if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_an_interface_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
                     return true;
                 }
@@ -67875,7 +72696,7 @@ var ts;
                     return grammarErrorOnNode(node.initializer, ts.Diagnostics.An_interface_property_cannot_have_an_initializer);
                 }
             }
-            else if (node.parent.kind === 177) {
+            else if (ts.isTypeLiteralNode(node.parent)) {
                 if (checkGrammarForInvalidDynamicName(node.name, ts.Diagnostics.A_computed_property_name_in_a_type_literal_must_refer_to_an_expression_whose_type_is_a_literal_type_or_a_unique_symbol_type)) {
                     return true;
                 }
@@ -67887,7 +72708,7 @@ var ts;
                 checkAmbientInitializer(node);
             }
             if (ts.isPropertyDeclaration(node) && node.exclamationToken && (!ts.isClassLike(node.parent) || !node.type || node.initializer ||
-                node.flags & 8388608 || ts.hasSyntacticModifier(node, 32 | 128))) {
+                node.flags & 8388608 || ts.isStatic(node) || ts.hasAbstractModifier(node))) {
                 var message = node.initializer
                     ? ts.Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions
                     : !node.type
@@ -67897,13 +72718,13 @@ var ts;
             }
         }
         function checkGrammarTopLevelElementForRequiredDeclareModifier(node) {
-            if (node.kind === 253 ||
-                node.kind === 254 ||
-                node.kind === 261 ||
-                node.kind === 260 ||
-                node.kind === 267 ||
-                node.kind === 266 ||
-                node.kind === 259 ||
+            if (node.kind === 257 ||
+                node.kind === 258 ||
+                node.kind === 265 ||
+                node.kind === 264 ||
+                node.kind === 271 ||
+                node.kind === 270 ||
+                node.kind === 263 ||
                 ts.hasSyntacticModifier(node, 2 | 1 | 512)) {
                 return false;
             }
@@ -67912,7 +72733,7 @@ var ts;
         function checkGrammarTopLevelElementsForRequiredDeclareModifier(file) {
             for (var _i = 0, _a = file.statements; _i < _a.length; _i++) {
                 var decl = _a[_i];
-                if (ts.isDeclaration(decl) || decl.kind === 232) {
+                if (ts.isDeclaration(decl) || decl.kind === 236) {
                     if (checkGrammarTopLevelElementForRequiredDeclareModifier(decl)) {
                         return true;
                     }
@@ -67929,7 +72750,7 @@ var ts;
                 if (!links.hasReportedStatementInAmbientContext && (ts.isFunctionLike(node.parent) || ts.isAccessor(node.parent))) {
                     return getNodeLinks(node).hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);
                 }
-                if (node.parent.kind === 230 || node.parent.kind === 257 || node.parent.kind === 297) {
+                if (node.parent.kind === 234 || node.parent.kind === 261 || node.parent.kind === 303) {
                     var links_2 = getNodeLinks(node.parent);
                     if (!links_2.hasReportedStatementInAmbientContext) {
                         return links_2.hasReportedStatementInAmbientContext = grammarErrorOnFirstToken(node, ts.Diagnostics.Statements_are_not_allowed_in_ambient_contexts);
@@ -67946,10 +72767,10 @@ var ts;
                 if (languageVersion >= 1) {
                     diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
                 }
-                else if (ts.isChildOfNodeWithKind(node, 191)) {
+                else if (ts.isChildOfNodeWithKind(node, 195)) {
                     diagnosticMessage = ts.Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
                 }
-                else if (ts.isChildOfNodeWithKind(node, 291)) {
+                else if (ts.isChildOfNodeWithKind(node, 297)) {
                     diagnosticMessage = ts.Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
                 }
                 if (diagnosticMessage) {
@@ -68004,25 +72825,45 @@ var ts;
             return ambientModulesCache;
         }
         function checkGrammarImportClause(node) {
+            var _a;
             if (node.isTypeOnly && node.name && node.namedBindings) {
                 return grammarErrorOnNode(node, ts.Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both);
             }
+            if (node.isTypeOnly && ((_a = node.namedBindings) === null || _a === void 0 ? void 0 : _a.kind) === 268) {
+                return checkGrammarNamedImportsOrExports(node.namedBindings);
+            }
             return false;
         }
+        function checkGrammarNamedImportsOrExports(namedBindings) {
+            return !!ts.forEach(namedBindings.elements, function (specifier) {
+                if (specifier.isTypeOnly) {
+                    return grammarErrorOnFirstToken(specifier, specifier.kind === 269
+                        ? ts.Diagnostics.The_type_modifier_cannot_be_used_on_a_named_import_when_import_type_is_used_on_its_import_statement
+                        : ts.Diagnostics.The_type_modifier_cannot_be_used_on_a_named_export_when_export_type_is_used_on_its_export_statement);
+                }
+            });
+        }
         function checkGrammarImportCallExpression(node) {
             if (moduleKind === ts.ModuleKind.ES2015) {
-                return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_esnext_commonjs_amd_system_or_umd);
+                return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_are_only_supported_when_the_module_flag_is_set_to_es2020_es2022_esnext_commonjs_amd_system_umd_node12_or_nodenext);
             }
             if (node.typeArguments) {
                 return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_cannot_have_type_arguments);
             }
             var nodeArguments = node.arguments;
-            if (nodeArguments.length !== 1) {
-                return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_import_must_have_one_specifier_as_an_argument);
+            if (moduleKind !== ts.ModuleKind.ESNext) {
+                checkGrammarForDisallowedTrailingComma(nodeArguments);
+                if (nodeArguments.length > 1) {
+                    var assertionArgument = nodeArguments[1];
+                    return grammarErrorOnNode(assertionArgument, ts.Diagnostics.Dynamic_imports_only_support_a_second_argument_when_the_module_option_is_set_to_esnext);
+                }
+            }
+            if (nodeArguments.length === 0 || nodeArguments.length > 2) {
+                return grammarErrorOnNode(node, ts.Diagnostics.Dynamic_imports_can_only_accept_a_module_specifier_and_an_optional_assertion_as_arguments);
             }
-            checkGrammarForDisallowedTrailingComma(nodeArguments);
-            if (ts.isSpreadElement(nodeArguments[0])) {
-                return grammarErrorOnNode(nodeArguments[0], ts.Diagnostics.Specifier_of_dynamic_import_cannot_be_spread_element);
+            var spreadElement = ts.find(nodeArguments, ts.isSpreadElement);
+            if (spreadElement) {
+                return grammarErrorOnNode(spreadElement, ts.Diagnostics.Argument_of_dynamic_import_cannot_be_spread_element);
             }
             return false;
         }
@@ -68044,7 +72885,7 @@ var ts;
             }
         }
         function findBestTypeForObjectLiteral(source, unionTarget) {
-            if (ts.getObjectFlags(source) & 128 && forEachType(unionTarget, isArrayLikeType)) {
+            if (ts.getObjectFlags(source) & 128 && someType(unionTarget, isArrayLikeType)) {
                 return ts.find(unionTarget.types, function (t) { return !isArrayLikeType(t); });
             }
         }
@@ -68091,6 +72932,10 @@ var ts;
         }
         function findMatchingDiscriminantType(source, target, isRelatedTo, skipPartial) {
             if (target.flags & 1048576 && source.flags & (2097152 | 524288)) {
+                var match = getMatchingUnionConstituentForType(target, source);
+                if (match) {
+                    return match;
+                }
                 var sourceProperties = getPropertiesOfType(source);
                 if (sourceProperties) {
                     var sourcePropertiesFiltered = findDiscriminantProperties(sourceProperties, target);
@@ -68107,31 +72952,18 @@ var ts;
         return !ts.isAccessor(declaration);
     }
     function isNotOverload(declaration) {
-        return (declaration.kind !== 251 && declaration.kind !== 165) ||
+        return (declaration.kind !== 255 && declaration.kind !== 168) ||
             !!declaration.body;
     }
     function isDeclarationNameOrImportPropertyName(name) {
         switch (name.parent.kind) {
-            case 265:
-            case 270:
+            case 269:
+            case 274:
                 return ts.isIdentifier(name);
             default:
                 return ts.isDeclarationName(name);
         }
     }
-    function isSomeImportDeclaration(decl) {
-        switch (decl.kind) {
-            case 262:
-            case 260:
-            case 263:
-            case 265:
-                return true;
-            case 78:
-                return decl.parent.kind === 265;
-            default:
-                return false;
-        }
-    }
     var JsxNames;
     (function (JsxNames) {
         JsxNames.JSX = "JSX";
@@ -68162,7 +72994,6 @@ var ts;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
-    var isTypeNodeOrTypeParameterDeclaration = ts.or(ts.isTypeNode, ts.isTypeParameterDeclaration);
     function visitNode(node, visitor, test, lift) {
         if (node === undefined || visitor === undefined) {
             return node;
@@ -68317,6 +73148,21 @@ var ts;
         return updated;
     }
     ts.visitFunctionBody = visitFunctionBody;
+    function visitIterationBody(body, visitor, context) {
+        context.startBlockScope();
+        var updated = visitNode(body, visitor, ts.isStatement, context.factory.liftToBlock);
+        var declarations = context.endBlockScope();
+        if (ts.some(declarations)) {
+            if (ts.isBlock(updated)) {
+                declarations.push.apply(declarations, updated.statements);
+                return context.factory.updateBlock(updated, declarations);
+            }
+            declarations.push(updated);
+            return context.factory.createBlock(declarations);
+        }
+        return updated;
+    }
+    ts.visitIterationBody = visitIterationBody;
     function visitEachChild(node, visitor, context, nodesVisitor, tokenVisitor, nodeVisitor) {
         if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
         if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
@@ -68324,282 +73170,427 @@ var ts;
             return undefined;
         }
         var kind = node.kind;
-        if ((kind > 0 && kind <= 156) || kind === 187) {
+        if ((kind > 0 && kind <= 159) || kind === 191) {
             return node;
         }
         var factory = context.factory;
         switch (kind) {
-            case 78:
-                return factory.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, isTypeNodeOrTypeParameterDeclaration));
-            case 157:
-                return factory.updateQualifiedName(node, nodeVisitor(node.left, visitor, ts.isEntityName), nodeVisitor(node.right, visitor, ts.isIdentifier));
-            case 158:
-                return factory.updateComputedPropertyName(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 159:
-                return factory.updateTypeParameterDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.constraint, visitor, ts.isTypeNode), nodeVisitor(node.default, visitor, ts.isTypeNode));
+            case 79:
+                ts.Debug.type(node);
+                return factory.updateIdentifier(node, nodesVisitor(node.typeArguments, visitor, ts.isTypeNodeOrTypeParameterDeclaration));
             case 160:
-                return factory.updateParameterDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isToken), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateQualifiedName(node, nodeVisitor(node.left, visitor, ts.isEntityName), nodeVisitor(node.right, visitor, ts.isIdentifier));
             case 161:
-                return factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateComputedPropertyName(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 162:
-                return factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
+                ts.Debug.type(node);
+                return factory.updateTypeParameterDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.constraint, visitor, ts.isTypeNode), nodeVisitor(node.default, visitor, ts.isTypeNode));
             case 163:
-                return factory.updatePropertyDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken || node.exclamationToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateParameterDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
             case 164:
-                return factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
+                ts.Debug.type(node);
+                return factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 165:
-                return factory.updateMethodDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+                ts.Debug.type(node);
+                return factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
             case 166:
-                return factory.updateConstructorDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+                ts.Debug.type(node);
+                return factory.updatePropertyDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken || node.exclamationToken, tokenVisitor, ts.isQuestionOrExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
             case 167:
-                return factory.updateGetAccessorDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+                ts.Debug.type(node);
+                return factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
             case 168:
+                ts.Debug.type(node);
+                return factory.updateMethodDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+            case 170:
+                ts.Debug.type(node);
+                return factory.updateConstructorDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+            case 171:
+                ts.Debug.type(node);
+                return factory.updateGetAccessorDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+            case 172:
+                ts.Debug.type(node);
                 return factory.updateSetAccessorDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), visitParameterList(node.parameters, visitor, context, nodesVisitor), visitFunctionBody(node.body, visitor, context, nodeVisitor));
             case 169:
+                ts.Debug.type(node);
+                context.startLexicalEnvironment();
+                context.suspendLexicalEnvironment();
+                return factory.updateClassStaticBlockDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+            case 173:
+                ts.Debug.type(node);
                 return factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 170:
+            case 174:
+                ts.Debug.type(node);
                 return factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 171:
+            case 175:
+                ts.Debug.type(node);
                 return factory.updateIndexSignature(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 172:
-                return factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor), nodeVisitor(node.parameterName, visitor), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 173:
+            case 176:
+                ts.Debug.type(node);
+                return factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor, ts.isAssertsKeyword), nodeVisitor(node.parameterName, visitor, ts.isIdentifierOrThisTypeNode), nodeVisitor(node.type, visitor, ts.isTypeNode));
+            case 177:
+                ts.Debug.type(node);
                 return factory.updateTypeReferenceNode(node, nodeVisitor(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
-            case 174:
+            case 178:
+                ts.Debug.type(node);
                 return factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 175:
+            case 179:
+                ts.Debug.type(node);
                 return factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 176:
+            case 180:
+                ts.Debug.type(node);
                 return factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName));
-            case 177:
+            case 181:
+                ts.Debug.type(node);
                 return factory.updateTypeLiteralNode(node, nodesVisitor(node.members, visitor, ts.isTypeElement));
-            case 178:
+            case 182:
+                ts.Debug.type(node);
                 return factory.updateArrayTypeNode(node, nodeVisitor(node.elementType, visitor, ts.isTypeNode));
-            case 179:
+            case 183:
+                ts.Debug.type(node);
                 return factory.updateTupleTypeNode(node, nodesVisitor(node.elements, visitor, ts.isTypeNode));
-            case 180:
+            case 184:
+                ts.Debug.type(node);
                 return factory.updateOptionalTypeNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 181:
+            case 185:
+                ts.Debug.type(node);
                 return factory.updateRestTypeNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 182:
+            case 186:
+                ts.Debug.type(node);
                 return factory.updateUnionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
-            case 183:
+            case 187:
+                ts.Debug.type(node);
                 return factory.updateIntersectionTypeNode(node, nodesVisitor(node.types, visitor, ts.isTypeNode));
-            case 184:
+            case 188:
+                ts.Debug.type(node);
                 return factory.updateConditionalTypeNode(node, nodeVisitor(node.checkType, visitor, ts.isTypeNode), nodeVisitor(node.extendsType, visitor, ts.isTypeNode), nodeVisitor(node.trueType, visitor, ts.isTypeNode), nodeVisitor(node.falseType, visitor, ts.isTypeNode));
-            case 185:
+            case 189:
+                ts.Debug.type(node);
                 return factory.updateInferTypeNode(node, nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration));
-            case 195:
+            case 199:
+                ts.Debug.type(node);
                 return factory.updateImportTypeNode(node, nodeVisitor(node.argument, visitor, ts.isTypeNode), nodeVisitor(node.qualifier, visitor, ts.isEntityName), visitNodes(node.typeArguments, visitor, ts.isTypeNode), node.isTypeOf);
-            case 192:
-                return factory.updateNamedTupleMember(node, visitNode(node.dotDotDotToken, visitor, ts.isToken), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.questionToken, visitor, ts.isToken), visitNode(node.type, visitor, ts.isTypeNode));
-            case 186:
+            case 196:
+                ts.Debug.type(node);
+                return factory.updateNamedTupleMember(node, visitNode(node.dotDotDotToken, visitor, ts.isDotDotDotToken), visitNode(node.name, visitor, ts.isIdentifier), visitNode(node.questionToken, visitor, ts.isQuestionToken), visitNode(node.type, visitor, ts.isTypeNode));
+            case 190:
+                ts.Debug.type(node);
                 return factory.updateParenthesizedType(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 188:
+            case 192:
+                ts.Debug.type(node);
                 return factory.updateTypeOperatorNode(node, nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 189:
+            case 193:
+                ts.Debug.type(node);
                 return factory.updateIndexedAccessTypeNode(node, nodeVisitor(node.objectType, visitor, ts.isTypeNode), nodeVisitor(node.indexType, visitor, ts.isTypeNode));
-            case 190:
-                return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
-            case 191:
+            case 194:
+                ts.Debug.type(node);
+                return factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
+            case 195:
+                ts.Debug.type(node);
                 return factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
-            case 193:
+            case 197:
+                ts.Debug.type(node);
                 return factory.updateTemplateLiteralType(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateLiteralTypeSpan));
-            case 194:
+            case 198:
+                ts.Debug.type(node);
                 return factory.updateTemplateLiteralTypeSpan(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
-            case 196:
+            case 200:
+                ts.Debug.type(node);
                 return factory.updateObjectBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isBindingElement));
-            case 197:
+            case 201:
+                ts.Debug.type(node);
                 return factory.updateArrayBindingPattern(node, nodesVisitor(node.elements, visitor, ts.isArrayBindingElement));
-            case 198:
-                return factory.updateBindingElement(node, nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isToken), nodeVisitor(node.propertyName, visitor, ts.isPropertyName), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.initializer, visitor, ts.isExpression));
-            case 199:
+            case 202:
+                ts.Debug.type(node);
+                return factory.updateBindingElement(node, nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.propertyName, visitor, ts.isPropertyName), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.initializer, visitor, ts.isExpression));
+            case 203:
+                ts.Debug.type(node);
                 return factory.updateArrayLiteralExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
-            case 200:
+            case 204:
+                ts.Debug.type(node);
                 return factory.updateObjectLiteralExpression(node, nodesVisitor(node.properties, visitor, ts.isObjectLiteralElementLike));
-            case 201:
+            case 205:
                 if (node.flags & 32) {
-                    return factory.updatePropertyAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isToken), nodeVisitor(node.name, visitor, ts.isIdentifier));
+                    ts.Debug.type(node);
+                    return factory.updatePropertyAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodeVisitor(node.name, visitor, ts.isMemberName));
                 }
-                return factory.updatePropertyAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.name, visitor, ts.isIdentifierOrPrivateIdentifier));
-            case 202:
+                ts.Debug.type(node);
+                return factory.updatePropertyAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.name, visitor, ts.isMemberName));
+            case 206:
                 if (node.flags & 32) {
-                    return factory.updateElementAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isToken), nodeVisitor(node.argumentExpression, visitor, ts.isExpression));
+                    ts.Debug.type(node);
+                    return factory.updateElementAccessChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodeVisitor(node.argumentExpression, visitor, ts.isExpression));
                 }
+                ts.Debug.type(node);
                 return factory.updateElementAccessExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.argumentExpression, visitor, ts.isExpression));
-            case 203:
+            case 207:
                 if (node.flags & 32) {
-                    return factory.updateCallChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isToken), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
+                    ts.Debug.type(node);
+                    return factory.updateCallChain(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.questionDotToken, tokenVisitor, ts.isQuestionDotToken), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
                 }
+                ts.Debug.type(node);
                 return factory.updateCallExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
-            case 204:
-                return factory.updateNewExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
-            case 205:
-                return factory.updateTaggedTemplateExpression(node, nodeVisitor(node.tag, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isExpression), nodeVisitor(node.template, visitor, ts.isTemplateLiteral));
-            case 206:
-                return factory.updateTypeAssertion(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 207:
-                return factory.updateParenthesizedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 208:
-                return factory.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+                ts.Debug.type(node);
+                return factory.updateNewExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodesVisitor(node.arguments, visitor, ts.isExpression));
             case 209:
-                return factory.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, ts.isToken), visitFunctionBody(node.body, visitor, context, nodeVisitor));
+                ts.Debug.type(node);
+                return factory.updateTaggedTemplateExpression(node, nodeVisitor(node.tag, visitor, ts.isExpression), visitNodes(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.template, visitor, ts.isTemplateLiteral));
             case 210:
-                return factory.updateDeleteExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateTypeAssertion(node, nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.expression, visitor, ts.isExpression));
             case 211:
-                return factory.updateTypeOfExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateParenthesizedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 212:
-                return factory.updateVoidExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateFunctionExpression(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
             case 213:
-                return factory.updateAwaitExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateArrowFunction(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.equalsGreaterThanToken, tokenVisitor, ts.isEqualsGreaterThanToken), visitFunctionBody(node.body, visitor, context, nodeVisitor));
             case 214:
-                return factory.updatePrefixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateDeleteExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 215:
-                return factory.updatePostfixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateTypeOfExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 216:
-                return factory.updateBinaryExpression(node, nodeVisitor(node.left, visitor, ts.isExpression), nodeVisitor(node.operatorToken, tokenVisitor, ts.isToken), nodeVisitor(node.right, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateVoidExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 217:
-                return factory.updateConditionalExpression(node, nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.whenTrue, visitor, ts.isExpression), nodeVisitor(node.colonToken, tokenVisitor, ts.isToken), nodeVisitor(node.whenFalse, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateAwaitExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 218:
-                return factory.updateTemplateExpression(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
+                ts.Debug.type(node);
+                return factory.updatePrefixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
             case 219:
-                return factory.updateYieldExpression(node, nodeVisitor(node.asteriskToken, tokenVisitor, ts.isToken), nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updatePostfixUnaryExpression(node, nodeVisitor(node.operand, visitor, ts.isExpression));
             case 220:
-                return factory.updateSpreadElement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateBinaryExpression(node, nodeVisitor(node.left, visitor, ts.isExpression), nodeVisitor(node.operatorToken, tokenVisitor, ts.isBinaryOperatorToken), nodeVisitor(node.right, visitor, ts.isExpression));
             case 221:
-                return factory.updateClassExpression(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+                ts.Debug.type(node);
+                return factory.updateConditionalExpression(node, nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.whenTrue, visitor, ts.isExpression), nodeVisitor(node.colonToken, tokenVisitor, ts.isColonToken), nodeVisitor(node.whenFalse, visitor, ts.isExpression));
+            case 222:
+                ts.Debug.type(node);
+                return factory.updateTemplateExpression(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateSpan));
             case 223:
-                return factory.updateExpressionWithTypeArguments(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+                ts.Debug.type(node);
+                return factory.updateYieldExpression(node, nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.expression, visitor, ts.isExpression));
             case 224:
-                return factory.updateAsExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.type, visitor, ts.isTypeNode));
+                ts.Debug.type(node);
+                return factory.updateSpreadElement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 225:
+                ts.Debug.type(node);
+                return factory.updateClassExpression(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+            case 227:
+                ts.Debug.type(node);
+                return factory.updateExpressionWithTypeArguments(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
+            case 228:
+                ts.Debug.type(node);
+                return factory.updateAsExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.type, visitor, ts.isTypeNode));
+            case 229:
                 if (node.flags & 32) {
+                    ts.Debug.type(node);
                     return factory.updateNonNullChain(node, nodeVisitor(node.expression, visitor, ts.isExpression));
                 }
+                ts.Debug.type(node);
                 return factory.updateNonNullExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 226:
-                return factory.updateMetaProperty(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
-            case 228:
-                return factory.updateTemplateSpan(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
             case 230:
-                return factory.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+                ts.Debug.type(node);
+                return factory.updateMetaProperty(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
             case 232:
-                return factory.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.declarationList, visitor, ts.isVariableDeclarationList));
-            case 233:
-                return factory.updateExpressionStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateTemplateSpan(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.literal, visitor, ts.isTemplateMiddleOrTemplateTail));
             case 234:
-                return factory.updateIfStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.thenStatement, visitor, ts.isStatement, factory.liftToBlock), nodeVisitor(node.elseStatement, visitor, ts.isStatement, factory.liftToBlock));
-            case 235:
-                return factory.updateDoStatement(node, nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock), nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
             case 236:
-                return factory.updateWhileStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                ts.Debug.type(node);
+                return factory.updateVariableStatement(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.declarationList, visitor, ts.isVariableDeclarationList));
             case 237:
-                return factory.updateForStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.incrementor, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                ts.Debug.type(node);
+                return factory.updateExpressionStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 238:
-                return factory.updateForInStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                ts.Debug.type(node);
+                return factory.updateIfStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.thenStatement, visitor, ts.isStatement, factory.liftToBlock), nodeVisitor(node.elseStatement, visitor, ts.isStatement, factory.liftToBlock));
             case 239:
-                return factory.updateForOfStatement(node, nodeVisitor(node.awaitModifier, tokenVisitor, ts.isToken), nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                ts.Debug.type(node);
+                return factory.updateDoStatement(node, visitIterationBody(node.statement, visitor, context), nodeVisitor(node.expression, visitor, ts.isExpression));
             case 240:
-                return factory.updateContinueStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
+                ts.Debug.type(node);
+                return factory.updateWhileStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
             case 241:
-                return factory.updateBreakStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
+                ts.Debug.type(node);
+                return factory.updateForStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.condition, visitor, ts.isExpression), nodeVisitor(node.incrementor, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
             case 242:
-                return factory.updateReturnStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateForInStatement(node, nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
             case 243:
-                return factory.updateWithStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                ts.Debug.type(node);
+                return factory.updateForOfStatement(node, nodeVisitor(node.awaitModifier, tokenVisitor, ts.isAwaitKeyword), nodeVisitor(node.initializer, visitor, ts.isForInitializer), nodeVisitor(node.expression, visitor, ts.isExpression), visitIterationBody(node.statement, visitor, context));
             case 244:
-                return factory.updateSwitchStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.caseBlock, visitor, ts.isCaseBlock));
+                ts.Debug.type(node);
+                return factory.updateContinueStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
             case 245:
-                return factory.updateLabeledStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                ts.Debug.type(node);
+                return factory.updateBreakStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier));
             case 246:
-                return factory.updateThrowStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateReturnStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 247:
-                return factory.updateTryStatement(node, nodeVisitor(node.tryBlock, visitor, ts.isBlock), nodeVisitor(node.catchClause, visitor, ts.isCatchClause), nodeVisitor(node.finallyBlock, visitor, ts.isBlock));
+                ts.Debug.type(node);
+                return factory.updateWithStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+            case 248:
+                ts.Debug.type(node);
+                return factory.updateSwitchStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodeVisitor(node.caseBlock, visitor, ts.isCaseBlock));
             case 249:
-                return factory.updateVariableDeclaration(node, nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.exclamationToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateLabeledStatement(node, nodeVisitor(node.label, visitor, ts.isIdentifier), nodeVisitor(node.statement, visitor, ts.isStatement, factory.liftToBlock));
             case 250:
-                return factory.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
+                ts.Debug.type(node);
+                return factory.updateThrowStatement(node, nodeVisitor(node.expression, visitor, ts.isExpression));
             case 251:
-                return factory.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
-            case 252:
-                return factory.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
+                ts.Debug.type(node);
+                return factory.updateTryStatement(node, nodeVisitor(node.tryBlock, visitor, ts.isBlock), nodeVisitor(node.catchClause, visitor, ts.isCatchClause), nodeVisitor(node.finallyBlock, visitor, ts.isBlock));
             case 253:
-                return factory.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
+                ts.Debug.type(node);
+                return factory.updateVariableDeclaration(node, nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.exclamationToken, tokenVisitor, ts.isExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
             case 254:
-                return factory.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
+                ts.Debug.type(node);
+                return factory.updateVariableDeclarationList(node, nodesVisitor(node.declarations, visitor, ts.isVariableDeclaration));
             case 255:
-                return factory.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
+                ts.Debug.type(node);
+                return factory.updateFunctionDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
             case 256:
-                return factory.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.body, visitor, ts.isModuleBody));
+                ts.Debug.type(node);
+                return factory.updateClassDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isClassElement));
             case 257:
-                return factory.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
+                ts.Debug.type(node);
+                return factory.updateInterfaceDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.heritageClauses, visitor, ts.isHeritageClause), nodesVisitor(node.members, visitor, ts.isTypeElement));
             case 258:
-                return factory.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
+                ts.Debug.type(node);
+                return factory.updateTypeAliasDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
             case 259:
-                return factory.updateNamespaceExportDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
+                ts.Debug.type(node);
+                return factory.updateEnumDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodesVisitor(node.members, visitor, ts.isEnumMember));
             case 260:
-                return factory.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.moduleReference, visitor, ts.isModuleReference));
+                ts.Debug.type(node);
+                return factory.updateModuleDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isModuleName), nodeVisitor(node.body, visitor, ts.isModuleBody));
             case 261:
-                return factory.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.importClause, visitor, ts.isImportClause), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateModuleBlock(node, nodesVisitor(node.statements, visitor, ts.isStatement));
             case 262:
-                return factory.updateImportClause(node, node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.namedBindings, visitor, ts.isNamedImportBindings));
+                ts.Debug.type(node);
+                return factory.updateCaseBlock(node, nodesVisitor(node.clauses, visitor, ts.isCaseOrDefaultClause));
             case 263:
-                return factory.updateNamespaceImport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
-            case 269:
-                return factory.updateNamespaceExport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
+                ts.Debug.type(node);
+                return factory.updateNamespaceExportDeclaration(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
             case 264:
-                return factory.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+                ts.Debug.type(node);
+                return factory.updateImportEqualsDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.moduleReference, visitor, ts.isModuleReference));
             case 265:
-                return factory.updateImportSpecifier(node, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
+                ts.Debug.type(node);
+                return factory.updateImportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.importClause, visitor, ts.isImportClause), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
+            case 292:
+                ts.Debug.type(node);
+                return factory.updateAssertClause(node, nodesVisitor(node.elements, visitor, ts.isAssertEntry), node.multiLine);
+            case 293:
+                ts.Debug.type(node);
+                return factory.updateAssertEntry(node, nodeVisitor(node.name, visitor, ts.isAssertionKey), nodeVisitor(node.value, visitor, ts.isStringLiteral));
             case 266:
-                return factory.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.expression, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateImportClause(node, node.isTypeOnly, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.namedBindings, visitor, ts.isNamedImportBindings));
             case 267:
-                return factory.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.exportClause, visitor, ts.isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression));
+                ts.Debug.type(node);
+                return factory.updateNamespaceImport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
+            case 273:
+                ts.Debug.type(node);
+                return factory.updateNamespaceExport(node, nodeVisitor(node.name, visitor, ts.isIdentifier));
             case 268:
-                return factory.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+                ts.Debug.type(node);
+                return factory.updateNamedImports(node, nodesVisitor(node.elements, visitor, ts.isImportSpecifier));
+            case 269:
+                ts.Debug.type(node);
+                return factory.updateImportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
             case 270:
-                return factory.updateExportSpecifier(node, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
+                ts.Debug.type(node);
+                return factory.updateExportAssignment(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.expression, visitor, ts.isExpression));
+            case 271:
+                ts.Debug.type(node);
+                return factory.updateExportDeclaration(node, nodesVisitor(node.decorators, visitor, ts.isDecorator), nodesVisitor(node.modifiers, visitor, ts.isModifier), node.isTypeOnly, nodeVisitor(node.exportClause, visitor, ts.isNamedExportBindings), nodeVisitor(node.moduleSpecifier, visitor, ts.isExpression), nodeVisitor(node.assertClause, visitor, ts.isAssertClause));
             case 272:
+                ts.Debug.type(node);
+                return factory.updateNamedExports(node, nodesVisitor(node.elements, visitor, ts.isExportSpecifier));
+            case 274:
+                ts.Debug.type(node);
+                return factory.updateExportSpecifier(node, node.isTypeOnly, nodeVisitor(node.propertyName, visitor, ts.isIdentifier), nodeVisitor(node.name, visitor, ts.isIdentifier));
+            case 276:
+                ts.Debug.type(node);
                 return factory.updateExternalModuleReference(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 273:
+            case 277:
+                ts.Debug.type(node);
                 return factory.updateJsxElement(node, nodeVisitor(node.openingElement, visitor, ts.isJsxOpeningElement), nodesVisitor(node.children, visitor, ts.isJsxChild), nodeVisitor(node.closingElement, visitor, ts.isJsxClosingElement));
-            case 274:
+            case 278:
+                ts.Debug.type(node);
                 return factory.updateJsxSelfClosingElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.attributes, visitor, ts.isJsxAttributes));
-            case 275:
+            case 279:
+                ts.Debug.type(node);
                 return factory.updateJsxOpeningElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode), nodeVisitor(node.attributes, visitor, ts.isJsxAttributes));
-            case 276:
+            case 280:
+                ts.Debug.type(node);
                 return factory.updateJsxClosingElement(node, nodeVisitor(node.tagName, visitor, ts.isJsxTagNameExpression));
-            case 277:
+            case 281:
+                ts.Debug.type(node);
                 return factory.updateJsxFragment(node, nodeVisitor(node.openingFragment, visitor, ts.isJsxOpeningFragment), nodesVisitor(node.children, visitor, ts.isJsxChild), nodeVisitor(node.closingFragment, visitor, ts.isJsxClosingFragment));
-            case 280:
+            case 284:
+                ts.Debug.type(node);
                 return factory.updateJsxAttribute(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.initializer, visitor, ts.isStringLiteralOrJsxExpression));
-            case 281:
+            case 285:
+                ts.Debug.type(node);
                 return factory.updateJsxAttributes(node, nodesVisitor(node.properties, visitor, ts.isJsxAttributeLike));
-            case 282:
+            case 286:
+                ts.Debug.type(node);
                 return factory.updateJsxSpreadAttribute(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 283:
+            case 287:
+                ts.Debug.type(node);
                 return factory.updateJsxExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 284:
+            case 288:
+                ts.Debug.type(node);
                 return factory.updateCaseClause(node, nodeVisitor(node.expression, visitor, ts.isExpression), nodesVisitor(node.statements, visitor, ts.isStatement));
-            case 285:
+            case 289:
+                ts.Debug.type(node);
                 return factory.updateDefaultClause(node, nodesVisitor(node.statements, visitor, ts.isStatement));
-            case 286:
+            case 290:
+                ts.Debug.type(node);
                 return factory.updateHeritageClause(node, nodesVisitor(node.types, visitor, ts.isExpressionWithTypeArguments));
-            case 287:
+            case 291:
+                ts.Debug.type(node);
                 return factory.updateCatchClause(node, nodeVisitor(node.variableDeclaration, visitor, ts.isVariableDeclaration), nodeVisitor(node.block, visitor, ts.isBlock));
-            case 288:
+            case 294:
+                ts.Debug.type(node);
                 return factory.updatePropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
-            case 289:
+            case 295:
+                ts.Debug.type(node);
                 return factory.updateShorthandPropertyAssignment(node, nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.objectAssignmentInitializer, visitor, ts.isExpression));
-            case 290:
+            case 296:
+                ts.Debug.type(node);
                 return factory.updateSpreadAssignment(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 291:
-                return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
             case 297:
+                ts.Debug.type(node);
+                return factory.updateEnumMember(node, nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.initializer, visitor, ts.isExpression));
+            case 303:
+                ts.Debug.type(node);
                 return factory.updateSourceFile(node, visitLexicalEnvironment(node.statements, visitor, context));
-            case 336:
+            case 348:
+                ts.Debug.type(node);
                 return factory.updatePartiallyEmittedExpression(node, nodeVisitor(node.expression, visitor, ts.isExpression));
-            case 337:
+            case 349:
+                ts.Debug.type(node);
                 return factory.updateCommaListExpression(node, nodesVisitor(node.elements, visitor, ts.isExpression));
             default:
                 return node;
@@ -68623,6 +73614,7 @@ var ts;
         var sourcesContent;
         var names = [];
         var nameToNameIndexMap;
+        var mappingCharCodes = [];
         var mappings = "";
         var lastGeneratedLine = 0;
         var lastGeneratedCharacter = 0;
@@ -68789,6 +73781,12 @@ var ts;
                 || lastSourceCharacter !== pendingSourceCharacter
                 || lastNameIndex !== pendingNameIndex;
         }
+        function appendMappingCharCode(charCode) {
+            mappingCharCodes.push(charCode);
+            if (mappingCharCodes.length >= 1024) {
+                flushMappingBuffer();
+            }
+        }
         function commitPendingMapping() {
             if (!hasPending || !shouldCommitMapping()) {
                 return;
@@ -68796,36 +73794,43 @@ var ts;
             enter();
             if (lastGeneratedLine < pendingGeneratedLine) {
                 do {
-                    mappings += ";";
+                    appendMappingCharCode(59);
                     lastGeneratedLine++;
-                    lastGeneratedCharacter = 0;
                 } while (lastGeneratedLine < pendingGeneratedLine);
+                lastGeneratedCharacter = 0;
             }
             else {
                 ts.Debug.assertEqual(lastGeneratedLine, pendingGeneratedLine, "generatedLine cannot backtrack");
                 if (hasLast) {
-                    mappings += ",";
+                    appendMappingCharCode(44);
                 }
             }
-            mappings += base64VLQFormatEncode(pendingGeneratedCharacter - lastGeneratedCharacter);
+            appendBase64VLQ(pendingGeneratedCharacter - lastGeneratedCharacter);
             lastGeneratedCharacter = pendingGeneratedCharacter;
             if (hasPendingSource) {
-                mappings += base64VLQFormatEncode(pendingSourceIndex - lastSourceIndex);
+                appendBase64VLQ(pendingSourceIndex - lastSourceIndex);
                 lastSourceIndex = pendingSourceIndex;
-                mappings += base64VLQFormatEncode(pendingSourceLine - lastSourceLine);
+                appendBase64VLQ(pendingSourceLine - lastSourceLine);
                 lastSourceLine = pendingSourceLine;
-                mappings += base64VLQFormatEncode(pendingSourceCharacter - lastSourceCharacter);
+                appendBase64VLQ(pendingSourceCharacter - lastSourceCharacter);
                 lastSourceCharacter = pendingSourceCharacter;
                 if (hasPendingName) {
-                    mappings += base64VLQFormatEncode(pendingNameIndex - lastNameIndex);
+                    appendBase64VLQ(pendingNameIndex - lastNameIndex);
                     lastNameIndex = pendingNameIndex;
                 }
             }
             hasLast = true;
             exit();
         }
+        function flushMappingBuffer() {
+            if (mappingCharCodes.length > 0) {
+                mappings += String.fromCharCode.apply(undefined, mappingCharCodes);
+                mappingCharCodes.length = 0;
+            }
+        }
         function toJSON() {
             commitPendingMapping();
+            flushMappingBuffer();
             return {
                 version: 3,
                 file: file,
@@ -68836,9 +73841,25 @@ var ts;
                 sourcesContent: sourcesContent,
             };
         }
+        function appendBase64VLQ(inValue) {
+            if (inValue < 0) {
+                inValue = ((-inValue) << 1) + 1;
+            }
+            else {
+                inValue = inValue << 1;
+            }
+            do {
+                var currentDigit = inValue & 31;
+                inValue = inValue >> 5;
+                if (inValue > 0) {
+                    currentDigit = currentDigit | 32;
+                }
+                appendMappingCharCode(base64FormatEncode(currentDigit));
+            } while (inValue > 0);
+        }
     }
     ts.createSourceMapGenerator = createSourceMapGenerator;
-    var sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\s*$/;
+    var sourceMapCommentRegExp = /^\/\/[@#] source[M]appingURL=(.+)\r?\n?$/;
     var whitespaceOrMapCommentRegExp = /^\s*(\/\/[@#] .*)?$/;
     function getLineInfo(text, lineStarts) {
         return {
@@ -68852,7 +73873,7 @@ var ts;
             var line = lineInfo.getLineText(index);
             var comment = sourceMapCommentRegExp.exec(line);
             if (comment) {
-                return comment[1];
+                return ts.trimStringEnd(comment[1]);
             }
             else if (!line.match(whitespaceOrMapCommentRegExp)) {
                 break;
@@ -69036,7 +74057,7 @@ var ts;
                 value >= 52 && value < 62 ? 48 + value - 52 :
                     value === 62 ? 43 :
                         value === 63 ? 47 :
-                            ts.Debug.fail(value + ": not a base64 value");
+                            ts.Debug.fail("".concat(value, ": not a base64 value"));
     }
     function base64FormatDecode(ch) {
         return ch >= 65 && ch <= 90 ? ch - 65 :
@@ -69046,24 +74067,6 @@ var ts;
                         ch === 47 ? 63 :
                             -1;
     }
-    function base64VLQFormatEncode(inValue) {
-        if (inValue < 0) {
-            inValue = ((-inValue) << 1) + 1;
-        }
-        else {
-            inValue = inValue << 1;
-        }
-        var encodedStr = "";
-        do {
-            var currentDigit = inValue & 31;
-            inValue = inValue >> 5;
-            if (inValue > 0) {
-                currentDigit = currentDigit | 32;
-            }
-            encodedStr = encodedStr + String.fromCharCode(base64FormatEncode(currentDigit));
-        } while (inValue > 0);
-        return encodedStr;
-    }
     function isSourceMappedPosition(value) {
         return value.sourceIndex !== undefined
             && value.sourcePosition !== undefined;
@@ -69127,7 +74130,7 @@ var ts;
                 var mappings = ts.arrayFrom(decoder, processMapping);
                 if (decoder.error !== undefined) {
                     if (host.log) {
-                        host.log("Encountered error while decoding sourcemap: " + decoder.error);
+                        host.log("Encountered error while decoding sourcemap: ".concat(decoder.error));
                     }
                     decodedMappings = ts.emptyArray;
                 }
@@ -69222,7 +74225,7 @@ var ts;
     function chainBundle(context, transformSourceFile) {
         return transformSourceFileOrBundle;
         function transformSourceFileOrBundle(node) {
-            return node.kind === 297 ? transformSourceFile(node) : transformBundle(node);
+            return node.kind === 303 ? transformSourceFile(node) : transformBundle(node);
         }
         function transformBundle(node) {
             return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
@@ -69271,7 +74274,7 @@ var ts;
         for (var _i = 0, _a = sourceFile.statements; _i < _a.length; _i++) {
             var node = _a[_i];
             switch (node.kind) {
-                case 261:
+                case 265:
                     externalImports.push(node);
                     if (!hasImportStar && getImportNeedsImportStarHelper(node)) {
                         hasImportStar = true;
@@ -69280,12 +74283,12 @@ var ts;
                         hasImportDefault = true;
                     }
                     break;
-                case 260:
-                    if (node.moduleReference.kind === 272) {
+                case 264:
+                    if (node.moduleReference.kind === 276) {
                         externalImports.push(node);
                     }
                     break;
-                case 267:
+                case 271:
                     if (node.moduleSpecifier) {
                         if (!node.exportClause) {
                             externalImports.push(node);
@@ -69311,12 +74314,12 @@ var ts;
                         addExportedNamesForExportDeclaration(node);
                     }
                     break;
-                case 266:
+                case 270:
                     if (node.isExportEquals && !exportEquals) {
                         exportEquals = node;
                     }
                     break;
-                case 232:
+                case 236:
                     if (ts.hasSyntacticModifier(node, 1)) {
                         for (var _b = 0, _c = node.declarationList.declarations; _b < _c.length; _b++) {
                             var decl = _c[_b];
@@ -69324,7 +74327,7 @@ var ts;
                         }
                     }
                     break;
-                case 251:
+                case 255:
                     if (ts.hasSyntacticModifier(node, 1)) {
                         if (ts.hasSyntacticModifier(node, 512)) {
                             if (!hasExportDefault) {
@@ -69342,7 +74345,7 @@ var ts;
                         }
                     }
                     break;
-                case 252:
+                case 256:
                     if (ts.hasSyntacticModifier(node, 1)) {
                         if (ts.hasSyntacticModifier(node, 512)) {
                             if (!hasExportDefault) {
@@ -69423,32 +74426,31 @@ var ts;
     }
     ts.isSimpleCopiableExpression = isSimpleCopiableExpression;
     function isSimpleInlineableExpression(expression) {
-        return !ts.isIdentifier(expression) && isSimpleCopiableExpression(expression) ||
-            ts.isWellKnownSymbolSyntactically(expression);
+        return !ts.isIdentifier(expression) && isSimpleCopiableExpression(expression);
     }
     ts.isSimpleInlineableExpression = isSimpleInlineableExpression;
     function isCompoundAssignment(kind) {
-        return kind >= 63
-            && kind <= 77;
+        return kind >= 64
+            && kind <= 78;
     }
     ts.isCompoundAssignment = isCompoundAssignment;
     function getNonAssignmentOperatorForCompoundAssignment(kind) {
         switch (kind) {
-            case 63: return 39;
-            case 64: return 40;
-            case 65: return 41;
-            case 66: return 42;
-            case 67: return 43;
-            case 68: return 44;
-            case 69: return 47;
-            case 70: return 48;
-            case 71: return 49;
-            case 72: return 50;
-            case 73: return 51;
-            case 77: return 52;
-            case 74: return 56;
-            case 75: return 55;
-            case 76: return 60;
+            case 64: return 39;
+            case 65: return 40;
+            case 66: return 41;
+            case 67: return 42;
+            case 68: return 43;
+            case 69: return 44;
+            case 70: return 47;
+            case 71: return 48;
+            case 72: return 49;
+            case 73: return 50;
+            case 74: return 51;
+            case 78: return 52;
+            case 75: return 56;
+            case 76: return 55;
+            case 77: return 60;
         }
     }
     ts.getNonAssignmentOperatorForCompoundAssignment = getNonAssignmentOperatorForCompoundAssignment;
@@ -69475,16 +74477,30 @@ var ts;
         return ts.filter(node.members, function (m) { return isInitializedOrStaticProperty(m, requireInitializer, isStatic); });
     }
     ts.getProperties = getProperties;
+    function isStaticPropertyDeclarationOrClassStaticBlockDeclaration(element) {
+        return isStaticPropertyDeclaration(element) || ts.isClassStaticBlockDeclaration(element);
+    }
+    function getStaticPropertiesAndClassStaticBlock(node) {
+        return ts.filter(node.members, isStaticPropertyDeclarationOrClassStaticBlockDeclaration);
+    }
+    ts.getStaticPropertiesAndClassStaticBlock = getStaticPropertiesAndClassStaticBlock;
     function isInitializedOrStaticProperty(member, requireInitializer, isStatic) {
         return ts.isPropertyDeclaration(member)
             && (!!member.initializer || !requireInitializer)
             && ts.hasStaticModifier(member) === isStatic;
     }
+    function isStaticPropertyDeclaration(member) {
+        return ts.isPropertyDeclaration(member) && ts.hasStaticModifier(member);
+    }
     function isInitializedProperty(member) {
-        return member.kind === 163
+        return member.kind === 166
             && member.initializer !== undefined;
     }
     ts.isInitializedProperty = isInitializedProperty;
+    function isNonStaticMethodOrAccessorWithPrivateName(member) {
+        return !ts.isStatic(member) && ts.isMethodOrAccessor(member) && ts.isPrivateIdentifier(member.name);
+    }
+    ts.isNonStaticMethodOrAccessorWithPrivateName = isNonStaticMethodOrAccessorWithPrivateName;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -69686,8 +74702,8 @@ var ts;
             if (!ts.getRestIndicatorOfBindingOrAssignmentElement(element)) {
                 var propertyName = ts.getPropertyNameOfBindingOrAssignmentElement(element);
                 if (flattenContext.level >= 1
-                    && !(element.transformFlags & (8192 | 16384))
-                    && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (8192 | 16384))
+                    && !(element.transformFlags & (16384 | 32768))
+                    && !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (16384 | 32768))
                     && !ts.isComputedPropertyName(propertyName)) {
                     bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor));
                 }
@@ -69734,7 +74750,7 @@ var ts;
         for (var i = 0; i < numElements; i++) {
             var element = elements[i];
             if (flattenContext.level >= 1) {
-                if (element.transformFlags & 16384 || flattenContext.hasTransformedPriorElement && !isSimpleBindingOrAssignmentElement(element)) {
+                if (element.transformFlags & 32768 || flattenContext.hasTransformedPriorElement && !isSimpleBindingOrAssignmentElement(element)) {
                     flattenContext.hasTransformedPriorElement = true;
                     var temp = flattenContext.context.factory.createTempVariable(undefined);
                     if (flattenContext.hoistTempVariables) {
@@ -69886,6 +74902,7 @@ var ts;
     function getRawLiteral(node, currentSourceFile) {
         var text = node.rawText;
         if (text === undefined) {
+            ts.Debug.assertIsDefined(currentSourceFile, "Template literal node is missing 'rawText' and does not have a source file. Possibly bad transform.");
             text = ts.getSourceTextOfNodeFromSourceFile(currentSourceFile, node);
             var isLast = node.kind === 14 || node.kind === 17;
             text = text.substring(1, text.length - (isLast ? 1 : 2));
@@ -69908,8 +74925,8 @@ var ts;
         var previousOnSubstituteNode = context.onSubstituteNode;
         context.onEmitNode = onEmitNode;
         context.onSubstituteNode = onSubstituteNode;
-        context.enableSubstitution(201);
-        context.enableSubstitution(202);
+        context.enableSubstitution(205);
+        context.enableSubstitution(206);
         var currentSourceFile;
         var currentNamespace;
         var currentNamespaceContainerName;
@@ -69922,14 +74939,14 @@ var ts;
         var applicableSubstitutions;
         return transformSourceFileOrBundle;
         function transformSourceFileOrBundle(node) {
-            if (node.kind === 298) {
+            if (node.kind === 304) {
                 return transformBundle(node);
             }
             return transformSourceFile(node);
         }
         function transformBundle(node) {
             return factory.createBundle(node.sourceFiles.map(transformSourceFile), ts.mapDefined(node.prepends, function (prepend) {
-                if (prepend.kind === 300) {
+                if (prepend.kind === 306) {
                     return ts.createUnparsedSourceFile(prepend, "js");
                 }
                 return prepend;
@@ -69962,16 +74979,16 @@ var ts;
         }
         function onBeforeVisitNode(node) {
             switch (node.kind) {
-                case 297:
-                case 258:
-                case 257:
-                case 230:
+                case 303:
+                case 262:
+                case 261:
+                case 234:
                     currentLexicalScope = node;
                     currentNameScope = undefined;
                     currentScopeFirstDeclarationsOfName = undefined;
                     break;
-                case 252:
-                case 251:
+                case 256:
+                case 255:
                     if (ts.hasSyntacticModifier(node, 2)) {
                         break;
                     }
@@ -69979,7 +74996,7 @@ var ts;
                         recordEmittedDeclarationInScope(node);
                     }
                     else {
-                        ts.Debug.assert(node.kind === 252 || ts.hasSyntacticModifier(node, 512));
+                        ts.Debug.assert(node.kind === 256 || ts.hasSyntacticModifier(node, 512));
                     }
                     if (ts.isClassDeclaration(node)) {
                         currentNameScope = node;
@@ -70001,10 +75018,10 @@ var ts;
         }
         function sourceElementVisitorWorker(node) {
             switch (node.kind) {
-                case 261:
-                case 260:
-                case 266:
-                case 267:
+                case 265:
+                case 264:
+                case 270:
+                case 271:
                     return visitElidableStatement(node);
                 default:
                     return visitorWorker(node);
@@ -70019,13 +75036,13 @@ var ts;
                 return node;
             }
             switch (node.kind) {
-                case 261:
+                case 265:
                     return visitImportDeclaration(node);
-                case 260:
+                case 264:
                     return visitImportEqualsDeclaration(node);
-                case 266:
+                case 270:
                     return visitExportAssignment(node);
-                case 267:
+                case 271:
                     return visitExportDeclaration(node);
                 default:
                     ts.Debug.fail("Unhandled ellided statement");
@@ -70035,11 +75052,11 @@ var ts;
             return saveStateAndInvoke(node, namespaceElementVisitorWorker);
         }
         function namespaceElementVisitorWorker(node) {
-            if (node.kind === 267 ||
-                node.kind === 261 ||
-                node.kind === 262 ||
-                (node.kind === 260 &&
-                    node.moduleReference.kind === 272)) {
+            if (node.kind === 271 ||
+                node.kind === 265 ||
+                node.kind === 266 ||
+                (node.kind === 264 &&
+                    node.moduleReference.kind === 276)) {
                 return undefined;
             }
             else if (node.transformFlags & 1 || ts.hasSyntacticModifier(node, 1)) {
@@ -70052,26 +75069,27 @@ var ts;
         }
         function classElementVisitorWorker(node) {
             switch (node.kind) {
-                case 166:
+                case 170:
                     return visitConstructor(node);
-                case 163:
+                case 166:
                     return visitPropertyDeclaration(node);
+                case 175:
                 case 171:
-                case 167:
+                case 172:
                 case 168:
-                case 165:
+                case 169:
                     return visitorWorker(node);
-                case 229:
+                case 233:
                     return node;
                 default:
                     return ts.Debug.failBadSyntaxKind(node);
             }
         }
         function modifierVisitor(node) {
-            if (ts.modifierToFlag(node.kind) & 2270) {
+            if (ts.modifierToFlag(node.kind) & 18654) {
                 return undefined;
             }
-            else if (currentNamespace && node.kind === 92) {
+            else if (currentNamespace && node.kind === 93) {
                 return undefined;
             }
             return node;
@@ -70081,104 +75099,106 @@ var ts;
                 return factory.createNotEmittedStatement(node);
             }
             switch (node.kind) {
-                case 92:
-                case 87:
+                case 93:
+                case 88:
                     return currentNamespace ? undefined : node;
-                case 122:
-                case 120:
+                case 123:
                 case 121:
-                case 125:
-                case 84:
-                case 133:
-                case 142:
-                case 178:
-                case 179:
-                case 180:
-                case 181:
-                case 177:
-                case 172:
-                case 159:
-                case 128:
-                case 152:
-                case 131:
-                case 147:
+                case 122:
+                case 126:
+                case 158:
+                case 85:
+                case 135:
                 case 144:
-                case 141:
-                case 113:
-                case 148:
-                case 175:
-                case 174:
-                case 176:
-                case 173:
                 case 182:
                 case 183:
                 case 184:
+                case 185:
+                case 181:
+                case 176:
+                case 162:
+                case 130:
+                case 154:
+                case 133:
+                case 149:
+                case 146:
+                case 143:
+                case 114:
+                case 150:
+                case 179:
+                case 178:
+                case 180:
+                case 177:
                 case 186:
                 case 187:
                 case 188:
-                case 189:
                 case 190:
                 case 191:
-                case 171:
-                case 161:
-                case 254:
+                case 192:
+                case 193:
+                case 194:
+                case 195:
+                case 175:
+                case 164:
                     return undefined;
-                case 163:
+                case 258:
+                    return factory.createNotEmittedStatement(node);
+                case 166:
                     return visitPropertyDeclaration(node);
-                case 259:
+                case 263:
                     return undefined;
-                case 166:
+                case 170:
                     return visitConstructor(node);
-                case 253:
+                case 257:
                     return factory.createNotEmittedStatement(node);
-                case 252:
+                case 256:
                     return visitClassDeclaration(node);
-                case 221:
+                case 225:
                     return visitClassExpression(node);
-                case 286:
+                case 290:
                     return visitHeritageClause(node);
-                case 223:
+                case 227:
                     return visitExpressionWithTypeArguments(node);
-                case 165:
+                case 168:
                     return visitMethodDeclaration(node);
-                case 167:
+                case 171:
                     return visitGetAccessor(node);
-                case 168:
+                case 172:
                     return visitSetAccessor(node);
-                case 251:
+                case 255:
                     return visitFunctionDeclaration(node);
-                case 208:
+                case 212:
                     return visitFunctionExpression(node);
-                case 209:
+                case 213:
                     return visitArrowFunction(node);
-                case 160:
+                case 163:
                     return visitParameter(node);
-                case 207:
+                case 211:
                     return visitParenthesizedExpression(node);
-                case 206:
-                case 224:
+                case 210:
+                case 228:
                     return visitAssertionExpression(node);
-                case 203:
+                case 207:
                     return visitCallExpression(node);
-                case 204:
+                case 208:
                     return visitNewExpression(node);
-                case 205:
+                case 209:
                     return visitTaggedTemplateExpression(node);
-                case 225:
+                case 229:
                     return visitNonNullExpression(node);
-                case 255:
+                case 259:
                     return visitEnumDeclaration(node);
-                case 232:
+                case 236:
                     return visitVariableStatement(node);
-                case 249:
+                case 253:
                     return visitVariableDeclaration(node);
-                case 256:
-                    return visitModuleDeclaration(node);
                 case 260:
+                    return visitModuleDeclaration(node);
+                case 264:
                     return visitImportEqualsDeclaration(node);
-                case 274:
+                case 278:
                     return visitJsxSelfClosingElement(node);
-                case 275:
+                case 279:
                     return visitJsxJsxOpeningElement(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -70190,27 +75210,14 @@ var ts;
                 !ts.isJsonSourceFile(node);
             return factory.updateSourceFile(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, 0, alwaysStrict));
         }
-        function shouldEmitDecorateCallForClass(node) {
-            if (node.decorators && node.decorators.length > 0) {
-                return true;
-            }
-            var constructor = ts.getFirstConstructorWithBody(node);
-            if (constructor) {
-                return ts.forEach(constructor.parameters, shouldEmitDecorateCallForParameter);
-            }
-            return false;
-        }
-        function shouldEmitDecorateCallForParameter(parameter) {
-            return parameter.decorators !== undefined && parameter.decorators.length > 0;
-        }
         function getClassFacts(node, staticProperties) {
             var facts = 0;
             if (ts.some(staticProperties))
                 facts |= 1;
             var extendsClauseElement = ts.getEffectiveBaseTypeNode(node);
-            if (extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 103)
+            if (extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104)
                 facts |= 64;
-            if (shouldEmitDecorateCallForClass(node))
+            if (ts.classOrConstructorParameterIsDecorated(node))
                 facts |= 2;
             if (ts.childIsDecorated(node))
                 facts |= 4;
@@ -70225,7 +75232,7 @@ var ts;
             return facts;
         }
         function hasTypeScriptClassSyntax(node) {
-            return !!(node.transformFlags & 2048);
+            return !!(node.transformFlags & 4096);
         }
         function isClassLikeDeclarationWithTypeScriptSyntax(node) {
             return ts.some(node.decorators)
@@ -70306,7 +75313,9 @@ var ts;
         function createClassDeclarationHeadWithDecorators(node, name) {
             var location = ts.moveRangePastDecorators(node);
             var classAlias = getClassAliasIfNeeded(node);
-            var declName = factory.getLocalName(node, false, true);
+            var declName = languageVersion <= 2 ?
+                factory.getInternalName(node, false, true) :
+                factory.getLocalName(node, false, true);
             var heritageClauses = ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause);
             var members = transformClassMembers(node);
             var classExpression = factory.createClassExpression(undefined, undefined, name, undefined, heritageClauses, members);
@@ -70354,9 +75363,9 @@ var ts;
         function isInstanceDecoratedClassElement(member, parent) {
             return isDecoratedClassElement(member, false, parent);
         }
-        function isDecoratedClassElement(member, isStatic, parent) {
+        function isDecoratedClassElement(member, isStaticElement, parent) {
             return ts.nodeOrChildIsDecorated(member, parent)
-                && isStatic === ts.hasSyntacticModifier(member, 32);
+                && isStaticElement === ts.isStatic(member);
         }
         function getDecoratorsOfParameters(node) {
             var decorators;
@@ -70390,12 +75399,12 @@ var ts;
         }
         function getAllDecoratorsOfClassElement(node, member) {
             switch (member.kind) {
-                case 167:
-                case 168:
+                case 171:
+                case 172:
                     return getAllDecoratorsOfAccessors(node, member);
-                case 165:
+                case 168:
                     return getAllDecoratorsOfMethod(member);
-                case 163:
+                case 166:
                     return getAllDecoratorsOfProperty(member);
                 default:
                     return undefined;
@@ -70474,7 +75483,7 @@ var ts;
             var prefix = getClassMemberPrefix(node, member);
             var memberName = getExpressionForPropertyName(member, true);
             var descriptor = languageVersion > 0
-                ? member.kind === 163
+                ? member.kind === 166
                     ? factory.createVoidZero()
                     : factory.createNull()
                 : undefined;
@@ -70496,7 +75505,9 @@ var ts;
                 return undefined;
             }
             var classAlias = classAliases && classAliases[ts.getOriginalNodeId(node)];
-            var localName = factory.getLocalName(node, false, true);
+            var localName = languageVersion <= 2 ?
+                factory.getInternalName(node, false, true) :
+                factory.getLocalName(node, false, true);
             var decorate = emitHelpers().createDecorateHelper(decoratorExpressions, localName);
             var expression = factory.createAssignment(localName, classAlias ? factory.createAssignment(classAlias, decorate) : decorate);
             ts.setEmitFlags(expression, 1536);
@@ -70560,22 +75571,22 @@ var ts;
         }
         function shouldAddTypeMetadata(node) {
             var kind = node.kind;
-            return kind === 165
-                || kind === 167
-                || kind === 168
-                || kind === 163;
+            return kind === 168
+                || kind === 171
+                || kind === 172
+                || kind === 166;
         }
         function shouldAddReturnTypeMetadata(node) {
-            return node.kind === 165;
+            return node.kind === 168;
         }
         function shouldAddParamTypesMetadata(node) {
             switch (node.kind) {
-                case 252:
-                case 221:
+                case 256:
+                case 225:
                     return ts.getFirstConstructorWithBody(node) !== undefined;
-                case 165:
-                case 167:
                 case 168:
+                case 171:
+                case 172:
                     return true;
             }
             return false;
@@ -70587,15 +75598,15 @@ var ts;
         }
         function serializeTypeOfNode(node) {
             switch (node.kind) {
+                case 166:
                 case 163:
-                case 160:
                     return serializeTypeNode(node.type);
-                case 168:
-                case 167:
+                case 172:
+                case 171:
                     return serializeTypeNode(getAccessorTypeNode(node));
-                case 252:
-                case 221:
-                case 165:
+                case 256:
+                case 225:
+                case 168:
                     return factory.createIdentifier("Function");
                 default:
                     return factory.createVoidZero();
@@ -70627,7 +75638,7 @@ var ts;
             return factory.createArrayLiteralExpression(expressions);
         }
         function getParametersOfDecoratedDeclaration(node, container) {
-            if (container && node.kind === 167) {
+            if (container && node.kind === 171) {
                 var setAccessor = ts.getAllAccessorDeclarations(container.members, node).setAccessor;
                 if (setAccessor) {
                     return setAccessor.parameters;
@@ -70649,81 +75660,81 @@ var ts;
                 return factory.createIdentifier("Object");
             }
             switch (node.kind) {
-                case 113:
-                case 150:
-                case 141:
+                case 114:
+                case 152:
+                case 143:
                     return factory.createVoidZero();
-                case 186:
+                case 190:
                     return serializeTypeNode(node.type);
-                case 174:
-                case 175:
-                    return factory.createIdentifier("Function");
                 case 178:
                 case 179:
+                    return factory.createIdentifier("Function");
+                case 182:
+                case 183:
                     return factory.createIdentifier("Array");
-                case 172:
-                case 131:
+                case 176:
+                case 133:
                     return factory.createIdentifier("Boolean");
-                case 147:
+                case 149:
                     return factory.createIdentifier("String");
-                case 145:
+                case 147:
                     return factory.createIdentifier("Object");
-                case 191:
+                case 195:
                     switch (node.literal.kind) {
                         case 10:
                         case 14:
                             return factory.createIdentifier("String");
-                        case 214:
+                        case 218:
                         case 8:
                             return factory.createIdentifier("Number");
                         case 9:
                             return getGlobalBigIntNameWithFallback();
-                        case 109:
-                        case 94:
+                        case 110:
+                        case 95:
                             return factory.createIdentifier("Boolean");
-                        case 103:
+                        case 104:
                             return factory.createVoidZero();
                         default:
                             return ts.Debug.failBadSyntaxKind(node.literal);
                     }
-                case 144:
+                case 146:
                     return factory.createIdentifier("Number");
-                case 155:
+                case 157:
                     return getGlobalBigIntNameWithFallback();
-                case 148:
+                case 150:
                     return languageVersion < 2
                         ? getGlobalSymbolNameWithFallback()
                         : factory.createIdentifier("Symbol");
-                case 173:
+                case 177:
                     return serializeTypeReferenceNode(node);
-                case 183:
-                case 182:
+                case 187:
+                case 186:
                     return serializeTypeList(node.types);
-                case 184:
-                    return serializeTypeList([node.trueType, node.falseType]);
                 case 188:
-                    if (node.operator === 142) {
+                    return serializeTypeList([node.trueType, node.falseType]);
+                case 192:
+                    if (node.operator === 144) {
                         return serializeTypeNode(node.type);
                     }
                     break;
-                case 176:
-                case 189:
-                case 190:
-                case 177:
-                case 128:
-                case 152:
-                case 187:
-                case 195:
+                case 180:
+                case 193:
+                case 194:
+                case 181:
+                case 130:
+                case 154:
+                case 191:
+                case 199:
                     break;
-                case 303:
-                case 304:
-                case 308:
-                case 309:
                 case 310:
+                case 311:
+                case 315:
+                case 316:
+                case 317:
                     break;
-                case 305:
-                case 306:
-                case 307:
+                case 312:
+                case 313:
+                case 314:
                     return serializeTypeNode(node.type);
                 default:
                     return ts.Debug.failBadSyntaxKind(node);
@@ -70732,15 +75743,15 @@ var ts;
         }
         function serializeTypeList(types) {
             var serializedUnion;
-            for (var _i = 0, types_24 = types; _i < types_24.length; _i++) {
-                var typeNode = types_24[_i];
-                while (typeNode.kind === 186) {
+            for (var _i = 0, types_23 = types; _i < types_23.length; _i++) {
+                var typeNode = types_23[_i];
+                while (typeNode.kind === 190) {
                     typeNode = typeNode.type;
                 }
-                if (typeNode.kind === 141) {
+                if (typeNode.kind === 143) {
                     continue;
                 }
-                if (!strictNullChecks && (typeNode.kind === 191 && typeNode.literal.kind === 103 || typeNode.kind === 150)) {
+                if (!strictNullChecks && (typeNode.kind === 195 && typeNode.literal.kind === 104 || typeNode.kind === 152)) {
                     continue;
                 }
                 var serializedIndividual = serializeTypeNode(typeNode);
@@ -70802,11 +75813,11 @@ var ts;
             return factory.createLogicalAnd(factory.createStrictInequality(factory.createTypeOfExpression(left), factory.createStringLiteral("undefined")), right);
         }
         function serializeEntityNameAsExpressionFallback(node) {
-            if (node.kind === 78) {
+            if (node.kind === 79) {
                 var copied = serializeEntityNameAsExpression(node);
                 return createCheckedValue(copied, copied);
             }
-            if (node.left.kind === 78) {
+            if (node.left.kind === 79) {
                 return createCheckedValue(serializeEntityNameAsExpression(node.left), serializeEntityNameAsExpression(node));
             }
             var left = serializeEntityNameAsExpressionFallback(node.left);
@@ -70815,12 +75826,12 @@ var ts;
         }
         function serializeEntityNameAsExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     var name = ts.setParent(ts.setTextRange(ts.parseNodeFactory.cloneNode(node), node), node.parent);
                     name.original = undefined;
                     ts.setParent(name, ts.getParseTreeNode(currentLexicalScope));
                     return name;
-                case 157:
+                case 160:
                     return serializeQualifiedNameAsExpression(node);
             }
         }
@@ -70866,7 +75877,7 @@ var ts;
             return ts.visitNode(name, visitor, ts.isPropertyName);
         }
         function visitHeritageClause(node) {
-            if (node.token === 116) {
+            if (node.token === 117) {
                 return undefined;
             }
             return ts.visitEachChild(node, visitor, context);
@@ -71138,6 +76149,7 @@ var ts;
                 || (isExternalModuleExport(node)
                     && moduleKind !== ts.ModuleKind.ES2015
                     && moduleKind !== ts.ModuleKind.ES2020
+                    && moduleKind !== ts.ModuleKind.ES2022
                     && moduleKind !== ts.ModuleKind.ESNext
                     && moduleKind !== ts.ModuleKind.System);
         }
@@ -71164,11 +76176,11 @@ var ts;
         function addVarForEnumOrModuleDeclaration(statements, node) {
             var statement = factory.createVariableStatement(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.createVariableDeclarationList([
                 factory.createVariableDeclaration(factory.getLocalName(node, false, true))
-            ], currentLexicalScope.kind === 297 ? 0 : 1));
+            ], currentLexicalScope.kind === 303 ? 0 : 1));
             ts.setOriginalNode(statement, node);
             recordEmittedDeclarationInScope(node);
             if (isFirstEmittedDeclarationInScope(node)) {
-                if (node.kind === 255) {
+                if (node.kind === 259) {
                     ts.setSourceMapRange(statement.declarationList, node);
                 }
                 else {
@@ -71234,7 +76246,7 @@ var ts;
             var statementsLocation;
             var blockLocation;
             if (node.body) {
-                if (node.body.kind === 257) {
+                if (node.body.kind === 261) {
                     saveStateAndInvoke(node.body, function (body) { return ts.addRange(statements, ts.visitNodes(body.statements, namespaceElementVisitor, ts.isStatement)); });
                     statementsLocation = node.body.statements;
                     blockLocation = node.body;
@@ -71259,13 +76271,13 @@ var ts;
             currentScopeFirstDeclarationsOfName = savedCurrentScopeFirstDeclarationsOfName;
             var block = factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), statementsLocation), true);
             ts.setTextRange(block, blockLocation);
-            if (!node.body || node.body.kind !== 257) {
+            if (!node.body || node.body.kind !== 261) {
                 ts.setEmitFlags(block, ts.getEmitFlags(block) | 1536);
             }
             return block;
         }
         function getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration) {
-            if (moduleDeclaration.body.kind === 256) {
+            if (moduleDeclaration.body.kind === 260) {
                 var recursiveInnerModule = getInnerMostModuleDeclarationFromDottedModule(moduleDeclaration.body);
                 return recursiveInnerModule || moduleDeclaration.body;
             }
@@ -71281,28 +76293,28 @@ var ts;
             return importClause ||
                 compilerOptions.importsNotUsedAsValues === 1 ||
                 compilerOptions.importsNotUsedAsValues === 2
-                ? factory.updateImportDeclaration(node, undefined, undefined, importClause, node.moduleSpecifier)
+                ? factory.updateImportDeclaration(node, undefined, undefined, importClause, node.moduleSpecifier, node.assertClause)
                 : undefined;
         }
         function visitImportClause(node) {
-            if (node.isTypeOnly) {
-                return undefined;
-            }
-            var name = resolver.isReferencedAliasDeclaration(node) ? node.name : undefined;
+            ts.Debug.assert(!node.isTypeOnly);
+            var name = shouldEmitAliasDeclaration(node) ? node.name : undefined;
             var namedBindings = ts.visitNode(node.namedBindings, visitNamedImportBindings, ts.isNamedImportBindings);
             return (name || namedBindings) ? factory.updateImportClause(node, false, name, namedBindings) : undefined;
         }
         function visitNamedImportBindings(node) {
-            if (node.kind === 263) {
-                return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
+            if (node.kind === 267) {
+                return shouldEmitAliasDeclaration(node) ? node : undefined;
             }
             else {
+                var allowEmpty = compilerOptions.preserveValueImports && (compilerOptions.importsNotUsedAsValues === 1 ||
+                    compilerOptions.importsNotUsedAsValues === 2);
                 var elements = ts.visitNodes(node.elements, visitImportSpecifier, ts.isImportSpecifier);
-                return ts.some(elements) ? factory.updateNamedImports(node, elements) : undefined;
+                return allowEmpty || ts.some(elements) ? factory.updateNamedImports(node, elements) : undefined;
             }
         }
         function visitImportSpecifier(node) {
-            return resolver.isReferencedAliasDeclaration(node) ? node : undefined;
+            return !node.isTypeOnly && shouldEmitAliasDeclaration(node) ? node : undefined;
         }
         function visitExportAssignment(node) {
             return resolver.isValueAliasDeclaration(node)
@@ -71316,29 +76328,28 @@ var ts;
             if (!node.exportClause || ts.isNamespaceExport(node.exportClause)) {
                 return node;
             }
-            if (!resolver.isValueAliasDeclaration(node)) {
-                return undefined;
-            }
-            var exportClause = ts.visitNode(node.exportClause, visitNamedExportBindings, ts.isNamedExportBindings);
+            var allowEmpty = !!node.moduleSpecifier && (compilerOptions.importsNotUsedAsValues === 1 ||
+                compilerOptions.importsNotUsedAsValues === 2);
+            var exportClause = ts.visitNode(node.exportClause, function (bindings) { return visitNamedExportBindings(bindings, allowEmpty); }, ts.isNamedExportBindings);
             return exportClause
-                ? factory.updateExportDeclaration(node, undefined, undefined, node.isTypeOnly, exportClause, node.moduleSpecifier)
+                ? factory.updateExportDeclaration(node, undefined, undefined, node.isTypeOnly, exportClause, node.moduleSpecifier, node.assertClause)
                 : undefined;
         }
-        function visitNamedExports(node) {
+        function visitNamedExports(node, allowEmpty) {
             var elements = ts.visitNodes(node.elements, visitExportSpecifier, ts.isExportSpecifier);
-            return ts.some(elements) ? factory.updateNamedExports(node, elements) : undefined;
+            return allowEmpty || ts.some(elements) ? factory.updateNamedExports(node, elements) : undefined;
         }
         function visitNamespaceExports(node) {
             return factory.updateNamespaceExport(node, ts.visitNode(node.name, visitor, ts.isIdentifier));
         }
-        function visitNamedExportBindings(node) {
-            return ts.isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node);
+        function visitNamedExportBindings(node, allowEmpty) {
+            return ts.isNamespaceExport(node) ? visitNamespaceExports(node) : visitNamedExports(node, allowEmpty);
         }
         function visitExportSpecifier(node) {
-            return resolver.isValueAliasDeclaration(node) ? node : undefined;
+            return !node.isTypeOnly && resolver.isValueAliasDeclaration(node) ? node : undefined;
         }
         function shouldEmitImportEqualsDeclaration(node) {
-            return resolver.isReferencedAliasDeclaration(node)
+            return shouldEmitAliasDeclaration(node)
                 || (!ts.isExternalModule(currentSourceFile)
                     && resolver.isTopLevelValueImportEqualsWithEntityName(node));
         }
@@ -71347,9 +76358,9 @@ var ts;
                 return undefined;
             }
             if (ts.isExternalModuleImportEqualsDeclaration(node)) {
-                var isReferenced = resolver.isReferencedAliasDeclaration(node);
+                var isReferenced = shouldEmitAliasDeclaration(node);
                 if (!isReferenced && compilerOptions.importsNotUsedAsValues === 1) {
-                    return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(undefined, undefined, undefined, node.moduleReference.expression), node), node);
+                    return ts.setOriginalNode(ts.setTextRange(factory.createImportDeclaration(undefined, undefined, undefined, node.moduleReference.expression, undefined), node), node);
                 }
                 return isReferenced ? ts.visitEachChild(node, visitor, context) : undefined;
             }
@@ -71421,36 +76432,36 @@ var ts;
             return factory.createPropertyAccessExpression(factory.getDeclarationName(node), "prototype");
         }
         function getClassMemberPrefix(node, member) {
-            return ts.hasSyntacticModifier(member, 32)
+            return ts.isStatic(member)
                 ? factory.getDeclarationName(node)
                 : getClassPrototype(node);
         }
         function enableSubstitutionForNonQualifiedEnumMembers() {
             if ((enabledSubstitutions & 8) === 0) {
                 enabledSubstitutions |= 8;
-                context.enableSubstitution(78);
+                context.enableSubstitution(79);
             }
         }
         function enableSubstitutionForClassAliases() {
             if ((enabledSubstitutions & 1) === 0) {
                 enabledSubstitutions |= 1;
-                context.enableSubstitution(78);
+                context.enableSubstitution(79);
                 classAliases = [];
             }
         }
         function enableSubstitutionForNamespaceExports() {
             if ((enabledSubstitutions & 2) === 0) {
                 enabledSubstitutions |= 2;
-                context.enableSubstitution(78);
-                context.enableSubstitution(289);
-                context.enableEmitNotification(256);
+                context.enableSubstitution(79);
+                context.enableSubstitution(295);
+                context.enableEmitNotification(260);
             }
         }
         function isTransformedModuleDeclaration(node) {
-            return ts.getOriginalNode(node).kind === 256;
+            return ts.getOriginalNode(node).kind === 260;
         }
         function isTransformedEnumDeclaration(node) {
-            return ts.getOriginalNode(node).kind === 255;
+            return ts.getOriginalNode(node).kind === 259;
         }
         function onEmitNode(hint, node, emitCallback) {
             var savedApplicableSubstitutions = applicableSubstitutions;
@@ -71494,11 +76505,11 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return substituteExpressionIdentifier(node);
-                case 201:
+                case 205:
                     return substitutePropertyAccessExpression(node);
-                case 202:
+                case 206:
                     return substituteElementAccessExpression(node);
             }
             return node;
@@ -71515,10 +76526,10 @@ var ts;
                     if (declaration) {
                         var classAlias = classAliases[declaration.id];
                         if (classAlias) {
-                            var clone_1 = factory.cloneNode(classAlias);
-                            ts.setSourceMapRange(clone_1, node);
-                            ts.setCommentRange(clone_1, node);
-                            return clone_1;
+                            var clone_2 = factory.cloneNode(classAlias);
+                            ts.setSourceMapRange(clone_2, node);
+                            ts.setCommentRange(clone_2, node);
+                            return clone_2;
                         }
                     }
                 }
@@ -71528,9 +76539,9 @@ var ts;
         function trySubstituteNamespaceExportedName(node) {
             if (enabledSubstitutions & applicableSubstitutions && !ts.isGeneratedIdentifier(node) && !ts.isLocalName(node)) {
                 var container = resolver.getReferencedExportContainer(node, false);
-                if (container && container.kind !== 297) {
-                    var substitute = (applicableSubstitutions & 2 && container.kind === 256) ||
-                        (applicableSubstitutions & 8 && container.kind === 255);
+                if (container && container.kind !== 303) {
+                    var substitute = (applicableSubstitutions & 2 && container.kind === 260) ||
+                        (applicableSubstitutions & 8 && container.kind === 259);
                     if (substitute) {
                         return ts.setTextRange(factory.createPropertyAccessExpression(factory.getGeneratedNameForNode(container), node), node);
                     }
@@ -71554,7 +76565,7 @@ var ts;
                     var propertyName = ts.isPropertyAccessExpression(originalNode)
                         ? ts.declarationNameToString(originalNode.name)
                         : ts.getTextOfNode(originalNode.argumentExpression);
-                    ts.addSyntheticTrailingComment(substitute, 3, " " + propertyName + " ");
+                    ts.addSyntheticTrailingComment(substitute, 3, " ".concat(propertyName, " "));
                 }
                 return substitute;
             }
@@ -71566,96 +76577,164 @@ var ts;
             }
             return ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node) ? resolver.getConstantValue(node) : undefined;
         }
+        function shouldEmitAliasDeclaration(node) {
+            return compilerOptions.preserveValueImports
+                ? resolver.isValueAliasDeclaration(node)
+                : resolver.isReferencedAliasDeclaration(node);
+        }
     }
     ts.transformTypeScript = transformTypeScript;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
     function transformClassFields(context) {
-        var factory = context.factory, hoistVariableDeclaration = context.hoistVariableDeclaration, endLexicalEnvironment = context.endLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment;
+        var factory = context.factory, hoistVariableDeclaration = context.hoistVariableDeclaration, endLexicalEnvironment = context.endLexicalEnvironment, startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, addBlockScopedVariable = context.addBlockScopedVariable;
         var resolver = context.getEmitResolver();
         var compilerOptions = context.getCompilerOptions();
         var languageVersion = ts.getEmitScriptTarget(compilerOptions);
-        var shouldTransformPrivateFields = languageVersion < 99;
+        var useDefineForClassFields = ts.getUseDefineForClassFields(compilerOptions);
+        var shouldTransformPrivateElementsOrClassStaticBlocks = languageVersion < 99;
+        var shouldTransformSuperInStaticInitializers = (languageVersion <= 8 || !useDefineForClassFields) && languageVersion >= 2;
+        var shouldTransformThisInStaticInitializers = languageVersion <= 8 || !useDefineForClassFields;
         var previousOnSubstituteNode = context.onSubstituteNode;
         context.onSubstituteNode = onSubstituteNode;
+        var previousOnEmitNode = context.onEmitNode;
+        context.onEmitNode = onEmitNode;
         var enabledSubstitutions;
         var classAliases;
         var pendingExpressions;
         var pendingStatements;
-        var privateIdentifierEnvironmentStack = [];
-        var currentPrivateIdentifierEnvironment;
+        var classLexicalEnvironmentStack = [];
+        var classLexicalEnvironmentMap = new ts.Map();
+        var currentClassLexicalEnvironment;
+        var currentComputedPropertyNameClassLexicalEnvironment;
+        var currentStaticPropertyDeclarationOrStaticBlock;
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
             var options = context.getCompilerOptions();
             if (node.isDeclarationFile
-                || options.useDefineForClassFields && options.target === 99) {
+                || useDefineForClassFields && ts.getEmitScriptTarget(options) === 99) {
                 return node;
             }
             var visited = ts.visitEachChild(node, visitor, context);
             ts.addEmitHelpers(visited, context.readEmitHelpers());
             return visited;
         }
+        function visitorWorker(node, valueIsDiscarded) {
+            if (node.transformFlags & 8388608) {
+                switch (node.kind) {
+                    case 225:
+                    case 256:
+                        return visitClassLike(node);
+                    case 166:
+                        return visitPropertyDeclaration(node);
+                    case 236:
+                        return visitVariableStatement(node);
+                    case 80:
+                        return visitPrivateIdentifier(node);
+                    case 169:
+                        return visitClassStaticBlockDeclaration(node);
+                }
+            }
+            if (node.transformFlags & 8388608 ||
+                node.transformFlags & 33554432 &&
+                    shouldTransformSuperInStaticInitializers &&
+                    currentStaticPropertyDeclarationOrStaticBlock &&
+                    currentClassLexicalEnvironment) {
+                switch (node.kind) {
+                    case 218:
+                    case 219:
+                        return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded);
+                    case 220:
+                        return visitBinaryExpression(node, valueIsDiscarded);
+                    case 207:
+                        return visitCallExpression(node);
+                    case 209:
+                        return visitTaggedTemplateExpression(node);
+                    case 205:
+                        return visitPropertyAccessExpression(node);
+                    case 206:
+                        return visitElementAccessExpression(node);
+                    case 237:
+                        return visitExpressionStatement(node);
+                    case 241:
+                        return visitForStatement(node);
+                    case 255:
+                    case 212:
+                    case 170:
+                    case 168:
+                    case 171:
+                    case 172: {
+                        var savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock;
+                        currentStaticPropertyDeclarationOrStaticBlock = undefined;
+                        var result = ts.visitEachChild(node, visitor, context);
+                        currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock;
+                        return result;
+                    }
+                }
+            }
+            return ts.visitEachChild(node, visitor, context);
+        }
+        function discardedValueVisitor(node) {
+            return visitorWorker(node, true);
+        }
         function visitor(node) {
-            if (!(node.transformFlags & 4194304))
-                return node;
+            return visitorWorker(node, false);
+        }
+        function heritageClauseVisitor(node) {
             switch (node.kind) {
-                case 221:
-                case 252:
-                    return visitClassLike(node);
-                case 163:
-                    return visitPropertyDeclaration(node);
-                case 232:
-                    return visitVariableStatement(node);
-                case 201:
-                    return visitPropertyAccessExpression(node);
-                case 214:
-                    return visitPrefixUnaryExpression(node);
-                case 215:
-                    return visitPostfixUnaryExpression(node, false);
-                case 203:
-                    return visitCallExpression(node);
-                case 216:
-                    return visitBinaryExpression(node);
-                case 79:
-                    return visitPrivateIdentifier(node);
-                case 233:
-                    return visitExpressionStatement(node);
-                case 237:
-                    return visitForStatement(node);
-                case 205:
-                    return visitTaggedTemplateExpression(node);
+                case 290:
+                    return ts.visitEachChild(node, heritageClauseVisitor, context);
+                case 227:
+                    return visitExpressionWithTypeArguments(node);
             }
-            return ts.visitEachChild(node, visitor, context);
+            return visitor(node);
         }
         function visitorDestructuringTarget(node) {
             switch (node.kind) {
-                case 200:
-                case 199:
+                case 204:
+                case 203:
                     return visitAssignmentPattern(node);
                 default:
                     return visitor(node);
             }
         }
         function visitPrivateIdentifier(node) {
-            if (!shouldTransformPrivateFields) {
+            if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
+                return node;
+            }
+            if (ts.isStatement(node.parent)) {
                 return node;
             }
             return ts.setOriginalNode(factory.createIdentifier(""), node);
         }
+        function visitPrivateIdentifierInInExpression(node) {
+            if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
+                return node;
+            }
+            var privId = node.left;
+            ts.Debug.assertNode(privId, ts.isPrivateIdentifier);
+            ts.Debug.assert(node.operatorToken.kind === 101);
+            var info = accessPrivateIdentifier(privId);
+            if (info) {
+                var receiver = ts.visitNode(node.right, visitor, ts.isExpression);
+                return ts.setOriginalNode(context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver), node);
+            }
+            return ts.visitEachChild(node, visitor, context);
+        }
         function classElementVisitor(node) {
             switch (node.kind) {
-                case 166:
+                case 170:
                     return undefined;
-                case 167:
+                case 171:
+                case 172:
                 case 168:
-                case 165:
-                    return ts.visitEachChild(node, classElementVisitor, context);
-                case 163:
+                    return visitMethodOrAccessorDeclaration(node);
+                case 166:
                     return visitPropertyDeclaration(node);
-                case 158:
+                case 161:
                     return visitComputedPropertyName(node);
-                case 229:
+                case 233:
                     return node;
                 default:
                     return visitor(node);
@@ -71665,7 +76744,7 @@ var ts;
             var savedPendingStatements = pendingStatements;
             pendingStatements = [];
             var visitedNode = ts.visitEachChild(node, visitor, context);
-            var statement = ts.some(pendingStatements) ? __spreadArray([visitedNode], pendingStatements) :
+            var statement = ts.some(pendingStatements) ? __spreadArray([visitedNode], pendingStatements, true) :
                 visitedNode;
             pendingStatements = savedPendingStatements;
             return statement;
@@ -71680,79 +76759,187 @@ var ts;
             }
             return node;
         }
+        function visitMethodOrAccessorDeclaration(node) {
+            ts.Debug.assert(!ts.some(node.decorators));
+            if (!shouldTransformPrivateElementsOrClassStaticBlocks || !ts.isPrivateIdentifier(node.name)) {
+                return ts.visitEachChild(node, classElementVisitor, context);
+            }
+            var info = accessPrivateIdentifier(node.name);
+            ts.Debug.assert(info, "Undeclared private name for property declaration.");
+            if (!info.isValid) {
+                return node;
+            }
+            var functionName = getHoistedFunctionName(node);
+            if (functionName) {
+                getPendingExpressions().push(factory.createAssignment(functionName, factory.createFunctionExpression(ts.filter(node.modifiers, function (m) { return !ts.isStaticModifier(m); }), node.asteriskToken, functionName, undefined, ts.visitParameterList(node.parameters, classElementVisitor, context), undefined, ts.visitFunctionBody(node.body, classElementVisitor, context))));
+            }
+            return undefined;
+        }
+        function getHoistedFunctionName(node) {
+            ts.Debug.assert(ts.isPrivateIdentifier(node.name));
+            var info = accessPrivateIdentifier(node.name);
+            ts.Debug.assert(info, "Undeclared private name for property declaration.");
+            if (info.kind === "m") {
+                return info.methodName;
+            }
+            if (info.kind === "a") {
+                if (ts.isGetAccessor(node)) {
+                    return info.getterName;
+                }
+                if (ts.isSetAccessor(node)) {
+                    return info.setterName;
+                }
+            }
+        }
         function visitPropertyDeclaration(node) {
             ts.Debug.assert(!ts.some(node.decorators));
-            if (!shouldTransformPrivateFields && ts.isPrivateIdentifier(node.name)) {
-                return factory.updatePropertyDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, undefined, undefined);
+            if (ts.isPrivateIdentifier(node.name)) {
+                if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
+                    return factory.updatePropertyDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.name, undefined, undefined, undefined);
+                }
+                var info = accessPrivateIdentifier(node.name);
+                ts.Debug.assert(info, "Undeclared private name for property declaration.");
+                if (!info.isValid) {
+                    return node;
+                }
             }
-            var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || !!context.getCompilerOptions().useDefineForClassFields);
+            var expr = getPropertyNameExpressionIfNeeded(node.name, !!node.initializer || useDefineForClassFields);
             if (expr && !ts.isSimpleInlineableExpression(expr)) {
                 getPendingExpressions().push(expr);
             }
             return undefined;
         }
         function createPrivateIdentifierAccess(info, receiver) {
-            receiver = ts.visitNode(receiver, visitor, ts.isExpression);
-            switch (info.placement) {
-                case 0:
-                    return context.getEmitHelperFactory().createClassPrivateFieldGetHelper(ts.nodeIsSynthesized(receiver) ? receiver : factory.cloneNode(receiver), info.weakMapName);
-                default: return ts.Debug.fail("Unexpected private identifier placement");
+            return createPrivateIdentifierAccessHelper(info, ts.visitNode(receiver, visitor, ts.isExpression));
+        }
+        function createPrivateIdentifierAccessHelper(info, receiver) {
+            ts.setCommentRange(receiver, ts.moveRangePos(receiver, -1));
+            switch (info.kind) {
+                case "a":
+                    return context.getEmitHelperFactory().createClassPrivateFieldGetHelper(receiver, info.brandCheckIdentifier, info.kind, info.getterName);
+                case "m":
+                    return context.getEmitHelperFactory().createClassPrivateFieldGetHelper(receiver, info.brandCheckIdentifier, info.kind, info.methodName);
+                case "f":
+                    return context.getEmitHelperFactory().createClassPrivateFieldGetHelper(receiver, info.brandCheckIdentifier, info.kind, info.variableName);
+                default:
+                    ts.Debug.assertNever(info, "Unknown private element type");
             }
         }
         function visitPropertyAccessExpression(node) {
-            if (shouldTransformPrivateFields && ts.isPrivateIdentifier(node.name)) {
+            if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifier(node.name)) {
                 var privateIdentifierInfo = accessPrivateIdentifier(node.name);
                 if (privateIdentifierInfo) {
-                    return ts.setOriginalNode(createPrivateIdentifierAccess(privateIdentifierInfo, node.expression), node);
+                    return ts.setTextRange(ts.setOriginalNode(createPrivateIdentifierAccess(privateIdentifierInfo, node.expression), node), node);
+                }
+            }
+            if (shouldTransformSuperInStaticInitializers &&
+                ts.isSuperProperty(node) &&
+                ts.isIdentifier(node.name) &&
+                currentStaticPropertyDeclarationOrStaticBlock &&
+                currentClassLexicalEnvironment) {
+                var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts;
+                if (facts & 1) {
+                    return visitInvalidSuperProperty(node);
+                }
+                if (classConstructor && superClassReference) {
+                    var superProperty = factory.createReflectGetCall(superClassReference, factory.createStringLiteralFromNode(node.name), classConstructor);
+                    ts.setOriginalNode(superProperty, node.expression);
+                    ts.setTextRange(superProperty, node.expression);
+                    return superProperty;
                 }
             }
             return ts.visitEachChild(node, visitor, context);
         }
-        function visitPrefixUnaryExpression(node) {
-            if (shouldTransformPrivateFields && ts.isPrivateIdentifierPropertyAccessExpression(node.operand)) {
-                var operator = node.operator === 45 ?
-                    39 : node.operator === 46 ?
-                    40 : undefined;
-                var info = void 0;
-                if (operator && (info = accessPrivateIdentifier(node.operand.name))) {
-                    var receiver = ts.visitNode(node.operand.expression, visitor, ts.isExpression);
-                    var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
-                    var existingValue = factory.createPrefixUnaryExpression(39, createPrivateIdentifierAccess(info, readExpression));
-                    return ts.setOriginalNode(createPrivateIdentifierAssignment(info, initializeExpression || readExpression, factory.createBinaryExpression(existingValue, operator, factory.createNumericLiteral(1)), 62), node);
+        function visitElementAccessExpression(node) {
+            if (shouldTransformSuperInStaticInitializers &&
+                ts.isSuperProperty(node) &&
+                currentStaticPropertyDeclarationOrStaticBlock &&
+                currentClassLexicalEnvironment) {
+                var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts;
+                if (facts & 1) {
+                    return visitInvalidSuperProperty(node);
+                }
+                if (classConstructor && superClassReference) {
+                    var superProperty = factory.createReflectGetCall(superClassReference, ts.visitNode(node.argumentExpression, visitor, ts.isExpression), classConstructor);
+                    ts.setOriginalNode(superProperty, node.expression);
+                    ts.setTextRange(superProperty, node.expression);
+                    return superProperty;
                 }
             }
             return ts.visitEachChild(node, visitor, context);
         }
-        function visitPostfixUnaryExpression(node, valueIsDiscarded) {
-            if (shouldTransformPrivateFields && ts.isPrivateIdentifierPropertyAccessExpression(node.operand)) {
-                var operator = node.operator === 45 ?
-                    39 : node.operator === 46 ?
-                    40 : undefined;
-                var info = void 0;
-                if (operator && (info = accessPrivateIdentifier(node.operand.name))) {
-                    var receiver = ts.visitNode(node.operand.expression, visitor, ts.isExpression);
-                    var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
-                    var existingValue = factory.createPrefixUnaryExpression(39, createPrivateIdentifierAccess(info, readExpression));
-                    var returnValue = valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
-                    return ts.setOriginalNode(factory.inlineExpressions(ts.compact([
-                        createPrivateIdentifierAssignment(info, initializeExpression || readExpression, factory.createBinaryExpression(returnValue ? factory.createAssignment(returnValue, existingValue) : existingValue, operator, factory.createNumericLiteral(1)), 62),
-                        returnValue
-                    ])), node);
+        function visitPreOrPostfixUnaryExpression(node, valueIsDiscarded) {
+            if (node.operator === 45 || node.operator === 46) {
+                if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifierPropertyAccessExpression(node.operand)) {
+                    var info = void 0;
+                    if (info = accessPrivateIdentifier(node.operand.name)) {
+                        var receiver = ts.visitNode(node.operand.expression, visitor, ts.isExpression);
+                        var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
+                        var expression = createPrivateIdentifierAccess(info, readExpression);
+                        var temp = ts.isPrefixUnaryExpression(node) || valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
+                        expression = ts.expandPreOrPostfixIncrementOrDecrementExpression(factory, node, expression, hoistVariableDeclaration, temp);
+                        expression = createPrivateIdentifierAssignment(info, initializeExpression || readExpression, expression, 63);
+                        ts.setOriginalNode(expression, node);
+                        ts.setTextRange(expression, node);
+                        if (temp) {
+                            expression = factory.createComma(expression, temp);
+                            ts.setTextRange(expression, node);
+                        }
+                        return expression;
+                    }
+                }
+                else if (shouldTransformSuperInStaticInitializers &&
+                    ts.isSuperProperty(node.operand) &&
+                    currentStaticPropertyDeclarationOrStaticBlock &&
+                    currentClassLexicalEnvironment) {
+                    var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts;
+                    if (facts & 1) {
+                        var operand = visitInvalidSuperProperty(node.operand);
+                        return ts.isPrefixUnaryExpression(node) ?
+                            factory.updatePrefixUnaryExpression(node, operand) :
+                            factory.updatePostfixUnaryExpression(node, operand);
+                    }
+                    if (classConstructor && superClassReference) {
+                        var setterName = void 0;
+                        var getterName = void 0;
+                        if (ts.isPropertyAccessExpression(node.operand)) {
+                            if (ts.isIdentifier(node.operand.name)) {
+                                getterName = setterName = factory.createStringLiteralFromNode(node.operand.name);
+                            }
+                        }
+                        else {
+                            if (ts.isSimpleInlineableExpression(node.operand.argumentExpression)) {
+                                getterName = setterName = node.operand.argumentExpression;
+                            }
+                            else {
+                                getterName = factory.createTempVariable(hoistVariableDeclaration);
+                                setterName = factory.createAssignment(getterName, ts.visitNode(node.operand.argumentExpression, visitor, ts.isExpression));
+                            }
+                        }
+                        if (setterName && getterName) {
+                            var expression = factory.createReflectGetCall(superClassReference, getterName, classConstructor);
+                            ts.setTextRange(expression, node.operand);
+                            var temp = valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
+                            expression = ts.expandPreOrPostfixIncrementOrDecrementExpression(factory, node, expression, hoistVariableDeclaration, temp);
+                            expression = factory.createReflectSetCall(superClassReference, setterName, expression, classConstructor);
+                            ts.setOriginalNode(expression, node);
+                            ts.setTextRange(expression, node);
+                            if (temp) {
+                                expression = factory.createComma(expression, temp);
+                                ts.setTextRange(expression, node);
+                            }
+                            return expression;
+                        }
+                    }
                 }
             }
             return ts.visitEachChild(node, visitor, context);
         }
         function visitForStatement(node) {
-            if (node.incrementor && ts.isPostfixUnaryExpression(node.incrementor)) {
-                return factory.updateForStatement(node, ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), visitPostfixUnaryExpression(node.incrementor, true), ts.visitNode(node.statement, visitor, ts.isStatement));
-            }
-            return ts.visitEachChild(node, visitor, context);
+            return factory.updateForStatement(node, ts.visitNode(node.initializer, discardedValueVisitor, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, discardedValueVisitor, ts.isExpression), ts.visitIterationBody(node.statement, visitor, context));
         }
         function visitExpressionStatement(node) {
-            if (ts.isPostfixUnaryExpression(node.expression)) {
-                return factory.updateExpressionStatement(node, visitPostfixUnaryExpression(node.expression, true));
-            }
-            return ts.visitEachChild(node, visitor, context);
+            return factory.updateExpressionStatement(node, ts.visitNode(node.expression, discardedValueVisitor, ts.isExpression));
         }
         function createCopiableReceiverExpr(receiver) {
             var clone = ts.nodeIsSynthesized(receiver) ? receiver : factory.cloneNode(receiver);
@@ -71764,122 +76951,286 @@ var ts;
             return { readExpression: readExpression, initializeExpression: initializeExpression };
         }
         function visitCallExpression(node) {
-            if (shouldTransformPrivateFields && ts.isPrivateIdentifierPropertyAccessExpression(node.expression)) {
+            if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifierPropertyAccessExpression(node.expression)) {
                 var _a = factory.createCallBinding(node.expression, hoistVariableDeclaration, languageVersion), thisArg = _a.thisArg, target = _a.target;
                 if (ts.isCallChain(node)) {
-                    return factory.updateCallChain(node, factory.createPropertyAccessChain(ts.visitNode(target, visitor), node.questionDotToken, "call"), undefined, undefined, __spreadArray([ts.visitNode(thisArg, visitor, ts.isExpression)], ts.visitNodes(node.arguments, visitor, ts.isExpression)));
+                    return factory.updateCallChain(node, factory.createPropertyAccessChain(ts.visitNode(target, visitor), node.questionDotToken, "call"), undefined, undefined, __spreadArray([ts.visitNode(thisArg, visitor, ts.isExpression)], ts.visitNodes(node.arguments, visitor, ts.isExpression), true));
                 }
-                return factory.updateCallExpression(node, factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "call"), undefined, __spreadArray([ts.visitNode(thisArg, visitor, ts.isExpression)], ts.visitNodes(node.arguments, visitor, ts.isExpression)));
+                return factory.updateCallExpression(node, factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "call"), undefined, __spreadArray([ts.visitNode(thisArg, visitor, ts.isExpression)], ts.visitNodes(node.arguments, visitor, ts.isExpression), true));
+            }
+            if (shouldTransformSuperInStaticInitializers &&
+                ts.isSuperProperty(node.expression) &&
+                currentStaticPropertyDeclarationOrStaticBlock &&
+                (currentClassLexicalEnvironment === null || currentClassLexicalEnvironment === void 0 ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
+                var invocation = factory.createFunctionCallCall(ts.visitNode(node.expression, visitor, ts.isExpression), currentClassLexicalEnvironment.classConstructor, ts.visitNodes(node.arguments, visitor, ts.isExpression));
+                ts.setOriginalNode(invocation, node);
+                ts.setTextRange(invocation, node);
+                return invocation;
             }
             return ts.visitEachChild(node, visitor, context);
         }
         function visitTaggedTemplateExpression(node) {
-            if (shouldTransformPrivateFields && ts.isPrivateIdentifierPropertyAccessExpression(node.tag)) {
+            if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifierPropertyAccessExpression(node.tag)) {
                 var _a = factory.createCallBinding(node.tag, hoistVariableDeclaration, languageVersion), thisArg = _a.thisArg, target = _a.target;
                 return factory.updateTaggedTemplateExpression(node, factory.createCallExpression(factory.createPropertyAccessExpression(ts.visitNode(target, visitor), "bind"), undefined, [ts.visitNode(thisArg, visitor, ts.isExpression)]), undefined, ts.visitNode(node.template, visitor, ts.isTemplateLiteral));
             }
+            if (shouldTransformSuperInStaticInitializers &&
+                ts.isSuperProperty(node.tag) &&
+                currentStaticPropertyDeclarationOrStaticBlock &&
+                (currentClassLexicalEnvironment === null || currentClassLexicalEnvironment === void 0 ? void 0 : currentClassLexicalEnvironment.classConstructor)) {
+                var invocation = factory.createFunctionBindCall(ts.visitNode(node.tag, visitor, ts.isExpression), currentClassLexicalEnvironment.classConstructor, []);
+                ts.setOriginalNode(invocation, node);
+                ts.setTextRange(invocation, node);
+                return factory.updateTaggedTemplateExpression(node, invocation, undefined, ts.visitNode(node.template, visitor, ts.isTemplateLiteral));
+            }
             return ts.visitEachChild(node, visitor, context);
         }
-        function visitBinaryExpression(node) {
-            if (shouldTransformPrivateFields) {
-                if (ts.isDestructuringAssignment(node)) {
-                    var savedPendingExpressions = pendingExpressions;
-                    pendingExpressions = undefined;
-                    node = factory.updateBinaryExpression(node, ts.visitNode(node.left, visitorDestructuringTarget), node.operatorToken, ts.visitNode(node.right, visitor));
-                    var expr = ts.some(pendingExpressions) ?
-                        factory.inlineExpressions(ts.compact(__spreadArray(__spreadArray([], pendingExpressions), [node]))) :
-                        node;
-                    pendingExpressions = savedPendingExpressions;
-                    return expr;
-                }
-                if (ts.isAssignmentExpression(node) && ts.isPrivateIdentifierPropertyAccessExpression(node.left)) {
+        function transformClassStaticBlockDeclaration(node) {
+            if (shouldTransformPrivateElementsOrClassStaticBlocks) {
+                if (currentClassLexicalEnvironment) {
+                    classLexicalEnvironmentMap.set(ts.getOriginalNodeId(node), currentClassLexicalEnvironment);
+                }
+                startLexicalEnvironment();
+                var savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock;
+                currentStaticPropertyDeclarationOrStaticBlock = node;
+                var statements = ts.visitNodes(node.body.statements, visitor, ts.isStatement);
+                statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment());
+                currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock;
+                var iife = factory.createImmediatelyInvokedArrowFunction(statements);
+                ts.setOriginalNode(iife, node);
+                ts.setTextRange(iife, node);
+                ts.addEmitFlags(iife, 2);
+                return iife;
+            }
+        }
+        function visitBinaryExpression(node, valueIsDiscarded) {
+            if (ts.isDestructuringAssignment(node)) {
+                var savedPendingExpressions = pendingExpressions;
+                pendingExpressions = undefined;
+                node = factory.updateBinaryExpression(node, ts.visitNode(node.left, visitorDestructuringTarget), node.operatorToken, ts.visitNode(node.right, visitor));
+                var expr = ts.some(pendingExpressions) ?
+                    factory.inlineExpressions(ts.compact(__spreadArray(__spreadArray([], pendingExpressions, true), [node], false))) :
+                    node;
+                pendingExpressions = savedPendingExpressions;
+                return expr;
+            }
+            if (ts.isAssignmentExpression(node)) {
+                if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifierPropertyAccessExpression(node.left)) {
                     var info = accessPrivateIdentifier(node.left.name);
                     if (info) {
-                        return ts.setOriginalNode(createPrivateIdentifierAssignment(info, node.left.expression, node.right, node.operatorToken.kind), node);
+                        return ts.setTextRange(ts.setOriginalNode(createPrivateIdentifierAssignment(info, node.left.expression, node.right, node.operatorToken.kind), node), node);
+                    }
+                }
+                else if (shouldTransformSuperInStaticInitializers &&
+                    ts.isSuperProperty(node.left) &&
+                    currentStaticPropertyDeclarationOrStaticBlock &&
+                    currentClassLexicalEnvironment) {
+                    var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts;
+                    if (facts & 1) {
+                        return factory.updateBinaryExpression(node, visitInvalidSuperProperty(node.left), node.operatorToken, ts.visitNode(node.right, visitor, ts.isExpression));
+                    }
+                    if (classConstructor && superClassReference) {
+                        var setterName = ts.isElementAccessExpression(node.left) ? ts.visitNode(node.left.argumentExpression, visitor, ts.isExpression) :
+                            ts.isIdentifier(node.left.name) ? factory.createStringLiteralFromNode(node.left.name) :
+                                undefined;
+                        if (setterName) {
+                            var expression = ts.visitNode(node.right, visitor, ts.isExpression);
+                            if (ts.isCompoundAssignment(node.operatorToken.kind)) {
+                                var getterName = setterName;
+                                if (!ts.isSimpleInlineableExpression(setterName)) {
+                                    getterName = factory.createTempVariable(hoistVariableDeclaration);
+                                    setterName = factory.createAssignment(getterName, setterName);
+                                }
+                                var superPropertyGet = factory.createReflectGetCall(superClassReference, getterName, classConstructor);
+                                ts.setOriginalNode(superPropertyGet, node.left);
+                                ts.setTextRange(superPropertyGet, node.left);
+                                expression = factory.createBinaryExpression(superPropertyGet, ts.getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind), expression);
+                                ts.setTextRange(expression, node);
+                            }
+                            var temp = valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
+                            if (temp) {
+                                expression = factory.createAssignment(temp, expression);
+                                ts.setTextRange(temp, node);
+                            }
+                            expression = factory.createReflectSetCall(superClassReference, setterName, expression, classConstructor);
+                            ts.setOriginalNode(expression, node);
+                            ts.setTextRange(expression, node);
+                            if (temp) {
+                                expression = factory.createComma(expression, temp);
+                                ts.setTextRange(expression, node);
+                            }
+                            return expression;
+                        }
                     }
                 }
             }
+            if (node.operatorToken.kind === 101 && ts.isPrivateIdentifier(node.left)) {
+                return visitPrivateIdentifierInInExpression(node);
+            }
             return ts.visitEachChild(node, visitor, context);
         }
         function createPrivateIdentifierAssignment(info, receiver, right, operator) {
-            switch (info.placement) {
-                case 0: {
-                    return createPrivateIdentifierInstanceFieldAssignment(info, receiver, right, operator);
-                }
-                default: return ts.Debug.fail("Unexpected private identifier placement");
-            }
-        }
-        function createPrivateIdentifierInstanceFieldAssignment(info, receiver, right, operator) {
             receiver = ts.visitNode(receiver, visitor, ts.isExpression);
             right = ts.visitNode(right, visitor, ts.isExpression);
             if (ts.isCompoundAssignment(operator)) {
                 var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
-                return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(initializeExpression || readExpression, info.weakMapName, factory.createBinaryExpression(context.getEmitHelperFactory().createClassPrivateFieldGetHelper(readExpression, info.weakMapName), ts.getNonAssignmentOperatorForCompoundAssignment(operator), right));
-            }
-            else {
-                return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.weakMapName, right);
+                receiver = initializeExpression || readExpression;
+                right = factory.createBinaryExpression(createPrivateIdentifierAccessHelper(info, readExpression), ts.getNonAssignmentOperatorForCompoundAssignment(operator), right);
+            }
+            ts.setCommentRange(receiver, ts.moveRangePos(receiver, -1));
+            switch (info.kind) {
+                case "a":
+                    return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind, info.setterName);
+                case "m":
+                    return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind, undefined);
+                case "f":
+                    return context.getEmitHelperFactory().createClassPrivateFieldSetHelper(receiver, info.brandCheckIdentifier, right, info.kind, info.variableName);
+                default:
+                    ts.Debug.assertNever(info, "Unknown private element type");
             }
         }
         function visitClassLike(node) {
+            if (!ts.forEach(node.members, doesClassElementNeedTransform)) {
+                return ts.visitEachChild(node, visitor, context);
+            }
             var savedPendingExpressions = pendingExpressions;
             pendingExpressions = undefined;
-            if (shouldTransformPrivateFields) {
-                startPrivateIdentifierEnvironment();
+            startClassLexicalEnvironment();
+            if (shouldTransformPrivateElementsOrClassStaticBlocks) {
+                var name = ts.getNameOfDeclaration(node);
+                if (name && ts.isIdentifier(name)) {
+                    getPrivateIdentifierEnvironment().className = ts.idText(name);
+                }
+                var privateInstanceMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node);
+                if (ts.some(privateInstanceMethodsAndAccessors)) {
+                    getPrivateIdentifierEnvironment().weakSetName = createHoistedVariableForClass("instances", privateInstanceMethodsAndAccessors[0].name);
+                }
             }
             var result = ts.isClassDeclaration(node) ?
                 visitClassDeclaration(node) :
                 visitClassExpression(node);
-            if (shouldTransformPrivateFields) {
-                endPrivateIdentifierEnvironment();
-            }
+            endClassLexicalEnvironment();
             pendingExpressions = savedPendingExpressions;
             return result;
         }
         function doesClassElementNeedTransform(node) {
-            return ts.isPropertyDeclaration(node) || (shouldTransformPrivateFields && node.name && ts.isPrivateIdentifier(node.name));
+            return ts.isPropertyDeclaration(node) || ts.isClassStaticBlockDeclaration(node) || (shouldTransformPrivateElementsOrClassStaticBlocks && node.name && ts.isPrivateIdentifier(node.name));
+        }
+        function getPrivateInstanceMethodsAndAccessors(node) {
+            return ts.filter(node.members, ts.isNonStaticMethodOrAccessorWithPrivateName);
+        }
+        function getClassFacts(node) {
+            var facts = 0;
+            var original = ts.getOriginalNode(node);
+            if (ts.isClassDeclaration(original) && ts.classOrConstructorParameterIsDecorated(original)) {
+                facts |= 1;
+            }
+            for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
+                var member = _a[_i];
+                if (!ts.isStatic(member))
+                    continue;
+                if (member.name && ts.isPrivateIdentifier(member.name) && shouldTransformPrivateElementsOrClassStaticBlocks) {
+                    facts |= 2;
+                }
+                if (ts.isPropertyDeclaration(member) || ts.isClassStaticBlockDeclaration(member)) {
+                    if (shouldTransformThisInStaticInitializers && member.transformFlags & 8192) {
+                        facts |= 8;
+                        if (!(facts & 1)) {
+                            facts |= 2;
+                        }
+                    }
+                    if (shouldTransformSuperInStaticInitializers && member.transformFlags & 33554432) {
+                        if (!(facts & 1)) {
+                            facts |= 2 | 4;
+                        }
+                    }
+                }
+            }
+            return facts;
+        }
+        function visitExpressionWithTypeArguments(node) {
+            var facts = (currentClassLexicalEnvironment === null || currentClassLexicalEnvironment === void 0 ? void 0 : currentClassLexicalEnvironment.facts) || 0;
+            if (facts & 4) {
+                var temp = factory.createTempVariable(hoistVariableDeclaration, true);
+                getClassLexicalEnvironment().superClassReference = temp;
+                return factory.updateExpressionWithTypeArguments(node, factory.createAssignment(temp, ts.visitNode(node.expression, visitor, ts.isExpression)), undefined);
+            }
+            return ts.visitEachChild(node, visitor, context);
         }
         function visitClassDeclaration(node) {
-            if (!ts.forEach(node.members, doesClassElementNeedTransform)) {
-                return ts.visitEachChild(node, visitor, context);
+            var facts = getClassFacts(node);
+            if (facts) {
+                getClassLexicalEnvironment().facts = facts;
+            }
+            if (facts & 8) {
+                enableSubstitutionForClassStaticThisOrSuperReference();
+            }
+            var staticProperties = ts.getStaticPropertiesAndClassStaticBlock(node);
+            var pendingClassReferenceAssignment;
+            if (facts & 2) {
+                var temp = factory.createTempVariable(hoistVariableDeclaration, true);
+                getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp);
+                pendingClassReferenceAssignment = factory.createAssignment(temp, factory.getInternalName(node));
             }
             var extendsClauseElement = ts.getEffectiveBaseTypeNode(node);
-            var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 103);
+            var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104);
             var statements = [
-                factory.updateClassDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass))
+                factory.updateClassDeclaration(node, undefined, node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass))
             ];
+            if (pendingClassReferenceAssignment) {
+                getPendingExpressions().unshift(pendingClassReferenceAssignment);
+            }
             if (ts.some(pendingExpressions)) {
                 statements.push(factory.createExpressionStatement(factory.inlineExpressions(pendingExpressions)));
             }
-            var staticProperties = ts.getProperties(node, true, true);
             if (ts.some(staticProperties)) {
-                addPropertyStatements(statements, staticProperties, factory.getInternalName(node));
+                addPropertyOrClassStaticBlockStatements(statements, staticProperties, factory.getInternalName(node));
             }
             return statements;
         }
         function visitClassExpression(node) {
-            if (!ts.forEach(node.members, doesClassElementNeedTransform)) {
-                return ts.visitEachChild(node, visitor, context);
+            var facts = getClassFacts(node);
+            if (facts) {
+                getClassLexicalEnvironment().facts = facts;
             }
-            var isDecoratedClassDeclaration = ts.isClassDeclaration(ts.getOriginalNode(node));
-            var staticProperties = ts.getProperties(node, true, true);
+            if (facts & 8) {
+                enableSubstitutionForClassStaticThisOrSuperReference();
+            }
+            var isDecoratedClassDeclaration = !!(facts & 1);
+            var staticPropertiesOrClassStaticBlocks = ts.getStaticPropertiesAndClassStaticBlock(node);
             var extendsClauseElement = ts.getEffectiveBaseTypeNode(node);
-            var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 103);
-            var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass));
-            if (ts.some(staticProperties) || ts.some(pendingExpressions)) {
+            var isDerivedClass = !!(extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104);
+            var isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 16777216;
+            var temp;
+            function createClassTempVar() {
+                var classCheckFlags = resolver.getNodeCheckFlags(node);
+                var isClassWithConstructorReference = classCheckFlags & 16777216;
+                var requiresBlockScopedVar = classCheckFlags & 524288;
+                return factory.createTempVariable(requiresBlockScopedVar ? addBlockScopedVariable : hoistVariableDeclaration, !!isClassWithConstructorReference);
+            }
+            if (facts & 2) {
+                temp = createClassTempVar();
+                getClassLexicalEnvironment().classConstructor = factory.cloneNode(temp);
+            }
+            var classExpression = factory.updateClassExpression(node, ts.visitNodes(node.decorators, visitor, ts.isDecorator), node.modifiers, node.name, undefined, ts.visitNodes(node.heritageClauses, heritageClauseVisitor, ts.isHeritageClause), transformClassMembers(node, isDerivedClass));
+            var hasTransformableStatics = ts.some(staticPropertiesOrClassStaticBlocks, function (p) { return ts.isClassStaticBlockDeclaration(p) || !!p.initializer || (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifier(p.name)); });
+            if (hasTransformableStatics || ts.some(pendingExpressions)) {
                 if (isDecoratedClassDeclaration) {
                     ts.Debug.assertIsDefined(pendingStatements, "Decorated classes transformed by TypeScript are expected to be within a variable declaration.");
                     if (pendingStatements && pendingExpressions && ts.some(pendingExpressions)) {
                         pendingStatements.push(factory.createExpressionStatement(factory.inlineExpressions(pendingExpressions)));
                     }
-                    if (pendingStatements && ts.some(staticProperties)) {
-                        addPropertyStatements(pendingStatements, staticProperties, factory.getInternalName(node));
+                    if (pendingStatements && ts.some(staticPropertiesOrClassStaticBlocks)) {
+                        addPropertyOrClassStaticBlockStatements(pendingStatements, staticPropertiesOrClassStaticBlocks, factory.getInternalName(node));
+                    }
+                    if (temp) {
+                        return factory.inlineExpressions([factory.createAssignment(temp, classExpression), temp]);
                     }
                     return classExpression;
                 }
                 else {
                     var expressions = [];
-                    var isClassWithConstructorReference = resolver.getNodeCheckFlags(node) & 16777216;
-                    var temp = factory.createTempVariable(hoistVariableDeclaration, !!isClassWithConstructorReference);
+                    temp || (temp = createClassTempVar());
                     if (isClassWithConstructorReference) {
                         enableSubstitutionForClassAliases();
                         var alias = factory.cloneNode(temp);
@@ -71889,21 +77240,30 @@ var ts;
                     ts.setEmitFlags(classExpression, 65536 | ts.getEmitFlags(classExpression));
                     expressions.push(ts.startOnNewLine(factory.createAssignment(temp, classExpression)));
                     ts.addRange(expressions, ts.map(pendingExpressions, ts.startOnNewLine));
-                    ts.addRange(expressions, generateInitializedPropertyExpressions(staticProperties, temp));
+                    ts.addRange(expressions, generateInitializedPropertyExpressionsOrClassStaticBlock(staticPropertiesOrClassStaticBlocks, temp));
                     expressions.push(ts.startOnNewLine(temp));
                     return factory.inlineExpressions(expressions);
                 }
             }
             return classExpression;
         }
+        function visitClassStaticBlockDeclaration(node) {
+            if (!shouldTransformPrivateElementsOrClassStaticBlocks) {
+                return ts.visitEachChild(node, classElementVisitor, context);
+            }
+            return undefined;
+        }
         function transformClassMembers(node, isDerivedClass) {
-            if (shouldTransformPrivateFields) {
+            if (shouldTransformPrivateElementsOrClassStaticBlocks) {
                 for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                     var member = _a[_i];
-                    if (ts.isPrivateIdentifierPropertyDeclaration(member)) {
-                        addPrivateIdentifierToEnvironment(member.name);
+                    if (ts.isPrivateIdentifierClassElementDeclaration(member)) {
+                        addPrivateIdentifierToEnvironment(member);
                     }
                 }
+                if (ts.some(getPrivateInstanceMethodsAndAccessors(node))) {
+                    createBrandCheckWeakSetForPrivateMethods();
+                }
             }
             var members = [];
             var constructor = transformConstructor(node, isDerivedClass);
@@ -71913,19 +77273,24 @@ var ts;
             ts.addRange(members, ts.visitNodes(node.members, classElementVisitor, ts.isClassElement));
             return ts.setTextRange(factory.createNodeArray(members), node.members);
         }
-        function isPropertyDeclarationThatRequiresConstructorStatement(member) {
-            if (!ts.isPropertyDeclaration(member) || ts.hasStaticModifier(member) || ts.hasSyntacticModifier(ts.getOriginalNode(member), 128)) {
+        function createBrandCheckWeakSetForPrivateMethods() {
+            var weakSetName = getPrivateIdentifierEnvironment().weakSetName;
+            ts.Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
+            getPendingExpressions().push(factory.createAssignment(weakSetName, factory.createNewExpression(factory.createIdentifier("WeakSet"), undefined, [])));
+        }
+        function isClassElementThatRequiresConstructorStatement(member) {
+            if (ts.isStatic(member) || ts.hasSyntacticModifier(ts.getOriginalNode(member), 128)) {
                 return false;
             }
-            if (context.getCompilerOptions().useDefineForClassFields) {
+            if (useDefineForClassFields) {
                 return languageVersion < 99;
             }
-            return ts.isInitializedProperty(member) || shouldTransformPrivateFields && ts.isPrivateIdentifierPropertyDeclaration(member);
+            return ts.isInitializedProperty(member) || shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifierClassElementDeclaration(member);
         }
         function transformConstructor(node, isDerivedClass) {
             var constructor = ts.visitNode(ts.getFirstConstructorWithBody(node), visitor, ts.isConstructorDeclaration);
-            var properties = node.members.filter(isPropertyDeclarationThatRequiresConstructorStatement);
-            if (!ts.some(properties)) {
+            var elements = node.members.filter(isClassElementThatRequiresConstructorStatement);
+            if (!ts.some(elements)) {
                 return constructor;
             }
             var parameters = ts.visitParameterList(constructor ? constructor.parameters : undefined, visitor, context);
@@ -71936,12 +77301,13 @@ var ts;
             return ts.startOnNewLine(ts.setOriginalNode(ts.setTextRange(factory.createConstructorDeclaration(undefined, undefined, parameters !== null && parameters !== void 0 ? parameters : [], body), constructor || node), constructor));
         }
         function transformConstructorBody(node, constructor, isDerivedClass) {
-            var useDefineForClassFields = context.getCompilerOptions().useDefineForClassFields;
             var properties = ts.getProperties(node, false, false);
             if (!useDefineForClassFields) {
                 properties = ts.filter(properties, function (property) { return !!property.initializer || ts.isPrivateIdentifier(property.name); });
             }
-            if (!constructor && !ts.some(properties)) {
+            var privateMethodsAndAccessors = getPrivateInstanceMethodsAndAccessors(node);
+            var needsConstructorBody = ts.some(properties) || ts.some(privateMethodsAndAccessors);
+            if (!constructor && !needsConstructorBody) {
                 return ts.visitFunctionBody(undefined, visitor, context);
             }
             resumeLexicalEnvironment();
@@ -71965,17 +77331,21 @@ var ts;
                     indexOfFirstStatement = afterParameterProperties;
                 }
             }
-            addPropertyStatements(statements, properties, factory.createThis());
+            var receiver = factory.createThis();
+            addMethodStatements(statements, privateMethodsAndAccessors, receiver);
+            addPropertyOrClassStaticBlockStatements(statements, properties, receiver);
             if (constructor) {
                 ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatement));
             }
             statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment());
             return ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true), constructor ? constructor.body : undefined);
         }
-        function addPropertyStatements(statements, properties, receiver) {
+        function addPropertyOrClassStaticBlockStatements(statements, properties, receiver) {
             for (var _i = 0, properties_7 = properties; _i < properties_7.length; _i++) {
                 var property = properties_7[_i];
-                var expression = transformProperty(property, receiver);
+                var expression = ts.isClassStaticBlockDeclaration(property) ?
+                    transformClassStaticBlockDeclaration(property) :
+                    transformProperty(property, receiver);
                 if (!expression) {
                     continue;
                 }
@@ -71986,11 +77356,11 @@ var ts;
                 statements.push(statement);
             }
         }
-        function generateInitializedPropertyExpressions(properties, receiver) {
+        function generateInitializedPropertyExpressionsOrClassStaticBlock(propertiesOrClassStaticBlocks, receiver) {
             var expressions = [];
-            for (var _i = 0, properties_8 = properties; _i < properties_8.length; _i++) {
-                var property = properties_8[_i];
-                var expression = transformProperty(property, receiver);
+            for (var _i = 0, propertiesOrClassStaticBlocks_1 = propertiesOrClassStaticBlocks; _i < propertiesOrClassStaticBlocks_1.length; _i++) {
+                var property = propertiesOrClassStaticBlocks_1[_i];
+                var expression = ts.isClassStaticBlockDeclaration(property) ? transformClassStaticBlockDeclaration(property) : transformProperty(property, receiver);
                 if (!expression) {
                     continue;
                 }
@@ -72003,28 +77373,45 @@ var ts;
             return expressions;
         }
         function transformProperty(property, receiver) {
+            var savedCurrentStaticPropertyDeclarationOrStaticBlock = currentStaticPropertyDeclarationOrStaticBlock;
+            var transformed = transformPropertyWorker(property, receiver);
+            if (transformed && ts.hasStaticModifier(property) && (currentClassLexicalEnvironment === null || currentClassLexicalEnvironment === void 0 ? void 0 : currentClassLexicalEnvironment.facts)) {
+                ts.setOriginalNode(transformed, property);
+                ts.addEmitFlags(transformed, 2);
+                classLexicalEnvironmentMap.set(ts.getOriginalNodeId(transformed), currentClassLexicalEnvironment);
+            }
+            currentStaticPropertyDeclarationOrStaticBlock = savedCurrentStaticPropertyDeclarationOrStaticBlock;
+            return transformed;
+        }
+        function transformPropertyWorker(property, receiver) {
             var _a;
-            var emitAssignment = !context.getCompilerOptions().useDefineForClassFields;
+            var emitAssignment = !useDefineForClassFields;
             var propertyName = ts.isComputedPropertyName(property.name) && !ts.isSimpleInlineableExpression(property.name.expression)
                 ? factory.updateComputedPropertyName(property.name, factory.getGeneratedNameForNode(property.name))
                 : property.name;
-            if (shouldTransformPrivateFields && ts.isPrivateIdentifier(propertyName)) {
+            if (ts.hasStaticModifier(property)) {
+                currentStaticPropertyDeclarationOrStaticBlock = property;
+            }
+            if (shouldTransformPrivateElementsOrClassStaticBlocks && ts.isPrivateIdentifier(propertyName)) {
                 var privateIdentifierInfo = accessPrivateIdentifier(propertyName);
                 if (privateIdentifierInfo) {
-                    switch (privateIdentifierInfo.placement) {
-                        case 0: {
-                            return createPrivateInstanceFieldInitializer(receiver, ts.visitNode(property.initializer, visitor, ts.isExpression), privateIdentifierInfo.weakMapName);
+                    if (privateIdentifierInfo.kind === "f") {
+                        if (!privateIdentifierInfo.isStatic) {
+                            return createPrivateInstanceFieldInitializer(receiver, ts.visitNode(property.initializer, visitor, ts.isExpression), privateIdentifierInfo.brandCheckIdentifier);
                         }
+                        else {
+                            return createPrivateStaticFieldInitializer(privateIdentifierInfo.variableName, ts.visitNode(property.initializer, visitor, ts.isExpression));
+                        }
+                    }
+                    else {
+                        return undefined;
                     }
                 }
                 else {
                     ts.Debug.fail("Undeclared private name for property declaration.");
                 }
             }
-            if (ts.isPrivateIdentifier(propertyName) && !property.initializer) {
-                return undefined;
-            }
-            if (ts.isPrivateIdentifier(propertyName) && !property.initializer) {
+            if ((ts.isPrivateIdentifier(propertyName) || ts.hasStaticModifier(property)) && !property.initializer) {
                 return undefined;
             }
             var propertyOriginalNode = ts.getOriginalNode(property);
@@ -72049,10 +77436,94 @@ var ts;
         function enableSubstitutionForClassAliases() {
             if ((enabledSubstitutions & 1) === 0) {
                 enabledSubstitutions |= 1;
-                context.enableSubstitution(78);
+                context.enableSubstitution(79);
                 classAliases = [];
             }
         }
+        function enableSubstitutionForClassStaticThisOrSuperReference() {
+            if ((enabledSubstitutions & 2) === 0) {
+                enabledSubstitutions |= 2;
+                context.enableSubstitution(108);
+                context.enableEmitNotification(255);
+                context.enableEmitNotification(212);
+                context.enableEmitNotification(170);
+                context.enableEmitNotification(171);
+                context.enableEmitNotification(172);
+                context.enableEmitNotification(168);
+                context.enableEmitNotification(166);
+                context.enableEmitNotification(161);
+            }
+        }
+        function addMethodStatements(statements, methods, receiver) {
+            if (!shouldTransformPrivateElementsOrClassStaticBlocks || !ts.some(methods)) {
+                return;
+            }
+            var weakSetName = getPrivateIdentifierEnvironment().weakSetName;
+            ts.Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
+            statements.push(factory.createExpressionStatement(createPrivateInstanceMethodInitializer(receiver, weakSetName)));
+        }
+        function visitInvalidSuperProperty(node) {
+            return ts.isPropertyAccessExpression(node) ?
+                factory.updatePropertyAccessExpression(node, factory.createVoidZero(), node.name) :
+                factory.updateElementAccessExpression(node, factory.createVoidZero(), ts.visitNode(node.argumentExpression, visitor, ts.isExpression));
+        }
+        function onEmitNode(hint, node, emitCallback) {
+            var original = ts.getOriginalNode(node);
+            if (original.id) {
+                var classLexicalEnvironment = classLexicalEnvironmentMap.get(original.id);
+                if (classLexicalEnvironment) {
+                    var savedClassLexicalEnvironment = currentClassLexicalEnvironment;
+                    var savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment;
+                    currentClassLexicalEnvironment = classLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = classLexicalEnvironment;
+                    previousOnEmitNode(hint, node, emitCallback);
+                    currentClassLexicalEnvironment = savedClassLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment;
+                    return;
+                }
+            }
+            switch (node.kind) {
+                case 212:
+                    if (ts.isArrowFunction(original) || ts.getEmitFlags(node) & 262144) {
+                        break;
+                    }
+                case 255:
+                case 170: {
+                    var savedClassLexicalEnvironment = currentClassLexicalEnvironment;
+                    var savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment;
+                    currentClassLexicalEnvironment = undefined;
+                    currentComputedPropertyNameClassLexicalEnvironment = undefined;
+                    previousOnEmitNode(hint, node, emitCallback);
+                    currentClassLexicalEnvironment = savedClassLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment;
+                    return;
+                }
+                case 171:
+                case 172:
+                case 168:
+                case 166: {
+                    var savedClassLexicalEnvironment = currentClassLexicalEnvironment;
+                    var savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = currentClassLexicalEnvironment;
+                    currentClassLexicalEnvironment = undefined;
+                    previousOnEmitNode(hint, node, emitCallback);
+                    currentClassLexicalEnvironment = savedClassLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment;
+                    return;
+                }
+                case 161: {
+                    var savedClassLexicalEnvironment = currentClassLexicalEnvironment;
+                    var savedCurrentComputedPropertyNameClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment;
+                    currentClassLexicalEnvironment = currentComputedPropertyNameClassLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = undefined;
+                    previousOnEmitNode(hint, node, emitCallback);
+                    currentClassLexicalEnvironment = savedClassLexicalEnvironment;
+                    currentComputedPropertyNameClassLexicalEnvironment = savedCurrentComputedPropertyNameClassLexicalEnvironment;
+                    return;
+                }
+            }
+            previousOnEmitNode(hint, node, emitCallback);
+        }
         function onSubstituteNode(hint, node) {
             node = previousOnSubstituteNode(hint, node);
             if (hint === 1) {
@@ -72062,8 +77533,22 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return substituteExpressionIdentifier(node);
+                case 108:
+                    return substituteThisExpression(node);
+            }
+            return node;
+        }
+        function substituteThisExpression(node) {
+            if (enabledSubstitutions & 2 && currentClassLexicalEnvironment) {
+                var facts = currentClassLexicalEnvironment.facts, classConstructor = currentClassLexicalEnvironment.classConstructor;
+                if (facts & 1) {
+                    return factory.createParenthesizedExpression(factory.createVoidZero());
+                }
+                if (classConstructor) {
+                    return ts.setTextRange(ts.setOriginalNode(factory.cloneNode(classConstructor), node), node);
+                }
             }
             return node;
         }
@@ -72077,10 +77562,10 @@ var ts;
                     if (declaration) {
                         var classAlias = classAliases[declaration.id];
                         if (classAlias) {
-                            var clone_2 = factory.cloneNode(classAlias);
-                            ts.setSourceMapRange(clone_2, node);
-                            ts.setCommentRange(clone_2, node);
-                            return clone_2;
+                            var clone_3 = factory.cloneNode(classAlias);
+                            ts.setSourceMapRange(clone_3, node);
+                            ts.setCommentRange(clone_3, node);
+                            return clone_3;
                         }
                     }
                 }
@@ -72095,45 +77580,202 @@ var ts;
                 var alreadyTransformed = ts.isAssignmentExpression(innerExpression) && ts.isGeneratedIdentifier(innerExpression.left);
                 if (!alreadyTransformed && !inlinable && shouldHoist) {
                     var generatedName = factory.getGeneratedNameForNode(name);
-                    hoistVariableDeclaration(generatedName);
+                    if (resolver.getNodeCheckFlags(name) & 524288) {
+                        addBlockScopedVariable(generatedName);
+                    }
+                    else {
+                        hoistVariableDeclaration(generatedName);
+                    }
                     return factory.createAssignment(generatedName, expression);
                 }
                 return (inlinable || ts.isIdentifier(innerExpression)) ? undefined : expression;
             }
         }
-        function startPrivateIdentifierEnvironment() {
-            privateIdentifierEnvironmentStack.push(currentPrivateIdentifierEnvironment);
-            currentPrivateIdentifierEnvironment = undefined;
+        function startClassLexicalEnvironment() {
+            classLexicalEnvironmentStack.push(currentClassLexicalEnvironment);
+            currentClassLexicalEnvironment = undefined;
+        }
+        function endClassLexicalEnvironment() {
+            currentClassLexicalEnvironment = classLexicalEnvironmentStack.pop();
         }
-        function endPrivateIdentifierEnvironment() {
-            currentPrivateIdentifierEnvironment = privateIdentifierEnvironmentStack.pop();
+        function getClassLexicalEnvironment() {
+            return currentClassLexicalEnvironment || (currentClassLexicalEnvironment = {
+                facts: 0,
+                classConstructor: undefined,
+                superClassReference: undefined,
+                privateIdentifierEnvironment: undefined,
+            });
         }
         function getPrivateIdentifierEnvironment() {
-            return currentPrivateIdentifierEnvironment || (currentPrivateIdentifierEnvironment = new ts.Map());
+            var lex = getClassLexicalEnvironment();
+            lex.privateIdentifierEnvironment || (lex.privateIdentifierEnvironment = {
+                className: "",
+                identifiers: new ts.Map()
+            });
+            return lex.privateIdentifierEnvironment;
         }
         function getPendingExpressions() {
             return pendingExpressions || (pendingExpressions = []);
         }
-        function addPrivateIdentifierToEnvironment(name) {
-            var text = ts.getTextOfPropertyName(name);
-            var weakMapName = factory.createUniqueName("_" + text.substring(1), 16 | 8);
-            hoistVariableDeclaration(weakMapName);
-            getPrivateIdentifierEnvironment().set(name.escapedText, { placement: 0, weakMapName: weakMapName });
-            getPendingExpressions().push(factory.createAssignment(weakMapName, factory.createNewExpression(factory.createIdentifier("WeakMap"), undefined, [])));
+        function addPrivateIdentifierToEnvironment(node) {
+            var _a;
+            var text = ts.getTextOfPropertyName(node.name);
+            var lex = getClassLexicalEnvironment();
+            var classConstructor = lex.classConstructor;
+            var privateEnv = getPrivateIdentifierEnvironment();
+            var weakSetName = privateEnv.weakSetName;
+            var assignmentExpressions = [];
+            var privateName = node.name.escapedText;
+            var previousInfo = privateEnv.identifiers.get(privateName);
+            var isValid = !isReservedPrivateName(node.name) && previousInfo === undefined;
+            if (ts.hasStaticModifier(node)) {
+                ts.Debug.assert(classConstructor, "weakSetName should be set in private identifier environment");
+                if (ts.isPropertyDeclaration(node)) {
+                    var variableName = createHoistedVariableForPrivateName(text, node);
+                    privateEnv.identifiers.set(privateName, {
+                        kind: "f",
+                        variableName: variableName,
+                        brandCheckIdentifier: classConstructor,
+                        isStatic: true,
+                        isValid: isValid,
+                    });
+                }
+                else if (ts.isMethodDeclaration(node)) {
+                    var functionName = createHoistedVariableForPrivateName(text, node);
+                    privateEnv.identifiers.set(privateName, {
+                        kind: "m",
+                        methodName: functionName,
+                        brandCheckIdentifier: classConstructor,
+                        isStatic: true,
+                        isValid: isValid,
+                    });
+                }
+                else if (ts.isGetAccessorDeclaration(node)) {
+                    var getterName = createHoistedVariableForPrivateName(text + "_get", node);
+                    if ((previousInfo === null || previousInfo === void 0 ? void 0 : previousInfo.kind) === "a" && previousInfo.isStatic && !previousInfo.getterName) {
+                        previousInfo.getterName = getterName;
+                    }
+                    else {
+                        privateEnv.identifiers.set(privateName, {
+                            kind: "a",
+                            getterName: getterName,
+                            setterName: undefined,
+                            brandCheckIdentifier: classConstructor,
+                            isStatic: true,
+                            isValid: isValid,
+                        });
+                    }
+                }
+                else if (ts.isSetAccessorDeclaration(node)) {
+                    var setterName = createHoistedVariableForPrivateName(text + "_set", node);
+                    if ((previousInfo === null || previousInfo === void 0 ? void 0 : previousInfo.kind) === "a" && previousInfo.isStatic && !previousInfo.setterName) {
+                        previousInfo.setterName = setterName;
+                    }
+                    else {
+                        privateEnv.identifiers.set(privateName, {
+                            kind: "a",
+                            getterName: undefined,
+                            setterName: setterName,
+                            brandCheckIdentifier: classConstructor,
+                            isStatic: true,
+                            isValid: isValid,
+                        });
+                    }
+                }
+                else {
+                    ts.Debug.assertNever(node, "Unknown class element type.");
+                }
+            }
+            else if (ts.isPropertyDeclaration(node)) {
+                var weakMapName = createHoistedVariableForPrivateName(text, node);
+                privateEnv.identifiers.set(privateName, {
+                    kind: "f",
+                    brandCheckIdentifier: weakMapName,
+                    isStatic: false,
+                    variableName: undefined,
+                    isValid: isValid,
+                });
+                assignmentExpressions.push(factory.createAssignment(weakMapName, factory.createNewExpression(factory.createIdentifier("WeakMap"), undefined, [])));
+            }
+            else if (ts.isMethodDeclaration(node)) {
+                ts.Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
+                privateEnv.identifiers.set(privateName, {
+                    kind: "m",
+                    methodName: createHoistedVariableForPrivateName(text, node),
+                    brandCheckIdentifier: weakSetName,
+                    isStatic: false,
+                    isValid: isValid,
+                });
+            }
+            else if (ts.isAccessor(node)) {
+                ts.Debug.assert(weakSetName, "weakSetName should be set in private identifier environment");
+                if (ts.isGetAccessor(node)) {
+                    var getterName = createHoistedVariableForPrivateName(text + "_get", node);
+                    if ((previousInfo === null || previousInfo === void 0 ? void 0 : previousInfo.kind) === "a" && !previousInfo.isStatic && !previousInfo.getterName) {
+                        previousInfo.getterName = getterName;
+                    }
+                    else {
+                        privateEnv.identifiers.set(privateName, {
+                            kind: "a",
+                            getterName: getterName,
+                            setterName: undefined,
+                            brandCheckIdentifier: weakSetName,
+                            isStatic: false,
+                            isValid: isValid,
+                        });
+                    }
+                }
+                else {
+                    var setterName = createHoistedVariableForPrivateName(text + "_set", node);
+                    if ((previousInfo === null || previousInfo === void 0 ? void 0 : previousInfo.kind) === "a" && !previousInfo.isStatic && !previousInfo.setterName) {
+                        previousInfo.setterName = setterName;
+                    }
+                    else {
+                        privateEnv.identifiers.set(privateName, {
+                            kind: "a",
+                            getterName: undefined,
+                            setterName: setterName,
+                            brandCheckIdentifier: weakSetName,
+                            isStatic: false,
+                            isValid: isValid,
+                        });
+                    }
+                }
+            }
+            else {
+                ts.Debug.assertNever(node, "Unknown class element type.");
+            }
+            (_a = getPendingExpressions()).push.apply(_a, assignmentExpressions);
+        }
+        function createHoistedVariableForClass(name, node) {
+            var className = getPrivateIdentifierEnvironment().className;
+            var prefix = className ? "_".concat(className) : "";
+            var identifier = factory.createUniqueName("".concat(prefix, "_").concat(name), 16);
+            if (resolver.getNodeCheckFlags(node) & 524288) {
+                addBlockScopedVariable(identifier);
+            }
+            else {
+                hoistVariableDeclaration(identifier);
+            }
+            return identifier;
+        }
+        function createHoistedVariableForPrivateName(privateName, node) {
+            return createHoistedVariableForClass(privateName.substring(1), node.name);
         }
         function accessPrivateIdentifier(name) {
-            if (currentPrivateIdentifierEnvironment) {
-                var info = currentPrivateIdentifierEnvironment.get(name.escapedText);
+            var _a;
+            if (currentClassLexicalEnvironment === null || currentClassLexicalEnvironment === void 0 ? void 0 : currentClassLexicalEnvironment.privateIdentifierEnvironment) {
+                var info = currentClassLexicalEnvironment.privateIdentifierEnvironment.identifiers.get(name.escapedText);
                 if (info) {
                     return info;
                 }
             }
-            for (var i = privateIdentifierEnvironmentStack.length - 1; i >= 0; --i) {
-                var env = privateIdentifierEnvironmentStack[i];
+            for (var i = classLexicalEnvironmentStack.length - 1; i >= 0; --i) {
+                var env = classLexicalEnvironmentStack[i];
                 if (!env) {
                     continue;
                 }
-                var info = env.get(name.escapedText);
+                var info = (_a = env.privateIdentifierEnvironment) === null || _a === void 0 ? void 0 : _a.identifiers.get(name.escapedText);
                 if (info) {
                     return info;
                 }
@@ -72149,37 +77791,86 @@ var ts;
             var receiver = node.expression;
             if (ts.isThisProperty(node) || ts.isSuperProperty(node) || !ts.isSimpleCopiableExpression(node.expression)) {
                 receiver = factory.createTempVariable(hoistVariableDeclaration, true);
-                getPendingExpressions().push(factory.createBinaryExpression(receiver, 62, node.expression));
+                getPendingExpressions().push(factory.createBinaryExpression(receiver, 63, ts.visitNode(node.expression, visitor, ts.isExpression)));
             }
-            return factory.createPropertyAccessExpression(factory.createParenthesizedExpression(factory.createObjectLiteralExpression([
-                factory.createSetAccessorDeclaration(undefined, undefined, "value", [factory.createParameterDeclaration(undefined, undefined, undefined, parameter, undefined, undefined, undefined)], factory.createBlock([factory.createExpressionStatement(createPrivateIdentifierAssignment(info, receiver, parameter, 62))]))
-            ])), "value");
+            return factory.createAssignmentTargetWrapper(parameter, createPrivateIdentifierAssignment(info, receiver, parameter, 63));
         }
         function visitArrayAssignmentTarget(node) {
             var target = ts.getTargetOfBindingOrAssignmentElement(node);
-            if (target && ts.isPrivateIdentifierPropertyAccessExpression(target)) {
-                var wrapped = wrapPrivateIdentifierForDestructuringTarget(target);
-                if (ts.isAssignmentExpression(node)) {
-                    return factory.updateBinaryExpression(node, wrapped, node.operatorToken, ts.visitNode(node.right, visitor, ts.isExpression));
-                }
-                else if (ts.isSpreadElement(node)) {
-                    return factory.updateSpreadElement(node, wrapped);
+            if (target) {
+                var wrapped = void 0;
+                if (ts.isPrivateIdentifierPropertyAccessExpression(target)) {
+                    wrapped = wrapPrivateIdentifierForDestructuringTarget(target);
+                }
+                else if (shouldTransformSuperInStaticInitializers &&
+                    ts.isSuperProperty(target) &&
+                    currentStaticPropertyDeclarationOrStaticBlock &&
+                    currentClassLexicalEnvironment) {
+                    var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts;
+                    if (facts & 1) {
+                        wrapped = visitInvalidSuperProperty(target);
+                    }
+                    else if (classConstructor && superClassReference) {
+                        var name = ts.isElementAccessExpression(target) ? ts.visitNode(target.argumentExpression, visitor, ts.isExpression) :
+                            ts.isIdentifier(target.name) ? factory.createStringLiteralFromNode(target.name) :
+                                undefined;
+                        if (name) {
+                            var temp = factory.createTempVariable(undefined);
+                            wrapped = factory.createAssignmentTargetWrapper(temp, factory.createReflectSetCall(superClassReference, name, temp, classConstructor));
+                        }
+                    }
                 }
-                else {
-                    return wrapped;
+                if (wrapped) {
+                    if (ts.isAssignmentExpression(node)) {
+                        return factory.updateBinaryExpression(node, wrapped, node.operatorToken, ts.visitNode(node.right, visitor, ts.isExpression));
+                    }
+                    else if (ts.isSpreadElement(node)) {
+                        return factory.updateSpreadElement(node, wrapped);
+                    }
+                    else {
+                        return wrapped;
+                    }
                 }
             }
             return ts.visitNode(node, visitorDestructuringTarget);
         }
         function visitObjectAssignmentTarget(node) {
-            if (ts.isPropertyAssignment(node)) {
+            if (ts.isObjectBindingOrAssignmentElement(node) && !ts.isShorthandPropertyAssignment(node)) {
                 var target = ts.getTargetOfBindingOrAssignmentElement(node);
-                if (target && ts.isPrivateIdentifierPropertyAccessExpression(target)) {
+                var wrapped = void 0;
+                if (target) {
+                    if (ts.isPrivateIdentifierPropertyAccessExpression(target)) {
+                        wrapped = wrapPrivateIdentifierForDestructuringTarget(target);
+                    }
+                    else if (shouldTransformSuperInStaticInitializers &&
+                        ts.isSuperProperty(target) &&
+                        currentStaticPropertyDeclarationOrStaticBlock &&
+                        currentClassLexicalEnvironment) {
+                        var classConstructor = currentClassLexicalEnvironment.classConstructor, superClassReference = currentClassLexicalEnvironment.superClassReference, facts = currentClassLexicalEnvironment.facts;
+                        if (facts & 1) {
+                            wrapped = visitInvalidSuperProperty(target);
+                        }
+                        else if (classConstructor && superClassReference) {
+                            var name = ts.isElementAccessExpression(target) ? ts.visitNode(target.argumentExpression, visitor, ts.isExpression) :
+                                ts.isIdentifier(target.name) ? factory.createStringLiteralFromNode(target.name) :
+                                    undefined;
+                            if (name) {
+                                var temp = factory.createTempVariable(undefined);
+                                wrapped = factory.createAssignmentTargetWrapper(temp, factory.createReflectSetCall(superClassReference, name, temp, classConstructor));
+                            }
+                        }
+                    }
+                }
+                if (ts.isPropertyAssignment(node)) {
                     var initializer = ts.getInitializerOfBindingOrAssignmentElement(node);
-                    var wrapped = wrapPrivateIdentifierForDestructuringTarget(target);
-                    return factory.updatePropertyAssignment(node, ts.visitNode(node.name, visitor), initializer ? factory.createAssignment(wrapped, ts.visitNode(initializer, visitor)) : wrapped);
+                    return factory.updatePropertyAssignment(node, ts.visitNode(node.name, visitor, ts.isPropertyName), wrapped ?
+                        initializer ? factory.createAssignment(wrapped, ts.visitNode(initializer, visitor)) : wrapped :
+                        ts.visitNode(node.initializer, visitorDestructuringTarget, ts.isExpression));
                 }
-                return factory.updatePropertyAssignment(node, ts.visitNode(node.name, visitor), ts.visitNode(node.initializer, visitorDestructuringTarget));
+                if (ts.isSpreadAssignment(node)) {
+                    return factory.updateSpreadAssignment(node, wrapped || ts.visitNode(node.expression, visitorDestructuringTarget, ts.isExpression));
+                }
+                ts.Debug.assert(wrapped === undefined, "Should not have generated a wrapped target");
             }
             return ts.visitNode(node, visitor);
         }
@@ -72193,9 +77884,20 @@ var ts;
         }
     }
     ts.transformClassFields = transformClassFields;
+    function createPrivateStaticFieldInitializer(variableName, initializer) {
+        return ts.factory.createAssignment(variableName, ts.factory.createObjectLiteralExpression([
+            ts.factory.createPropertyAssignment("value", initializer || ts.factory.createVoidZero())
+        ]));
+    }
     function createPrivateInstanceFieldInitializer(receiver, initializer, weakMapName) {
         return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(weakMapName, "set"), undefined, [receiver, initializer || ts.factory.createVoidZero()]);
     }
+    function createPrivateInstanceMethodInitializer(receiver, weakSetName) {
+        return ts.factory.createCallExpression(ts.factory.createPropertyAccessExpression(weakSetName, "add"), undefined, [receiver]);
+    }
+    function isReservedPrivateName(node) {
+        return node.escapedText === "#constructor";
+    }
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
@@ -72252,37 +77954,37 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitor(node) {
-            if ((node.transformFlags & 64) === 0) {
+            if ((node.transformFlags & 128) === 0) {
                 return node;
             }
             switch (node.kind) {
-                case 129:
+                case 131:
                     return undefined;
-                case 213:
+                case 217:
                     return visitAwaitExpression(node);
-                case 165:
+                case 168:
                     return doWithContext(1 | 2, visitMethodDeclaration, node);
-                case 251:
+                case 255:
                     return doWithContext(1 | 2, visitFunctionDeclaration, node);
-                case 208:
+                case 212:
                     return doWithContext(1 | 2, visitFunctionExpression, node);
-                case 209:
+                case 213:
                     return doWithContext(1, visitArrowFunction, node);
-                case 201:
-                    if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 105) {
+                case 205:
+                    if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 106) {
                         capturedSuperProperties.add(node.name.escapedText);
                     }
                     return ts.visitEachChild(node, visitor, context);
-                case 202:
-                    if (capturedSuperProperties && node.expression.kind === 105) {
+                case 206:
+                    if (capturedSuperProperties && node.expression.kind === 106) {
                         hasSuperElementAccess = true;
                     }
                     return ts.visitEachChild(node, visitor, context);
-                case 167:
-                case 168:
-                case 166:
-                case 252:
-                case 221:
+                case 171:
+                case 172:
+                case 170:
+                case 256:
+                case 225:
                     return doWithContext(1 | 2, visitDefault, node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -72291,27 +77993,27 @@ var ts;
         function asyncBodyVisitor(node) {
             if (ts.isNodeWithPossibleHoistedDeclaration(node)) {
                 switch (node.kind) {
-                    case 232:
+                    case 236:
                         return visitVariableStatementInAsyncBody(node);
-                    case 237:
+                    case 241:
                         return visitForStatementInAsyncBody(node);
-                    case 238:
+                    case 242:
                         return visitForInStatementInAsyncBody(node);
-                    case 239:
+                    case 243:
                         return visitForOfStatementInAsyncBody(node);
-                    case 287:
+                    case 291:
                         return visitCatchClauseInAsyncBody(node);
-                    case 230:
-                    case 244:
-                    case 258:
-                    case 284:
-                    case 285:
-                    case 247:
-                    case 235:
-                    case 236:
                     case 234:
-                    case 243:
-                    case 245:
+                    case 248:
+                    case 262:
+                    case 288:
+                    case 289:
+                    case 251:
+                    case 239:
+                    case 240:
+                    case 238:
+                    case 247:
+                    case 249:
                         return ts.visitEachChild(node, asyncBodyVisitor, context);
                     default:
                         return ts.Debug.assertNever(node, "Unhandled node.");
@@ -72352,18 +78054,18 @@ var ts;
         function visitForInStatementInAsyncBody(node) {
             return factory.updateForInStatement(node, isVariableDeclarationListWithCollidingName(node.initializer)
                 ? visitVariableDeclarationListWithCollidingNames(node.initializer, true)
-                : ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, asyncBodyVisitor, ts.isStatement, factory.liftToBlock));
+                : ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
         }
         function visitForOfStatementInAsyncBody(node) {
             return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.isToken), isVariableDeclarationListWithCollidingName(node.initializer)
                 ? visitVariableDeclarationListWithCollidingNames(node.initializer, true)
-                : ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, asyncBodyVisitor, ts.isStatement, factory.liftToBlock));
+                : ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
         }
         function visitForStatementInAsyncBody(node) {
             var initializer = node.initializer;
             return factory.updateForStatement(node, isVariableDeclarationListWithCollidingName(initializer)
                 ? visitVariableDeclarationListWithCollidingNames(initializer, false)
-                : ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, asyncBodyVisitor, ts.isStatement, factory.liftToBlock));
+                : ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
         }
         function visitAwaitExpression(node) {
             if (inTopLevelContext()) {
@@ -72463,7 +78165,7 @@ var ts;
             var original = ts.getOriginalNode(node, ts.isFunctionLike);
             var nodeType = original.type;
             var promiseConstructor = languageVersion < 2 ? getPromiseConstructor(nodeType) : undefined;
-            var isArrowFunction = node.kind === 209;
+            var isArrowFunction = node.kind === 213;
             var hasLexicalArguments = (resolver.getNodeCheckFlags(node) & 8192) !== 0;
             var savedEnclosingFunctionParameterNames = enclosingFunctionParameterNames;
             enclosingFunctionParameterNames = new ts.Set();
@@ -72544,15 +78246,15 @@ var ts;
         function enableSubstitutionForAsyncMethodsWithSuper() {
             if ((enabledSubstitutions & 1) === 0) {
                 enabledSubstitutions |= 1;
-                context.enableSubstitution(203);
-                context.enableSubstitution(201);
-                context.enableSubstitution(202);
-                context.enableEmitNotification(252);
-                context.enableEmitNotification(165);
-                context.enableEmitNotification(167);
+                context.enableSubstitution(207);
+                context.enableSubstitution(205);
+                context.enableSubstitution(206);
+                context.enableEmitNotification(256);
                 context.enableEmitNotification(168);
-                context.enableEmitNotification(166);
-                context.enableEmitNotification(232);
+                context.enableEmitNotification(171);
+                context.enableEmitNotification(172);
+                context.enableEmitNotification(170);
+                context.enableEmitNotification(236);
             }
         }
         function onEmitNode(hint, node, emitCallback) {
@@ -72584,23 +78286,23 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 201:
+                case 205:
                     return substitutePropertyAccessExpression(node);
-                case 202:
+                case 206:
                     return substituteElementAccessExpression(node);
-                case 203:
+                case 207:
                     return substituteCallExpression(node);
             }
             return node;
         }
         function substitutePropertyAccessExpression(node) {
-            if (node.expression.kind === 105) {
+            if (node.expression.kind === 106) {
                 return ts.setTextRange(factory.createPropertyAccessExpression(factory.createUniqueName("_super", 16 | 32), node.name), node);
             }
             return node;
         }
         function substituteElementAccessExpression(node) {
-            if (node.expression.kind === 105) {
+            if (node.expression.kind === 106) {
                 return createSuperElementAccessInAsyncMethod(node.argumentExpression, node);
             }
             return node;
@@ -72613,17 +78315,17 @@ var ts;
                     : substituteElementAccessExpression(expression);
                 return factory.createCallExpression(factory.createPropertyAccessExpression(argumentExpression, "call"), undefined, __spreadArray([
                     factory.createThis()
-                ], node.arguments));
+                ], node.arguments, true));
             }
             return node;
         }
         function isSuperContainer(node) {
             var kind = node.kind;
-            return kind === 252
-                || kind === 166
-                || kind === 165
-                || kind === 167
-                || kind === 168;
+            return kind === 256
+                || kind === 170
+                || kind === 168
+                || kind === 171
+                || kind === 172;
         }
         function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
             if (enclosingSuperContainerFlags & 4096) {
@@ -72712,7 +78414,7 @@ var ts;
             return visitorWorker(node, true);
         }
         function visitorNoAsyncModifier(node) {
-            if (node.kind === 129) {
+            if (node.kind === 131) {
                 return undefined;
             }
             return node;
@@ -72730,74 +78432,74 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitorWorker(node, expressionResultIsUnused) {
-            if ((node.transformFlags & 32) === 0) {
+            if ((node.transformFlags & 64) === 0) {
                 return node;
             }
             switch (node.kind) {
-                case 213:
+                case 217:
                     return visitAwaitExpression(node);
-                case 219:
+                case 223:
                     return visitYieldExpression(node);
-                case 242:
+                case 246:
                     return visitReturnStatement(node);
-                case 245:
+                case 249:
                     return visitLabeledStatement(node);
-                case 200:
+                case 204:
                     return visitObjectLiteralExpression(node);
-                case 216:
+                case 220:
                     return visitBinaryExpression(node, expressionResultIsUnused);
-                case 337:
+                case 349:
                     return visitCommaListExpression(node, expressionResultIsUnused);
-                case 287:
+                case 291:
                     return visitCatchClause(node);
-                case 232:
+                case 236:
                     return visitVariableStatement(node);
-                case 249:
+                case 253:
                     return visitVariableDeclaration(node);
-                case 235:
-                case 236:
-                case 238:
-                    return doWithHierarchyFacts(visitDefault, node, 0, 2);
                 case 239:
+                case 240:
+                case 242:
+                    return doWithHierarchyFacts(visitDefault, node, 0, 2);
+                case 243:
                     return visitForOfStatement(node, undefined);
-                case 237:
+                case 241:
                     return doWithHierarchyFacts(visitForStatement, node, 0, 2);
-                case 212:
+                case 216:
                     return visitVoidExpression(node);
-                case 166:
+                case 170:
                     return doWithHierarchyFacts(visitConstructorDeclaration, node, 2, 1);
-                case 165:
+                case 168:
                     return doWithHierarchyFacts(visitMethodDeclaration, node, 2, 1);
-                case 167:
+                case 171:
                     return doWithHierarchyFacts(visitGetAccessorDeclaration, node, 2, 1);
-                case 168:
+                case 172:
                     return doWithHierarchyFacts(visitSetAccessorDeclaration, node, 2, 1);
-                case 251:
+                case 255:
                     return doWithHierarchyFacts(visitFunctionDeclaration, node, 2, 1);
-                case 208:
+                case 212:
                     return doWithHierarchyFacts(visitFunctionExpression, node, 2, 1);
-                case 209:
+                case 213:
                     return doWithHierarchyFacts(visitArrowFunction, node, 2, 0);
-                case 160:
+                case 163:
                     return visitParameter(node);
-                case 233:
+                case 237:
                     return visitExpressionStatement(node);
-                case 207:
+                case 211:
                     return visitParenthesizedExpression(node, expressionResultIsUnused);
-                case 205:
+                case 209:
                     return visitTaggedTemplateExpression(node);
-                case 201:
-                    if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 105) {
+                case 205:
+                    if (capturedSuperProperties && ts.isPropertyAccessExpression(node) && node.expression.kind === 106) {
                         capturedSuperProperties.add(node.name.escapedText);
                     }
                     return ts.visitEachChild(node, visitor, context);
-                case 202:
-                    if (capturedSuperProperties && node.expression.kind === 105) {
+                case 206:
+                    if (capturedSuperProperties && node.expression.kind === 106) {
                         hasSuperElementAccess = true;
                     }
                     return ts.visitEachChild(node, visitor, context);
-                case 252:
-                case 221:
+                case 256:
+                case 225:
                     return doWithHierarchyFacts(visitDefault, node, 2, 1);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -72830,7 +78532,7 @@ var ts;
         function visitLabeledStatement(node) {
             if (enclosingFunctionFlags & 2) {
                 var statement = ts.unwrapInnermostStatementOfLabel(node);
-                if (statement.kind === 239 && statement.awaitModifier) {
+                if (statement.kind === 243 && statement.awaitModifier) {
                     return visitForOfStatement(statement, node);
                 }
                 return factory.restoreEnclosingLabel(ts.visitNode(statement, visitor, ts.isStatement, factory.liftToBlock), node);
@@ -72842,7 +78544,7 @@ var ts;
             var objects = [];
             for (var _i = 0, elements_4 = elements; _i < elements_4.length; _i++) {
                 var e = elements_4[_i];
-                if (e.kind === 290) {
+                if (e.kind === 296) {
                     if (chunkObject) {
                         objects.push(factory.createObjectLiteralExpression(chunkObject));
                         chunkObject = undefined;
@@ -72851,7 +78553,7 @@ var ts;
                     objects.push(ts.visitNode(target, visitor, ts.isExpression));
                 }
                 else {
-                    chunkObject = ts.append(chunkObject, e.kind === 288
+                    chunkObject = ts.append(chunkObject, e.kind === 294
                         ? factory.createPropertyAssignment(e.name, ts.visitNode(e.initializer, visitor, ts.isExpression))
                         : ts.visitNode(e, visitor, ts.isObjectLiteralElementLike));
                 }
@@ -72862,9 +78564,9 @@ var ts;
             return objects;
         }
         function visitObjectLiteralExpression(node) {
-            if (node.transformFlags & 16384) {
+            if (node.transformFlags & 32768) {
                 var objects = chunkObjectLiteralElements(node.properties);
-                if (objects.length && objects[0].kind !== 200) {
+                if (objects.length && objects[0].kind !== 204) {
                     objects.unshift(factory.createObjectLiteralExpression());
                 }
                 var expression = objects[0];
@@ -72903,7 +78605,7 @@ var ts;
             return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.LiftRestriction);
         }
         function visitBinaryExpression(node, expressionResultIsUnused) {
-            if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 16384) {
+            if (ts.isDestructuringAssignment(node) && node.left.transformFlags & 32768) {
                 return ts.flattenDestructuringAssignment(node, visitor, context, 1, !expressionResultIsUnused);
             }
             if (node.operatorToken.kind === 27) {
@@ -72930,7 +78632,7 @@ var ts;
         function visitCatchClause(node) {
             if (node.variableDeclaration &&
                 ts.isBindingPattern(node.variableDeclaration.name) &&
-                node.variableDeclaration.name.transformFlags & 16384) {
+                node.variableDeclaration.name.transformFlags & 32768) {
                 var name = factory.getGeneratedNameForNode(node.variableDeclaration.name);
                 var updatedDecl = factory.updateVariableDeclaration(node.variableDeclaration, node.variableDeclaration.name, undefined, undefined, name);
                 var visitedBindings = ts.flattenDestructuringBinding(updatedDecl, visitor, context, 1);
@@ -72938,7 +78640,7 @@ var ts;
                 if (ts.some(visitedBindings)) {
                     block = factory.updateBlock(block, __spreadArray([
                         factory.createVariableStatement(undefined, visitedBindings)
-                    ], block.statements));
+                    ], block.statements, true));
                 }
                 return factory.updateCatchClause(node, factory.updateVariableDeclaration(node.variableDeclaration, name, undefined, undefined, undefined), block);
             }
@@ -72965,20 +78667,20 @@ var ts;
             return visitVariableDeclarationWorker(node, false);
         }
         function visitVariableDeclarationWorker(node, exportedVariableStatement) {
-            if (ts.isBindingPattern(node.name) && node.name.transformFlags & 16384) {
+            if (ts.isBindingPattern(node.name) && node.name.transformFlags & 32768) {
                 return ts.flattenDestructuringBinding(node, visitor, context, 1, undefined, exportedVariableStatement);
             }
             return ts.visitEachChild(node, visitor, context);
         }
         function visitForStatement(node) {
-            return factory.updateForStatement(node, ts.visitNode(node.initializer, visitorWithUnusedExpressionResult, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitorWithUnusedExpressionResult, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement));
+            return factory.updateForStatement(node, ts.visitNode(node.initializer, visitorWithUnusedExpressionResult, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitorWithUnusedExpressionResult, ts.isExpression), ts.visitIterationBody(node.statement, visitor, context));
         }
         function visitVoidExpression(node) {
             return ts.visitEachChild(node, visitorWithUnusedExpressionResult, context);
         }
         function visitForOfStatement(node, outermostLabeledStatement) {
             var ancestorFacts = enterSubtree(0, 2);
-            if (node.initializer.transformFlags & 16384) {
+            if (node.initializer.transformFlags & 32768) {
                 node = transformForOfStatementWithObjectRest(node);
             }
             var result = node.awaitModifier ?
@@ -73015,7 +78717,7 @@ var ts;
             var bodyLocation;
             var statementsLocation;
             var statements = [ts.visitNode(binding, visitor, ts.isStatement)];
-            var statement = ts.visitNode(node.statement, visitor, ts.isStatement);
+            var statement = ts.visitIterationBody(node.statement, visitor, context);
             if (ts.isBlock(statement)) {
                 ts.addRange(statements, statement.statements);
                 bodyLocation = statement;
@@ -73067,7 +78769,7 @@ var ts;
             ]));
         }
         function visitParameter(node) {
-            if (node.transformFlags & 16384) {
+            if (node.transformFlags & 32768) {
                 return factory.updateParameterDeclaration(node, undefined, undefined, node.dotDotDotToken, factory.getGeneratedNameForNode(node), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
             }
             return ts.visitEachChild(node, visitor, context);
@@ -73193,7 +78895,7 @@ var ts;
         function appendObjectRestAssignmentsIfNeeded(statements, node) {
             for (var _i = 0, _a = node.parameters; _i < _a.length; _i++) {
                 var parameter = _a[_i];
-                if (parameter.transformFlags & 16384) {
+                if (parameter.transformFlags & 32768) {
                     var temp = factory.getGeneratedNameForNode(parameter);
                     var declarations = ts.flattenDestructuringBinding(parameter, visitor, context, 1, temp, false, true);
                     if (ts.some(declarations)) {
@@ -73208,15 +78910,15 @@ var ts;
         function enableSubstitutionForAsyncMethodsWithSuper() {
             if ((enabledSubstitutions & 1) === 0) {
                 enabledSubstitutions |= 1;
-                context.enableSubstitution(203);
-                context.enableSubstitution(201);
-                context.enableSubstitution(202);
-                context.enableEmitNotification(252);
-                context.enableEmitNotification(165);
-                context.enableEmitNotification(167);
+                context.enableSubstitution(207);
+                context.enableSubstitution(205);
+                context.enableSubstitution(206);
+                context.enableEmitNotification(256);
                 context.enableEmitNotification(168);
-                context.enableEmitNotification(166);
-                context.enableEmitNotification(232);
+                context.enableEmitNotification(171);
+                context.enableEmitNotification(172);
+                context.enableEmitNotification(170);
+                context.enableEmitNotification(236);
             }
         }
         function onEmitNode(hint, node, emitCallback) {
@@ -73248,23 +78950,23 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 201:
+                case 205:
                     return substitutePropertyAccessExpression(node);
-                case 202:
+                case 206:
                     return substituteElementAccessExpression(node);
-                case 203:
+                case 207:
                     return substituteCallExpression(node);
             }
             return node;
         }
         function substitutePropertyAccessExpression(node) {
-            if (node.expression.kind === 105) {
+            if (node.expression.kind === 106) {
                 return ts.setTextRange(factory.createPropertyAccessExpression(factory.createUniqueName("_super", 16 | 32), node.name), node);
             }
             return node;
         }
         function substituteElementAccessExpression(node) {
-            if (node.expression.kind === 105) {
+            if (node.expression.kind === 106) {
                 return createSuperElementAccessInAsyncMethod(node.argumentExpression, node);
             }
             return node;
@@ -73277,17 +78979,17 @@ var ts;
                     : substituteElementAccessExpression(expression);
                 return factory.createCallExpression(factory.createPropertyAccessExpression(argumentExpression, "call"), undefined, __spreadArray([
                     factory.createThis()
-                ], node.arguments));
+                ], node.arguments, true));
             }
             return node;
         }
         function isSuperContainer(node) {
             var kind = node.kind;
-            return kind === 252
-                || kind === 166
-                || kind === 165
-                || kind === 167
-                || kind === 168;
+            return kind === 256
+                || kind === 170
+                || kind === 168
+                || kind === 171
+                || kind === 172;
         }
         function createSuperElementAccessInAsyncMethod(argumentExpression, location) {
             if (enclosingSuperContainerFlags & 4096) {
@@ -73312,11 +79014,11 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitor(node) {
-            if ((node.transformFlags & 16) === 0) {
+            if ((node.transformFlags & 32) === 0) {
                 return node;
             }
             switch (node.kind) {
-                case 287:
+                case 291:
                     return visitCatchClause(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -73343,25 +79045,29 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitor(node) {
-            if ((node.transformFlags & 8) === 0) {
+            if ((node.transformFlags & 16) === 0) {
                 return node;
             }
             switch (node.kind) {
-                case 201:
-                case 202:
-                case 203:
-                    if (node.flags & 32) {
+                case 207: {
+                    var updated = visitNonOptionalCallExpression(node, false);
+                    ts.Debug.assertNotNode(updated, ts.isSyntheticReference);
+                    return updated;
+                }
+                case 205:
+                case 206:
+                    if (ts.isOptionalChain(node)) {
                         var updated = visitOptionalExpression(node, false, false);
                         ts.Debug.assertNotNode(updated, ts.isSyntheticReference);
                         return updated;
                     }
                     return ts.visitEachChild(node, visitor, context);
-                case 216:
+                case 220:
                     if (node.operatorToken.kind === 60) {
                         return transformNullishCoalescingExpression(node);
                     }
                     return ts.visitEachChild(node, visitor, context);
-                case 210:
+                case 214:
                     return visitDeleteExpression(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -73400,7 +79106,7 @@ var ts;
                     thisArg = expression;
                 }
             }
-            expression = node.kind === 201
+            expression = node.kind === 205
                 ? factory.updatePropertyAccessExpression(node, expression, ts.visitNode(node.name, visitor, ts.isIdentifier))
                 : factory.updateElementAccessExpression(node, expression, ts.visitNode(node.argumentExpression, visitor, ts.isExpression));
             return thisArg ? factory.createSyntheticReferenceExpression(expression, thisArg) : expression;
@@ -73409,14 +79115,22 @@ var ts;
             if (ts.isOptionalChain(node)) {
                 return visitOptionalExpression(node, captureThisArg, false);
             }
+            if (ts.isParenthesizedExpression(node.expression) && ts.isOptionalChain(ts.skipParentheses(node.expression))) {
+                var expression = visitNonOptionalParenthesizedExpression(node.expression, true, false);
+                var args = ts.visitNodes(node.arguments, visitor, ts.isExpression);
+                if (ts.isSyntheticReference(expression)) {
+                    return ts.setTextRange(factory.createFunctionCallCall(expression.expression, expression.thisArg, args), node);
+                }
+                return factory.updateCallExpression(node, expression, undefined, args);
+            }
             return ts.visitEachChild(node, visitor, context);
         }
         function visitNonOptionalExpression(node, captureThisArg, isDelete) {
             switch (node.kind) {
-                case 207: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete);
-                case 201:
-                case 202: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete);
-                case 203: return visitNonOptionalCallExpression(node, captureThisArg);
+                case 211: return visitNonOptionalParenthesizedExpression(node, captureThisArg, isDelete);
+                case 205:
+                case 206: return visitNonOptionalPropertyOrElementAccessExpression(node, captureThisArg, isDelete);
+                case 207: return visitNonOptionalCallExpression(node, captureThisArg);
                 default: return ts.visitNode(node, visitor, ts.isExpression);
             }
         }
@@ -73435,8 +79149,8 @@ var ts;
             for (var i = 0; i < chain.length; i++) {
                 var segment = chain[i];
                 switch (segment.kind) {
-                    case 201:
-                    case 202:
+                    case 205:
+                    case 206:
                         if (i === chain.length - 1 && captureThisArg) {
                             if (!ts.isSimpleCopiableExpression(rightExpression)) {
                                 thisArg = factory.createTempVariable(hoistVariableDeclaration);
@@ -73446,13 +79160,13 @@ var ts;
                                 thisArg = rightExpression;
                             }
                         }
-                        rightExpression = segment.kind === 201
+                        rightExpression = segment.kind === 205
                             ? factory.createPropertyAccessExpression(rightExpression, ts.visitNode(segment.name, visitor, ts.isIdentifier))
                             : factory.createElementAccessExpression(rightExpression, ts.visitNode(segment.argumentExpression, visitor, ts.isExpression));
                         break;
-                    case 203:
+                    case 207:
                         if (i === 0 && leftThisArg) {
-                            rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 105 ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
+                            rightExpression = factory.createFunctionCallCall(rightExpression, leftThisArg.kind === 106 ? factory.createThis() : leftThisArg, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
                         }
                         else {
                             rightExpression = factory.createCallExpression(rightExpression, undefined, ts.visitNodes(segment.arguments, visitor, ts.isExpression));
@@ -73489,7 +79203,7 @@ var ts;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
-    function transformESNext(context) {
+    function transformES2021(context) {
         var hoistVariableDeclaration = context.hoistVariableDeclaration, factory = context.factory;
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
@@ -73499,11 +79213,11 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitor(node) {
-            if ((node.transformFlags & 4) === 0) {
+            if ((node.transformFlags & 8) === 0) {
                 return node;
             }
             switch (node.kind) {
-                case 216:
+                case 220:
                     var binaryExpression = node;
                     if (ts.isLogicalOrCoalescingAssignmentExpression(binaryExpression)) {
                         return transformLogicalAssignment(binaryExpression);
@@ -73538,6 +79252,28 @@ var ts;
             return factory.createBinaryExpression(left, nonAssignmentOperator, factory.createParenthesizedExpression(factory.createAssignment(assignmentTarget, right)));
         }
     }
+    ts.transformES2021 = transformES2021;
+})(ts || (ts = {}));
+var ts;
+(function (ts) {
+    function transformESNext(context) {
+        return ts.chainBundle(context, transformSourceFile);
+        function transformSourceFile(node) {
+            if (node.isDeclarationFile) {
+                return node;
+            }
+            return ts.visitEachChild(node, visitor, context);
+        }
+        function visitor(node) {
+            if ((node.transformFlags & 4) === 0) {
+                return node;
+            }
+            switch (node.kind) {
+                default:
+                    return ts.visitEachChild(node, visitor, context);
+            }
+        }
+    }
     ts.transformESNext = transformESNext;
 })(ts || (ts = {}));
 var ts;
@@ -73556,11 +79292,11 @@ var ts;
             currentFileState.filenameDeclaration = declaration;
             return currentFileState.filenameDeclaration.name;
         }
-        function getJsxFactoryCalleePrimitive(childrenLength) {
-            return compilerOptions.jsx === 5 ? "jsxDEV" : childrenLength > 1 ? "jsxs" : "jsx";
+        function getJsxFactoryCalleePrimitive(isStaticChildren) {
+            return compilerOptions.jsx === 5 ? "jsxDEV" : isStaticChildren ? "jsxs" : "jsx";
         }
-        function getJsxFactoryCallee(childrenLength) {
-            var type = getJsxFactoryCalleePrimitive(childrenLength);
+        function getJsxFactoryCallee(isStaticChildren) {
+            var type = getJsxFactoryCalleePrimitive(isStaticChildren);
             return getImplicitImportForName(type);
         }
         function getImplicitJsxFragmentReference() {
@@ -73583,8 +79319,8 @@ var ts;
                 specifierSourceImports = ts.createMap();
                 currentFileState.utilizedImplicitRuntimeImports.set(importSource, specifierSourceImports);
             }
-            var generatedName = factory.createUniqueName("_" + name, 16 | 32 | 64);
-            var specifier = factory.createImportSpecifier(factory.createIdentifier(name), generatedName);
+            var generatedName = factory.createUniqueName("_".concat(name), 16 | 32 | 64);
+            var specifier = factory.createImportSpecifier(false, factory.createIdentifier(name), generatedName);
             generatedName.generatedImportReference = specifier;
             specifierSourceImports.set(name, specifier);
             return generatedName;
@@ -73606,7 +79342,7 @@ var ts;
                 for (var _i = 0, _a = ts.arrayFrom(currentFileState.utilizedImplicitRuntimeImports.entries()); _i < _a.length; _i++) {
                     var _b = _a[_i], importSource = _b[0], importSpecifiersMap = _b[1];
                     if (ts.isExternalModule(node)) {
-                        var importStatement = factory.createImportDeclaration(undefined, undefined, factory.createImportClause(false, undefined, factory.createNamedImports(ts.arrayFrom(importSpecifiersMap.values()))), factory.createStringLiteral(importSource));
+                        var importStatement = factory.createImportDeclaration(undefined, undefined, factory.createImportClause(false, undefined, factory.createNamedImports(ts.arrayFrom(importSpecifiersMap.values()))), factory.createStringLiteral(importSource), undefined);
                         ts.setParentRecursive(importStatement, false);
                         statements = ts.insertStatementAfterCustomPrologue(statements.slice(), importStatement);
                     }
@@ -73637,13 +79373,13 @@ var ts;
         }
         function visitorWorker(node) {
             switch (node.kind) {
-                case 273:
+                case 277:
                     return visitJsxElement(node, false);
-                case 274:
+                case 278:
                     return visitJsxSelfClosingElement(node, false);
-                case 277:
+                case 281:
                     return visitJsxFragment(node, false);
-                case 283:
+                case 287:
                     return visitJsxExpression(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -73653,13 +79389,13 @@ var ts;
             switch (node.kind) {
                 case 11:
                     return visitJsxText(node);
-                case 283:
+                case 287:
                     return visitJsxExpression(node);
-                case 273:
+                case 277:
                     return visitJsxElement(node, true);
-                case 274:
+                case 278:
                     return visitJsxSelfClosingElement(node, true);
-                case 277:
+                case 281:
                     return visitJsxFragment(node, true);
                 default:
                     return ts.Debug.failBadSyntaxKind(node);
@@ -73694,52 +79430,36 @@ var ts;
             return tagTransform(node.openingFragment, node.children, isChild, node);
         }
         function convertJsxChildrenToChildrenPropObject(children) {
+            var prop = convertJsxChildrenToChildrenPropAssignment(children);
+            return prop && factory.createObjectLiteralExpression([prop]);
+        }
+        function convertJsxChildrenToChildrenPropAssignment(children) {
             var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
-            if (ts.length(nonWhitespaceChildren) === 1) {
-                var result_13 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
-                return result_13 && factory.createObjectLiteralExpression([
-                    factory.createPropertyAssignment("children", result_13)
-                ]);
+            if (ts.length(nonWhitespaceChildren) === 1 && !nonWhitespaceChildren[0].dotDotDotToken) {
+                var result_12 = transformJsxChildToExpression(nonWhitespaceChildren[0]);
+                return result_12 && factory.createPropertyAssignment("children", result_12);
             }
             var result = ts.mapDefined(children, transformJsxChildToExpression);
-            return !result.length ? undefined : factory.createObjectLiteralExpression([
-                factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result))
-            ]);
+            return ts.length(result) ? factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result)) : undefined;
         }
         function visitJsxOpeningLikeElementJSX(node, children, isChild, location) {
             var tagName = getTagName(node);
-            var objectProperties;
+            var childrenProp = children && children.length ? convertJsxChildrenToChildrenPropAssignment(children) : undefined;
             var keyAttr = ts.find(node.attributes.properties, function (p) { return !!p.name && ts.isIdentifier(p.name) && p.name.escapedText === "key"; });
             var attrs = keyAttr ? ts.filter(node.attributes.properties, function (p) { return p !== keyAttr; }) : node.attributes.properties;
-            var segments = [];
-            if (attrs.length) {
-                segments = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) { return isSpread
-                    ? ts.map(attrs, transformJsxSpreadAttributeToExpression)
-                    : factory.createObjectLiteralExpression(ts.map(attrs, transformJsxAttributeToObjectLiteralElement)); }));
-                if (ts.isJsxSpreadAttribute(attrs[0])) {
-                    segments.unshift(factory.createObjectLiteralExpression());
-                }
-            }
-            if (children && children.length) {
-                var result = convertJsxChildrenToChildrenPropObject(children);
-                if (result) {
-                    segments.push(result);
-                }
-            }
-            if (segments.length === 0) {
-                objectProperties = factory.createObjectLiteralExpression([]);
-            }
-            else {
-                objectProperties = ts.singleOrUndefined(segments) || emitHelpers().createAssignHelper(segments);
-            }
-            return visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, ts.length(ts.getSemanticJsxChildren(children || ts.emptyArray)), isChild, location);
+            var objectProperties = ts.length(attrs) ? transformJsxAttributesToObjectProps(attrs, childrenProp) :
+                factory.createObjectLiteralExpression(childrenProp ? [childrenProp] : ts.emptyArray);
+            return visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, children || ts.emptyArray, isChild, location);
         }
-        function visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, childrenLength, isChild, location) {
+        function visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, children, isChild, location) {
+            var _a;
+            var nonWhitespaceChildren = ts.getSemanticJsxChildren(children);
+            var isStaticChildren = ts.length(nonWhitespaceChildren) > 1 || !!((_a = nonWhitespaceChildren[0]) === null || _a === void 0 ? void 0 : _a.dotDotDotToken);
             var args = [tagName, objectProperties, !keyAttr ? factory.createVoidZero() : transformJsxAttributeInitializer(keyAttr.initializer)];
             if (compilerOptions.jsx === 5) {
                 var originalFile = ts.getOriginalNode(currentSourceFile);
                 if (originalFile && ts.isSourceFile(originalFile)) {
-                    args.push(childrenLength > 1 ? factory.createTrue() : factory.createFalse());
+                    args.push(isStaticChildren ? factory.createTrue() : factory.createFalse());
                     var lineCol = ts.getLineAndCharacterOfPosition(originalFile, location.pos);
                     args.push(factory.createObjectLiteralExpression([
                         factory.createPropertyAssignment("fileName", getCurrentFileNameExpression()),
@@ -73749,7 +79469,7 @@ var ts;
                     args.push(factory.createThis());
                 }
             }
-            var element = ts.setTextRange(factory.createCallExpression(getJsxFactoryCallee(childrenLength), undefined, args), location);
+            var element = ts.setTextRange(factory.createCallExpression(getJsxFactoryCallee(isStaticChildren), undefined, args), location);
             if (isChild) {
                 ts.startOnNewLine(element);
             }
@@ -73757,23 +79477,9 @@ var ts;
         }
         function visitJsxOpeningLikeElementCreateElement(node, children, isChild, location) {
             var tagName = getTagName(node);
-            var objectProperties;
             var attrs = node.attributes.properties;
-            if (attrs.length === 0) {
-                objectProperties = factory.createNull();
-            }
-            else {
-                var segments = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) { return isSpread
-                    ? ts.map(attrs, transformJsxSpreadAttributeToExpression)
-                    : factory.createObjectLiteralExpression(ts.map(attrs, transformJsxAttributeToObjectLiteralElement)); }));
-                if (ts.isJsxSpreadAttribute(attrs[0])) {
-                    segments.unshift(factory.createObjectLiteralExpression());
-                }
-                objectProperties = ts.singleOrUndefined(segments);
-                if (!objectProperties) {
-                    objectProperties = emitHelpers().createAssignHelper(segments);
-                }
-            }
+            var objectProperties = ts.length(attrs) ? transformJsxAttributesToObjectProps(attrs) :
+                factory.createNull();
             var callee = currentFileState.importSpecifier === undefined
                 ? ts.createJsxFactoryExpression(factory, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, node)
                 : getImplicitImportForName("createElement");
@@ -73791,7 +79497,7 @@ var ts;
                     childrenProps = result;
                 }
             }
-            return visitJsxOpeningLikeElementOrFragmentJSX(getImplicitJsxFragmentReference(), childrenProps || factory.createObjectLiteralExpression([]), undefined, ts.length(ts.getSemanticJsxChildren(children)), isChild, location);
+            return visitJsxOpeningLikeElementOrFragmentJSX(getImplicitJsxFragmentReference(), childrenProps || factory.createObjectLiteralExpression([]), undefined, children, isChild, location);
         }
         function visitJsxOpeningFragmentCreateElement(node, children, isChild, location) {
             var element = ts.createExpressionForJsxFragment(factory, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), context.getEmitResolver().getJsxFragmentFactoryEntity(currentSourceFile), compilerOptions.reactNamespace, ts.mapDefined(children, transformJsxChildToExpression), node, location);
@@ -73800,6 +79506,35 @@ var ts;
             }
             return element;
         }
+        function transformJsxSpreadAttributeToSpreadAssignment(node) {
+            return factory.createSpreadAssignment(ts.visitNode(node.expression, visitor, ts.isExpression));
+        }
+        function transformJsxAttributesToObjectProps(attrs, children) {
+            var target = ts.getEmitScriptTarget(compilerOptions);
+            return target && target >= 5 ? factory.createObjectLiteralExpression(transformJsxAttributesToProps(attrs, children)) :
+                transformJsxAttributesToExpression(attrs, children);
+        }
+        function transformJsxAttributesToProps(attrs, children) {
+            var props = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) {
+                return ts.map(attrs, function (attr) { return isSpread ? transformJsxSpreadAttributeToSpreadAssignment(attr) : transformJsxAttributeToObjectLiteralElement(attr); });
+            }));
+            if (children) {
+                props.push(children);
+            }
+            return props;
+        }
+        function transformJsxAttributesToExpression(attrs, children) {
+            var expressions = ts.flatten(ts.spanMap(attrs, ts.isJsxSpreadAttribute, function (attrs, isSpread) { return isSpread
+                ? ts.map(attrs, transformJsxSpreadAttributeToExpression)
+                : factory.createObjectLiteralExpression(ts.map(attrs, transformJsxAttributeToObjectLiteralElement)); }));
+            if (ts.isJsxSpreadAttribute(attrs[0])) {
+                expressions.unshift(factory.createObjectLiteralExpression());
+            }
+            if (children) {
+                expressions.push(factory.createObjectLiteralExpression([children]));
+            }
+            return ts.singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
+        }
         function transformJsxSpreadAttributeToExpression(node) {
             return ts.visitNode(node.expression, visitor, ts.isExpression);
         }
@@ -73817,7 +79552,7 @@ var ts;
                 var literal = factory.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
                 return ts.setTextRange(literal, node);
             }
-            else if (node.kind === 283) {
+            else if (node.kind === 287) {
                 if (node.expression === undefined) {
                     return factory.createTrue();
                 }
@@ -73877,7 +79612,7 @@ var ts;
             return decoded === text ? undefined : decoded;
         }
         function getTagName(node) {
-            if (node.kind === 273) {
+            if (node.kind === 277) {
                 return getTagName(node.openingElement);
             }
             else {
@@ -73901,7 +79636,8 @@ var ts;
             }
         }
         function visitJsxExpression(node) {
-            return ts.visitNode(node.expression, visitor, ts.isExpression);
+            var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+            return node.dotDotDotToken ? factory.createSpreadElement(expression) : expression;
         }
     }
     ts.transformJsx = transformJsx;
@@ -74173,11 +79909,11 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitor(node) {
-            if ((node.transformFlags & 128) === 0) {
+            if ((node.transformFlags & 256) === 0) {
                 return node;
             }
             switch (node.kind) {
-                case 216:
+                case 220:
                     return visitBinaryExpression(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -74185,7 +79921,7 @@ var ts;
         }
         function visitBinaryExpression(node) {
             switch (node.operatorToken.kind) {
-                case 66:
+                case 67:
                     return visitExponentiationAssignmentExpression(node);
                 case 42:
                     return visitExponentiationExpression(node);
@@ -74225,6 +79961,9 @@ var ts;
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
+    function createSpreadSegment(kind, expression) {
+        return { kind: kind, expression: expression };
+    }
     function transformES2015(context) {
         var factory = context.factory, emitHelpers = context.getEmitHelperFactory, startLexicalEnvironment = context.startLexicalEnvironment, resumeLexicalEnvironment = context.resumeLexicalEnvironment, endLexicalEnvironment = context.endLexicalEnvironment, hoistVariableDeclaration = context.hoistVariableDeclaration;
         var compilerOptions = context.getCompilerOptions();
@@ -74259,19 +79998,19 @@ var ts;
         }
         function enterSubtree(excludeFacts, includeFacts) {
             var ancestorFacts = hierarchyFacts;
-            hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 16383;
+            hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & 32767;
             return ancestorFacts;
         }
         function exitSubtree(ancestorFacts, excludeFacts, includeFacts) {
-            hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -16384 | ancestorFacts;
+            hierarchyFacts = (hierarchyFacts & ~excludeFacts | includeFacts) & -32768 | ancestorFacts;
         }
         function isReturnVoidStatementInConstructorWithCapturedSuper(node) {
             return (hierarchyFacts & 8192) !== 0
-                && node.kind === 242
+                && node.kind === 246
                 && !node.expression;
         }
         function isOrMayContainReturnCompletion(node) {
-            return node.transformFlags & 1048576
+            return node.transformFlags & 2097152
                 && (ts.isReturnStatement(node)
                     || ts.isIfStatement(node)
                     || ts.isWithStatement(node)
@@ -74286,7 +80025,7 @@ var ts;
                     || ts.isBlock(node));
         }
         function shouldVisitNode(node) {
-            return (node.transformFlags & 256) !== 0
+            return (node.transformFlags & 512) !== 0
                 || convertedLoopState !== undefined
                 || (hierarchyFacts & 8192 && isOrMayContainReturnCompletion(node))
                 || (ts.isIterationStatement(node, false) && shouldConvertIterationStatement(node))
@@ -74298,75 +80037,88 @@ var ts;
         function visitorWithUnusedExpressionResult(node) {
             return shouldVisitNode(node) ? visitorWorker(node, true) : node;
         }
+        function classWrapperStatementVisitor(node) {
+            if (shouldVisitNode(node)) {
+                var original = ts.getOriginalNode(node);
+                if (ts.isPropertyDeclaration(original) && ts.hasStaticModifier(original)) {
+                    var ancestorFacts = enterSubtree(32670, 16449);
+                    var result = visitorWorker(node, false);
+                    exitSubtree(ancestorFacts, 98304, 0);
+                    return result;
+                }
+                return visitorWorker(node, false);
+            }
+            return node;
+        }
         function callExpressionVisitor(node) {
-            if (node.kind === 105) {
+            if (node.kind === 106) {
                 return visitSuperKeyword(true);
             }
             return visitor(node);
         }
         function visitorWorker(node, expressionResultIsUnused) {
             switch (node.kind) {
-                case 123:
+                case 124:
                     return undefined;
-                case 252:
+                case 256:
                     return visitClassDeclaration(node);
-                case 221:
+                case 225:
                     return visitClassExpression(node);
-                case 160:
+                case 163:
                     return visitParameter(node);
-                case 251:
+                case 255:
                     return visitFunctionDeclaration(node);
-                case 209:
+                case 213:
                     return visitArrowFunction(node);
-                case 208:
+                case 212:
                     return visitFunctionExpression(node);
-                case 249:
+                case 253:
                     return visitVariableDeclaration(node);
-                case 78:
+                case 79:
                     return visitIdentifier(node);
-                case 250:
+                case 254:
                     return visitVariableDeclarationList(node);
-                case 244:
+                case 248:
                     return visitSwitchStatement(node);
-                case 258:
+                case 262:
                     return visitCaseBlock(node);
-                case 230:
+                case 234:
                     return visitBlock(node, false);
-                case 241:
-                case 240:
-                    return visitBreakOrContinueStatement(node);
                 case 245:
+                case 244:
+                    return visitBreakOrContinueStatement(node);
+                case 249:
                     return visitLabeledStatement(node);
-                case 235:
-                case 236:
+                case 239:
+                case 240:
                     return visitDoOrWhileStatement(node, undefined);
-                case 237:
+                case 241:
                     return visitForStatement(node, undefined);
-                case 238:
+                case 242:
                     return visitForInStatement(node, undefined);
-                case 239:
+                case 243:
                     return visitForOfStatement(node, undefined);
-                case 233:
+                case 237:
                     return visitExpressionStatement(node);
-                case 200:
+                case 204:
                     return visitObjectLiteralExpression(node);
-                case 287:
+                case 291:
                     return visitCatchClause(node);
-                case 289:
+                case 295:
                     return visitShorthandPropertyAssignment(node);
-                case 158:
+                case 161:
                     return visitComputedPropertyName(node);
-                case 199:
-                    return visitArrayLiteralExpression(node);
                 case 203:
+                    return visitArrayLiteralExpression(node);
+                case 207:
                     return visitCallExpression(node);
-                case 204:
+                case 208:
                     return visitNewExpression(node);
-                case 207:
+                case 211:
                     return visitParenthesizedExpression(node, expressionResultIsUnused);
-                case 216:
+                case 220:
                     return visitBinaryExpression(node, expressionResultIsUnused);
-                case 337:
+                case 349:
                     return visitCommaListExpression(node, expressionResultIsUnused);
                 case 14:
                 case 15:
@@ -74377,30 +80129,30 @@ var ts;
                     return visitStringLiteral(node);
                 case 8:
                     return visitNumericLiteral(node);
-                case 205:
+                case 209:
                     return visitTaggedTemplateExpression(node);
-                case 218:
+                case 222:
                     return visitTemplateExpression(node);
-                case 219:
+                case 223:
                     return visitYieldExpression(node);
-                case 220:
+                case 224:
                     return visitSpreadElement(node);
-                case 105:
+                case 106:
                     return visitSuperKeyword(false);
-                case 107:
+                case 108:
                     return visitThisKeyword(node);
-                case 226:
+                case 230:
                     return visitMetaProperty(node);
-                case 165:
-                    return visitMethodDeclaration(node);
-                case 167:
                 case 168:
+                    return visitMethodDeclaration(node);
+                case 171:
+                case 172:
                     return visitAccessorDeclaration(node);
-                case 232:
+                case 236:
                     return visitVariableStatement(node);
-                case 242:
+                case 246:
                     return visitReturnStatement(node);
-                case 212:
+                case 216:
                     return visitVoidExpression(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -74458,8 +80210,8 @@ var ts;
             return ts.visitEachChild(node, visitor, context);
         }
         function visitThisKeyword(node) {
-            if (hierarchyFacts & 2) {
-                hierarchyFacts |= 32768;
+            if (hierarchyFacts & 2 && !(hierarchyFacts & 16384)) {
+                hierarchyFacts |= 65536;
             }
             if (convertedLoopState) {
                 if (hierarchyFacts & 2) {
@@ -74484,14 +80236,14 @@ var ts;
         }
         function visitBreakOrContinueStatement(node) {
             if (convertedLoopState) {
-                var jump = node.kind === 241 ? 2 : 4;
+                var jump = node.kind === 245 ? 2 : 4;
                 var canUseBreakOrContinue = (node.label && convertedLoopState.labels && convertedLoopState.labels.get(ts.idText(node.label))) ||
                     (!node.label && (convertedLoopState.allowedNonLabeledJumps & jump));
                 if (!canUseBreakOrContinue) {
                     var labelMarker = void 0;
                     var label = node.label;
                     if (!label) {
-                        if (node.kind === 241) {
+                        if (node.kind === 245) {
                             convertedLoopState.nonLocalJumps |= 2;
                             labelMarker = "break";
                         }
@@ -74501,12 +80253,12 @@ var ts;
                         }
                     }
                     else {
-                        if (node.kind === 241) {
-                            labelMarker = "break-" + label.escapedText;
+                        if (node.kind === 245) {
+                            labelMarker = "break-".concat(label.escapedText);
                             setLabeledJump(convertedLoopState, true, ts.idText(label), labelMarker);
                         }
                         else {
-                            labelMarker = "continue-" + label.escapedText;
+                            labelMarker = "continue-".concat(label.escapedText);
                             setLabeledJump(convertedLoopState, false, ts.idText(label), labelMarker);
                         }
                     }
@@ -74604,7 +80356,7 @@ var ts;
         function addConstructor(statements, node, name, extendsClauseElement) {
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
-            var ancestorFacts = enterSubtree(16278, 73);
+            var ancestorFacts = enterSubtree(32662, 73);
             var constructor = ts.getFirstConstructorWithBody(node);
             var hasSynthesizedSuper = hasSynthesizedDefaultSuperCall(constructor, extendsClauseElement !== undefined);
             var constructorFunction = factory.createFunctionDeclaration(undefined, undefined, undefined, name, undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), undefined, transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper));
@@ -74613,7 +80365,7 @@ var ts;
                 ts.setEmitFlags(constructorFunction, 8);
             }
             statements.push(constructorFunction);
-            exitSubtree(ancestorFacts, 49152, 0);
+            exitSubtree(ancestorFacts, 98304, 0);
             convertedLoopState = savedConvertedLoopState;
         }
         function transformConstructorParameters(constructor, hasSynthesizedSuper) {
@@ -74635,7 +80387,7 @@ var ts;
             return block;
         }
         function transformConstructorBody(constructor, node, extendsClauseElement, hasSynthesizedSuper) {
-            var isDerivedClass = !!extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 103;
+            var isDerivedClass = !!extendsClauseElement && ts.skipOuterExpressions(extendsClauseElement.expression).kind !== 104;
             if (!constructor)
                 return createDefaultConstructorBody(node, isDerivedClass);
             var prologue = [];
@@ -74666,7 +80418,7 @@ var ts;
             factory.mergeLexicalEnvironment(prologue, endLexicalEnvironment());
             insertCaptureNewTargetIfNeeded(prologue, constructor, false);
             if (isDerivedClass) {
-                if (superCallExpression && statementOffset === constructor.body.statements.length && !(constructor.body.transformFlags & 4096)) {
+                if (superCallExpression && statementOffset === constructor.body.statements.length && !(constructor.body.transformFlags & 8192)) {
                     var superCall = ts.cast(ts.cast(superCallExpression, ts.isBinaryExpression).left, ts.isCallExpression);
                     var returnStatement = factory.createReturnStatement(superCallExpression);
                     ts.setCommentRange(returnStatement, ts.getCommentRange(superCall));
@@ -74688,17 +80440,17 @@ var ts;
             return block;
         }
         function isSufficientlyCoveredByReturnStatements(statement) {
-            if (statement.kind === 242) {
+            if (statement.kind === 246) {
                 return true;
             }
-            else if (statement.kind === 234) {
+            else if (statement.kind === 238) {
                 var ifStatement = statement;
                 if (ifStatement.elseStatement) {
                     return isSufficientlyCoveredByReturnStatements(ifStatement.thenStatement) &&
                         isSufficientlyCoveredByReturnStatements(ifStatement.elseStatement);
                 }
             }
-            else if (statement.kind === 230) {
+            else if (statement.kind === 234) {
                 var lastStatement = ts.lastOrUndefined(statement.statements);
                 if (lastStatement && isSufficientlyCoveredByReturnStatements(lastStatement)) {
                     return true;
@@ -74781,9 +80533,9 @@ var ts;
             if (!shouldAddRestParameter(parameter, inConstructorWithSynthesizedSuper)) {
                 return false;
             }
-            var declarationName = parameter.name.kind === 78 ? ts.setParent(ts.setTextRange(factory.cloneNode(parameter.name), parameter.name), parameter.name.parent) : factory.createTempVariable(undefined);
+            var declarationName = parameter.name.kind === 79 ? ts.setParent(ts.setTextRange(factory.cloneNode(parameter.name), parameter.name), parameter.name.parent) : factory.createTempVariable(undefined);
             ts.setEmitFlags(declarationName, 48);
-            var expressionName = parameter.name.kind === 78 ? factory.cloneNode(parameter.name) : declarationName;
+            var expressionName = parameter.name.kind === 79 ? factory.cloneNode(parameter.name) : declarationName;
             var restIndex = node.parameters.length - 1;
             var temp = factory.createLoopVariable();
             prologueStatements.push(ts.setEmitFlags(ts.setTextRange(factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
@@ -74799,14 +80551,14 @@ var ts;
             ts.setEmitFlags(forStatement, 1048576);
             ts.startOnNewLine(forStatement);
             prologueStatements.push(forStatement);
-            if (parameter.name.kind !== 78) {
+            if (parameter.name.kind !== 79) {
                 prologueStatements.push(ts.setEmitFlags(ts.setTextRange(factory.createVariableStatement(undefined, factory.createVariableDeclarationList(ts.flattenDestructuringBinding(parameter, visitor, context, 0, expressionName))), parameter), 1048576));
             }
             ts.insertStatementsAfterCustomPrologue(statements, prologueStatements);
             return true;
         }
         function insertCaptureThisForNodeIfNeeded(statements, node) {
-            if (hierarchyFacts & 32768 && node.kind !== 209) {
+            if (hierarchyFacts & 65536 && node.kind !== 213) {
                 insertCaptureThisForNode(statements, node, factory.createThis());
                 return true;
             }
@@ -74822,22 +80574,22 @@ var ts;
             ts.insertStatementAfterCustomPrologue(statements, captureThisStatement);
         }
         function insertCaptureNewTargetIfNeeded(statements, node, copyOnWrite) {
-            if (hierarchyFacts & 16384) {
+            if (hierarchyFacts & 32768) {
                 var newTarget = void 0;
                 switch (node.kind) {
-                    case 209:
+                    case 213:
                         return statements;
-                    case 165:
-                    case 167:
                     case 168:
+                    case 171:
+                    case 172:
                         newTarget = factory.createVoidZero();
                         break;
-                    case 166:
+                    case 170:
                         newTarget = factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createThis(), 4), "constructor");
                         break;
-                    case 251:
-                    case 208:
-                        newTarget = factory.createConditionalExpression(factory.createLogicalAnd(ts.setEmitFlags(factory.createThis(), 4), factory.createBinaryExpression(ts.setEmitFlags(factory.createThis(), 4), 101, factory.getLocalName(node))), undefined, factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createThis(), 4), "constructor"), undefined, factory.createVoidZero());
+                    case 255:
+                    case 212:
+                        newTarget = factory.createConditionalExpression(factory.createLogicalAnd(ts.setEmitFlags(factory.createThis(), 4), factory.createBinaryExpression(ts.setEmitFlags(factory.createThis(), 4), 102, factory.getLocalName(node))), undefined, factory.createPropertyAccessExpression(ts.setEmitFlags(factory.createThis(), 4), "constructor"), undefined, factory.createVoidZero());
                         break;
                     default:
                         return ts.Debug.failBadSyntaxKind(node);
@@ -74857,20 +80609,21 @@ var ts;
             for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
                 var member = _a[_i];
                 switch (member.kind) {
-                    case 229:
+                    case 233:
                         statements.push(transformSemicolonClassElementToStatement(member));
                         break;
-                    case 165:
+                    case 168:
                         statements.push(transformClassMethodDeclarationToStatement(getClassMemberPrefix(node, member), member, node));
                         break;
-                    case 167:
-                    case 168:
+                    case 171:
+                    case 172:
                         var accessors = ts.getAllAccessorDeclarations(node.members, member);
                         if (member === accessors.firstAccessor) {
                             statements.push(transformAccessorsToStatement(getClassMemberPrefix(node, member), accessors, node));
                         }
                         break;
-                    case 166:
+                    case 170:
+                    case 169:
                         break;
                     default:
                         ts.Debug.failBadSyntaxKind(member, currentSourceFile && currentSourceFile.fileName);
@@ -74887,7 +80640,7 @@ var ts;
             var memberFunction = transformFunctionLikeToExpression(member, member, undefined, container);
             var propertyName = ts.visitNode(member.name, visitor, ts.isPropertyName);
             var e;
-            if (!ts.isPrivateIdentifier(propertyName) && context.getCompilerOptions().useDefineForClassFields) {
+            if (!ts.isPrivateIdentifier(propertyName) && ts.getUseDefineForClassFields(context.getCompilerOptions())) {
                 var name = ts.isComputedPropertyName(propertyName) ? propertyName.expression
                     : ts.isIdentifier(propertyName) ? factory.createStringLiteral(ts.unescapeLeadingUnderscores(propertyName.escapedText))
                         : propertyName;
@@ -74952,8 +80705,8 @@ var ts;
             return call;
         }
         function visitArrowFunction(node) {
-            if (node.transformFlags & 4096) {
-                hierarchyFacts |= 32768;
+            if (node.transformFlags & 8192 && !(hierarchyFacts & 16384)) {
+                hierarchyFacts |= 65536;
             }
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
@@ -74962,53 +80715,50 @@ var ts;
             ts.setTextRange(func, node);
             ts.setOriginalNode(func, node);
             ts.setEmitFlags(func, 8);
-            if (hierarchyFacts & 32768) {
-                enableSubstitutionsForCapturedThis();
-            }
             exitSubtree(ancestorFacts, 0, 0);
             convertedLoopState = savedConvertedLoopState;
             return func;
         }
         function visitFunctionExpression(node) {
             var ancestorFacts = ts.getEmitFlags(node) & 262144
-                ? enterSubtree(16278, 69)
-                : enterSubtree(16286, 65);
+                ? enterSubtree(32662, 69)
+                : enterSubtree(32670, 65);
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
             var parameters = ts.visitParameterList(node.parameters, visitor, context);
             var body = transformFunctionBody(node);
-            var name = hierarchyFacts & 16384
+            var name = hierarchyFacts & 32768
                 ? factory.getLocalName(node)
                 : node.name;
-            exitSubtree(ancestorFacts, 49152, 0);
+            exitSubtree(ancestorFacts, 98304, 0);
             convertedLoopState = savedConvertedLoopState;
             return factory.updateFunctionExpression(node, undefined, node.asteriskToken, name, undefined, parameters, undefined, body);
         }
         function visitFunctionDeclaration(node) {
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
-            var ancestorFacts = enterSubtree(16286, 65);
+            var ancestorFacts = enterSubtree(32670, 65);
             var parameters = ts.visitParameterList(node.parameters, visitor, context);
             var body = transformFunctionBody(node);
-            var name = hierarchyFacts & 16384
+            var name = hierarchyFacts & 32768
                 ? factory.getLocalName(node)
                 : node.name;
-            exitSubtree(ancestorFacts, 49152, 0);
+            exitSubtree(ancestorFacts, 98304, 0);
             convertedLoopState = savedConvertedLoopState;
             return factory.updateFunctionDeclaration(node, undefined, ts.visitNodes(node.modifiers, visitor, ts.isModifier), node.asteriskToken, name, undefined, parameters, undefined, body);
         }
         function transformFunctionLikeToExpression(node, location, name, container) {
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
-            var ancestorFacts = container && ts.isClassLike(container) && !ts.hasSyntacticModifier(node, 32)
-                ? enterSubtree(16286, 65 | 8)
-                : enterSubtree(16286, 65);
+            var ancestorFacts = container && ts.isClassLike(container) && !ts.isStatic(node)
+                ? enterSubtree(32670, 65 | 8)
+                : enterSubtree(32670, 65);
             var parameters = ts.visitParameterList(node.parameters, visitor, context);
             var body = transformFunctionBody(node);
-            if (hierarchyFacts & 16384 && !name && (node.kind === 251 || node.kind === 208)) {
+            if (hierarchyFacts & 32768 && !name && (node.kind === 255 || node.kind === 212)) {
                 name = factory.getGeneratedNameForNode(node);
             }
-            exitSubtree(ancestorFacts, 49152, 0);
+            exitSubtree(ancestorFacts, 98304, 0);
             convertedLoopState = savedConvertedLoopState;
             return ts.setOriginalNode(ts.setTextRange(factory.createFunctionExpression(undefined, node.asteriskToken, name, undefined, parameters, undefined, body), location), node);
         }
@@ -75038,7 +80788,7 @@ var ts;
                 }
             }
             else {
-                ts.Debug.assert(node.kind === 209);
+                ts.Debug.assert(node.kind === 213);
                 statementsLocation = ts.moveRangeEnd(body, -1);
                 var equalsGreaterThanToken = node.equalsGreaterThanToken;
                 if (!ts.nodeIsSynthesized(equalsGreaterThanToken) && !ts.nodeIsSynthesized(body)) {
@@ -75139,7 +80889,7 @@ var ts;
                             assignment = ts.flattenDestructuringAssignment(decl, visitor, context, 0);
                         }
                         else {
-                            assignment = factory.createBinaryExpression(decl.name, 62, ts.visitNode(decl.initializer, visitor, ts.isExpression));
+                            assignment = factory.createBinaryExpression(decl.name, 63, ts.visitNode(decl.initializer, visitor, ts.isExpression));
                             ts.setTextRange(assignment, decl);
                         }
                         assignments = ts.append(assignments, assignment);
@@ -75159,7 +80909,7 @@ var ts;
             return updated;
         }
         function visitVariableDeclarationList(node) {
-            if (node.flags & 3 || node.transformFlags & 131072) {
+            if (node.flags & 3 || node.transformFlags & 262144) {
                 if (node.flags & 3) {
                     enableSubstitutionsForBlockScopedBindings();
                 }
@@ -75170,7 +80920,7 @@ var ts;
                 ts.setOriginalNode(declarationList, node);
                 ts.setTextRange(declarationList, node);
                 ts.setCommentRange(declarationList, node);
-                if (node.transformFlags & 131072
+                if (node.transformFlags & 262144
                     && (ts.isBindingPattern(node.declarations[0].name) || ts.isBindingPattern(ts.last(node.declarations).name))) {
                     ts.setSourceMapRange(declarationList, getRangeUnion(declarations));
                 }
@@ -75180,8 +80930,8 @@ var ts;
         }
         function getRangeUnion(declarations) {
             var pos = -1, end = -1;
-            for (var _i = 0, declarations_10 = declarations; _i < declarations_10.length; _i++) {
-                var node = declarations_10[_i];
+            for (var _i = 0, declarations_9 = declarations; _i < declarations_9.length; _i++) {
+                var node = declarations_9[_i];
                 pos = pos === -1 ? node.pos : node.pos === -1 ? pos : Math.min(pos, node.pos);
                 end = Math.max(end, node.end);
             }
@@ -75242,14 +80992,14 @@ var ts;
         }
         function visitIterationStatement(node, outermostLabeledStatement) {
             switch (node.kind) {
-                case 235:
-                case 236:
+                case 239:
+                case 240:
                     return visitDoOrWhileStatement(node, outermostLabeledStatement);
-                case 237:
+                case 241:
                     return visitForStatement(node, outermostLabeledStatement);
-                case 238:
+                case 242:
                     return visitForInStatement(node, outermostLabeledStatement);
-                case 239:
+                case 243:
                     return visitForOfStatement(node, outermostLabeledStatement);
             }
         }
@@ -75372,9 +81122,9 @@ var ts;
             var numInitialProperties = -1, hasComputed = false;
             for (var i = 0; i < properties.length; i++) {
                 var property = properties[i];
-                if ((property.transformFlags & 262144 &&
+                if ((property.transformFlags & 524288 &&
                     hierarchyFacts & 4)
-                    || (hasComputed = ts.Debug.checkDefined(property.name).kind === 158)) {
+                    || (hasComputed = ts.Debug.checkDefined(property.name).kind === 161)) {
                     numInitialProperties = i;
                     break;
                 }
@@ -75418,7 +81168,7 @@ var ts;
             }
             visit(node.name);
             function visit(node) {
-                if (node.kind === 78) {
+                if (node.kind === 79) {
                     state.hoistedLocalVariables.push(node);
                 }
                 else {
@@ -75467,24 +81217,24 @@ var ts;
                     loop = convert(node, outermostLabeledStatement, bodyFunction.part, ancestorFacts);
                 }
                 else {
-                    var clone_3 = convertIterationStatementCore(node, initializerFunction, factory.createBlock(bodyFunction.part, true));
-                    loop = factory.restoreEnclosingLabel(clone_3, outermostLabeledStatement, convertedLoopState && resetLabel);
+                    var clone_4 = convertIterationStatementCore(node, initializerFunction, factory.createBlock(bodyFunction.part, true));
+                    loop = factory.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
                 }
             }
             else {
-                var clone_4 = convertIterationStatementCore(node, initializerFunction, ts.visitNode(node.statement, visitor, ts.isStatement, factory.liftToBlock));
-                loop = factory.restoreEnclosingLabel(clone_4, outermostLabeledStatement, convertedLoopState && resetLabel);
+                var clone_5 = convertIterationStatementCore(node, initializerFunction, ts.visitNode(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                loop = factory.restoreEnclosingLabel(clone_5, outermostLabeledStatement, convertedLoopState && resetLabel);
             }
             statements.push(loop);
             return statements;
         }
         function convertIterationStatementCore(node, initializerFunction, convertedLoopBody) {
             switch (node.kind) {
-                case 237: return convertForStatement(node, initializerFunction, convertedLoopBody);
-                case 238: return convertForInStatement(node, convertedLoopBody);
-                case 239: return convertForOfStatement(node, convertedLoopBody);
-                case 235: return convertDoStatement(node, convertedLoopBody);
-                case 236: return convertWhileStatement(node, convertedLoopBody);
+                case 241: return convertForStatement(node, initializerFunction, convertedLoopBody);
+                case 242: return convertForInStatement(node, convertedLoopBody);
+                case 243: return convertForOfStatement(node, convertedLoopBody);
+                case 239: return convertDoStatement(node, convertedLoopBody);
+                case 240: return convertWhileStatement(node, convertedLoopBody);
                 default: return ts.Debug.failBadSyntaxKind(node, "IterationStatement expected");
             }
         }
@@ -75508,11 +81258,11 @@ var ts;
         function createConvertedLoopState(node) {
             var loopInitializer;
             switch (node.kind) {
-                case 237:
-                case 238:
-                case 239:
+                case 241:
+                case 242:
+                case 243:
                     var initializer = node.initializer;
-                    if (initializer && initializer.kind === 250) {
+                    if (initializer && initializer.kind === 254) {
                         loopInitializer = initializer;
                     }
                     break;
@@ -75596,7 +81346,7 @@ var ts;
         }
         function createFunctionForInitializerOfForStatement(node, currentState) {
             var functionName = factory.createUniqueName("_loop_init");
-            var containsYield = (node.initializer.transformFlags & 262144) !== 0;
+            var containsYield = (node.initializer.transformFlags & 524288) !== 0;
             var emitFlags = 0;
             if (currentState.containsLexicalThis)
                 emitFlags |= 8;
@@ -75640,7 +81390,7 @@ var ts;
             var loopBody = factory.createBlock(statements, true);
             if (ts.isBlock(statement))
                 ts.setOriginalNode(loopBody, statement);
-            var containsYield = (node.statement.transformFlags & 262144) !== 0;
+            var containsYield = (node.statement.transformFlags & 524288) !== 0;
             var emitFlags = 524288;
             if (currentState.containsLexicalThis)
                 emitFlags |= 8;
@@ -75655,7 +81405,7 @@ var ts;
         function copyOutParameter(outParam, copyDirection) {
             var source = copyDirection === 0 ? outParam.outParamName : outParam.originalName;
             var target = copyDirection === 0 ? outParam.originalName : outParam.outParamName;
-            return factory.createBinaryExpression(target, 62, source);
+            return factory.createBinaryExpression(target, 63, source);
         }
         function copyOutParameters(outParams, partFlags, copyDirection, statements) {
             for (var _i = 0, outParams_1 = outParams; _i < outParams_1.length; _i++) {
@@ -75776,20 +81526,20 @@ var ts;
             for (var i = start; i < numProperties; i++) {
                 var property = properties[i];
                 switch (property.kind) {
-                    case 167:
-                    case 168:
+                    case 171:
+                    case 172:
                         var accessors = ts.getAllAccessorDeclarations(node.properties, property);
                         if (property === accessors.firstAccessor) {
                             expressions.push(transformAccessorsToExpression(receiver, accessors, node, !!node.multiLine));
                         }
                         break;
-                    case 165:
+                    case 168:
                         expressions.push(transformObjectLiteralMethodDeclarationToExpression(property, receiver, node, node.multiLine));
                         break;
-                    case 288:
+                    case 294:
                         expressions.push(transformPropertyAssignmentToExpression(property, receiver, node.multiLine));
                         break;
-                    case 289:
+                    case 295:
                         expressions.push(transformShorthandPropertyAssignmentToExpression(property, receiver, node.multiLine));
                         break;
                     default:
@@ -75844,7 +81594,7 @@ var ts;
         }
         function addStatementToStartOfBlock(block, statement) {
             var transformedStatements = ts.visitNodes(block.statements, visitor, ts.isStatement);
-            return factory.updateBlock(block, __spreadArray([statement], transformedStatements));
+            return factory.updateBlock(block, __spreadArray([statement], transformedStatements, true));
         }
         function visitMethodDeclaration(node) {
             ts.Debug.assert(!ts.isComputedPropertyName(node.name));
@@ -75856,17 +81606,17 @@ var ts;
             ts.Debug.assert(!ts.isComputedPropertyName(node.name));
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
-            var ancestorFacts = enterSubtree(16286, 65);
+            var ancestorFacts = enterSubtree(32670, 65);
             var updated;
             var parameters = ts.visitParameterList(node.parameters, visitor, context);
             var body = transformFunctionBody(node);
-            if (node.kind === 167) {
+            if (node.kind === 171) {
                 updated = factory.updateGetAccessorDeclaration(node, node.decorators, node.modifiers, node.name, parameters, node.type, body);
             }
             else {
                 updated = factory.updateSetAccessorDeclaration(node, node.decorators, node.modifiers, node.name, parameters, body);
             }
-            exitSubtree(ancestorFacts, 49152, 0);
+            exitSubtree(ancestorFacts, 98304, 0);
             convertedLoopState = savedConvertedLoopState;
             return updated;
         }
@@ -75881,7 +81631,7 @@ var ts;
         }
         function visitArrayLiteralExpression(node) {
             if (ts.some(node.elements, ts.isSpreadElement)) {
-                return transformAndSpreadElements(node.elements, true, !!node.multiLine, !!node.elements.hasTrailingComma);
+                return transformAndSpreadElements(node.elements, false, !!node.multiLine, !!node.elements.hasTrailingComma);
             }
             return ts.visitEachChild(node, visitor, context);
         }
@@ -75890,7 +81640,7 @@ var ts;
                 return visitTypeScriptClassWrapper(node);
             }
             var expression = ts.skipOuterExpressions(node.expression);
-            if (expression.kind === 105 ||
+            if (expression.kind === 106 ||
                 ts.isSuperProperty(expression) ||
                 ts.some(node.arguments, ts.isSpreadElement)) {
                 return visitCallExpressionWithPotentialCapturedThisAssignment(node, true);
@@ -75902,7 +81652,7 @@ var ts;
             var isVariableStatementWithInitializer = function (stmt) { return ts.isVariableStatement(stmt) && !!ts.first(stmt.declarationList.declarations).initializer; };
             var savedConvertedLoopState = convertedLoopState;
             convertedLoopState = undefined;
-            var bodyStatements = ts.visitNodes(body.statements, visitor, ts.isStatement);
+            var bodyStatements = ts.visitNodes(body.statements, classWrapperStatementVisitor, ts.isStatement);
             convertedLoopState = savedConvertedLoopState;
             var classStatements = ts.filter(bodyStatements, isVariableStatementWithInitializer);
             var remainingStatements = ts.filter(bodyStatements, function (stmt) { return !isVariableStatementWithInitializer(stmt); });
@@ -75910,6 +81660,9 @@ var ts;
             var variable = varStatement.declarationList.declarations[0];
             var initializer = ts.skipOuterExpressions(variable.initializer);
             var aliasAssignment = ts.tryCast(initializer, ts.isAssignmentExpression);
+            if (!aliasAssignment && ts.isBinaryExpression(initializer) && initializer.operatorToken.kind === 27) {
+                aliasAssignment = ts.tryCast(initializer.left, ts.isAssignmentExpression);
+            }
             var call = ts.cast(aliasAssignment ? ts.skipOuterExpressions(aliasAssignment.right) : initializer, ts.isCallExpression);
             var func = ts.cast(ts.skipOuterExpressions(call.expression), ts.isFunctionExpression);
             var funcStatements = func.body.statements;
@@ -75941,21 +81694,21 @@ var ts;
             return visitCallExpressionWithPotentialCapturedThisAssignment(node, false);
         }
         function visitCallExpressionWithPotentialCapturedThisAssignment(node, assignToCapturedThis) {
-            if (node.transformFlags & 8192 ||
-                node.expression.kind === 105 ||
+            if (node.transformFlags & 16384 ||
+                node.expression.kind === 106 ||
                 ts.isSuperProperty(ts.skipOuterExpressions(node.expression))) {
                 var _a = factory.createCallBinding(node.expression, hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
-                if (node.expression.kind === 105) {
+                if (node.expression.kind === 106) {
                     ts.setEmitFlags(thisArg, 4);
                 }
                 var resultingCall = void 0;
-                if (node.transformFlags & 8192) {
-                    resultingCall = factory.createFunctionApplyCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), node.expression.kind === 105 ? thisArg : ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, false, false, false));
+                if (node.transformFlags & 16384) {
+                    resultingCall = factory.createFunctionApplyCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), node.expression.kind === 106 ? thisArg : ts.visitNode(thisArg, visitor, ts.isExpression), transformAndSpreadElements(node.arguments, true, false, false));
                 }
                 else {
-                    resultingCall = ts.setTextRange(factory.createFunctionCallCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), node.expression.kind === 105 ? thisArg : ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression)), node);
+                    resultingCall = ts.setTextRange(factory.createFunctionCallCall(ts.visitNode(target, callExpressionVisitor, ts.isExpression), node.expression.kind === 106 ? thisArg : ts.visitNode(thisArg, visitor, ts.isExpression), ts.visitNodes(node.arguments, visitor, ts.isExpression)), node);
                 }
-                if (node.expression.kind === 105) {
+                if (node.expression.kind === 106) {
                     var initializer = factory.createLogicalOr(resultingCall, createActualThis());
                     resultingCall = assignToCapturedThis
                         ? factory.createAssignment(factory.createUniqueName("_this", 16 | 32), initializer)
@@ -75968,31 +81721,30 @@ var ts;
         function visitNewExpression(node) {
             if (ts.some(node.arguments, ts.isSpreadElement)) {
                 var _a = factory.createCallBinding(factory.createPropertyAccessExpression(node.expression, "bind"), hoistVariableDeclaration), target = _a.target, thisArg = _a.thisArg;
-                return factory.createNewExpression(factory.createFunctionApplyCall(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(factory.createNodeArray(__spreadArray([factory.createVoidZero()], node.arguments)), false, false, false)), undefined, []);
+                return factory.createNewExpression(factory.createFunctionApplyCall(ts.visitNode(target, visitor, ts.isExpression), thisArg, transformAndSpreadElements(factory.createNodeArray(__spreadArray([factory.createVoidZero()], node.arguments, true)), true, false, false)), undefined, []);
             }
             return ts.visitEachChild(node, visitor, context);
         }
-        function transformAndSpreadElements(elements, needsUniqueCopy, multiLine, hasTrailingComma) {
+        function transformAndSpreadElements(elements, isArgumentList, multiLine, hasTrailingComma) {
             var numElements = elements.length;
             var segments = ts.flatten(ts.spanMap(elements, partitionSpread, function (partition, visitPartition, _start, end) {
                 return visitPartition(partition, multiLine, hasTrailingComma && end === numElements);
             }));
             if (segments.length === 1) {
                 var firstSegment = segments[0];
-                if (!needsUniqueCopy && !compilerOptions.downlevelIteration
-                    || ts.isPackedArrayLiteral(firstSegment)
-                    || ts.isCallToHelper(firstSegment, "___spreadArray")) {
-                    return segments[0];
+                if (isArgumentList && !compilerOptions.downlevelIteration
+                    || ts.isPackedArrayLiteral(firstSegment.expression)
+                    || ts.isCallToHelper(firstSegment.expression, "___spreadArray")) {
+                    return firstSegment.expression;
                 }
             }
             var helpers = emitHelpers();
-            var startsWithSpread = ts.isSpreadElement(elements[0]);
+            var startsWithSpread = segments[0].kind !== 0;
             var expression = startsWithSpread ? factory.createArrayLiteralExpression() :
-                segments[0];
+                segments[0].expression;
             for (var i = startsWithSpread ? 0 : 1; i < segments.length; i++) {
-                expression = helpers.createSpreadArrayHelper(expression, compilerOptions.downlevelIteration && !ts.isPackedArrayLiteral(segments[i]) ?
-                    helpers.createReadHelper(segments[i], undefined) :
-                    segments[i]);
+                var segment = segments[i];
+                expression = helpers.createSpreadArrayHelper(expression, segment.expression, segment.kind === 1 && !isArgumentList);
             }
             return expression;
         }
@@ -76004,15 +81756,23 @@ var ts;
         function visitSpanOfSpreads(chunk) {
             return ts.map(chunk, visitExpressionOfSpread);
         }
+        function visitExpressionOfSpread(node) {
+            var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
+            var isCallToReadHelper = ts.isCallToHelper(expression, "___read");
+            var kind = isCallToReadHelper || ts.isPackedArrayLiteral(expression) ? 2 : 1;
+            if (compilerOptions.downlevelIteration && kind === 1 && !ts.isArrayLiteralExpression(expression) && !isCallToReadHelper) {
+                expression = emitHelpers().createReadHelper(expression, undefined);
+                kind = 2;
+            }
+            return createSpreadSegment(kind, expression);
+        }
         function visitSpanOfNonSpreads(chunk, multiLine, hasTrailingComma) {
-            return factory.createArrayLiteralExpression(ts.visitNodes(factory.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
+            var expression = factory.createArrayLiteralExpression(ts.visitNodes(factory.createNodeArray(chunk, hasTrailingComma), visitor, ts.isExpression), multiLine);
+            return createSpreadSegment(0, expression);
         }
         function visitSpreadElement(node) {
             return ts.visitNode(node.expression, visitor, ts.isExpression);
         }
-        function visitExpressionOfSpread(node) {
-            return ts.visitNode(node.expression, visitor, ts.isExpression);
-        }
         function visitTemplateLiteral(node) {
             return ts.setTextRange(factory.createStringLiteral(node.text), node);
         }
@@ -76032,33 +81792,16 @@ var ts;
             return ts.processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, ts.ProcessLevel.All);
         }
         function visitTemplateExpression(node) {
-            var expressions = [];
-            addTemplateHead(expressions, node);
-            addTemplateSpans(expressions, node);
-            var expression = ts.reduceLeft(expressions, factory.createAdd);
-            if (ts.nodeIsSynthesized(expression)) {
-                ts.setTextRange(expression, node);
-            }
-            return expression;
-        }
-        function shouldAddTemplateHead(node) {
-            ts.Debug.assert(node.templateSpans.length !== 0);
-            return node.head.text.length !== 0 || node.templateSpans[0].literal.text.length === 0;
-        }
-        function addTemplateHead(expressions, node) {
-            if (!shouldAddTemplateHead(node)) {
-                return;
-            }
-            expressions.push(factory.createStringLiteral(node.head.text));
-        }
-        function addTemplateSpans(expressions, node) {
+            var expression = factory.createStringLiteral(node.head.text);
             for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
                 var span = _a[_i];
-                expressions.push(ts.visitNode(span.expression, visitor, ts.isExpression));
-                if (span.literal.text.length !== 0) {
-                    expressions.push(factory.createStringLiteral(span.literal.text));
+                var args = [ts.visitNode(span.expression, visitor, ts.isExpression)];
+                if (span.literal.text.length > 0) {
+                    args.push(factory.createStringLiteral(span.literal.text));
                 }
+                expression = factory.createCallExpression(factory.createPropertyAccessExpression(expression, "concat"), undefined, args);
             }
+            return ts.setTextRange(expression, node);
         }
         function visitSuperKeyword(isExpressionOfCall) {
             return hierarchyFacts & 8
@@ -76067,15 +81810,15 @@ var ts;
                 : factory.createUniqueName("_super", 16 | 32);
         }
         function visitMetaProperty(node) {
-            if (node.keywordToken === 102 && node.name.escapedText === "target") {
-                hierarchyFacts |= 16384;
+            if (node.keywordToken === 103 && node.name.escapedText === "target") {
+                hierarchyFacts |= 32768;
                 return factory.createUniqueName("_newTarget", 16 | 32);
             }
             return node;
         }
         function onEmitNode(hint, node, emitCallback) {
             if (enabledSubstitutions & 1 && ts.isFunctionLike(node)) {
-                var ancestorFacts = enterSubtree(16286, ts.getEmitFlags(node) & 8
+                var ancestorFacts = enterSubtree(32670, ts.getEmitFlags(node) & 8
                     ? 65 | 16
                     : 65);
                 previousOnEmitNode(hint, node, emitCallback);
@@ -76087,20 +81830,20 @@ var ts;
         function enableSubstitutionsForBlockScopedBindings() {
             if ((enabledSubstitutions & 2) === 0) {
                 enabledSubstitutions |= 2;
-                context.enableSubstitution(78);
+                context.enableSubstitution(79);
             }
         }
         function enableSubstitutionsForCapturedThis() {
             if ((enabledSubstitutions & 1) === 0) {
                 enabledSubstitutions |= 1;
-                context.enableSubstitution(107);
-                context.enableEmitNotification(166);
-                context.enableEmitNotification(165);
-                context.enableEmitNotification(167);
+                context.enableSubstitution(108);
+                context.enableEmitNotification(170);
                 context.enableEmitNotification(168);
-                context.enableEmitNotification(209);
-                context.enableEmitNotification(208);
-                context.enableEmitNotification(251);
+                context.enableEmitNotification(171);
+                context.enableEmitNotification(172);
+                context.enableEmitNotification(213);
+                context.enableEmitNotification(212);
+                context.enableEmitNotification(255);
             }
         }
         function onSubstituteNode(hint, node) {
@@ -76124,10 +81867,10 @@ var ts;
         }
         function isNameOfDeclarationWithCollidingName(node) {
             switch (node.parent.kind) {
-                case 198:
-                case 252:
-                case 255:
-                case 249:
+                case 202:
+                case 256:
+                case 259:
+                case 253:
                     return node.parent.name === node
                         && resolver.isDeclarationWithCollidingName(node.parent);
             }
@@ -76135,9 +81878,9 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return substituteExpressionIdentifier(node);
-                case 107:
+                case 108:
                     return substituteThisKeyword(node);
             }
             return node;
@@ -76176,7 +81919,7 @@ var ts;
             return node;
         }
         function getClassMemberPrefix(node, member) {
-            return ts.hasSyntacticModifier(member, 32)
+            return ts.isStatic(member)
                 ? factory.getInternalName(node)
                 : factory.createPropertyAccessExpression(factory.getInternalName(node), "prototype");
         }
@@ -76188,19 +81931,19 @@ var ts;
                 return false;
             }
             var statement = ts.firstOrUndefined(constructor.body.statements);
-            if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 233) {
+            if (!statement || !ts.nodeIsSynthesized(statement) || statement.kind !== 237) {
                 return false;
             }
             var statementExpression = statement.expression;
-            if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 203) {
+            if (!ts.nodeIsSynthesized(statementExpression) || statementExpression.kind !== 207) {
                 return false;
             }
             var callTarget = statementExpression.expression;
-            if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 105) {
+            if (!ts.nodeIsSynthesized(callTarget) || callTarget.kind !== 106) {
                 return false;
             }
             var callArgument = ts.singleOrUndefined(statementExpression.arguments);
-            if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 220) {
+            if (!callArgument || !ts.nodeIsSynthesized(callArgument) || callArgument.kind !== 224) {
                 return false;
             }
             var expression = callArgument.expression;
@@ -76219,24 +81962,24 @@ var ts;
         if (compilerOptions.jsx === 1 || compilerOptions.jsx === 3) {
             previousOnEmitNode = context.onEmitNode;
             context.onEmitNode = onEmitNode;
-            context.enableEmitNotification(275);
-            context.enableEmitNotification(276);
-            context.enableEmitNotification(274);
+            context.enableEmitNotification(279);
+            context.enableEmitNotification(280);
+            context.enableEmitNotification(278);
             noSubstitution = [];
         }
         var previousOnSubstituteNode = context.onSubstituteNode;
         context.onSubstituteNode = onSubstituteNode;
-        context.enableSubstitution(201);
-        context.enableSubstitution(288);
+        context.enableSubstitution(205);
+        context.enableSubstitution(294);
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
             return node;
         }
         function onEmitNode(hint, node, emitCallback) {
             switch (node.kind) {
-                case 275:
-                case 276:
-                case 274:
+                case 279:
+                case 280:
+                case 278:
                     var tagName = node.tagName;
                     noSubstitution[ts.getOriginalNodeId(tagName)] = true;
                     break;
@@ -76275,7 +82018,7 @@ var ts;
         }
         function trySubstituteReservedName(name) {
             var token = name.originalKeywordKind || (ts.nodeIsSynthesized(name) ? ts.stringToToken(ts.idText(name)) : undefined);
-            if (token !== undefined && token >= 80 && token <= 115) {
+            if (token !== undefined && token >= 81 && token <= 116) {
                 return ts.setTextRange(factory.createStringLiteralFromNode(name), name);
             }
             return undefined;
@@ -76329,7 +82072,7 @@ var ts;
         var withBlockStack;
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
-            if (node.isDeclarationFile || (node.transformFlags & 512) === 0) {
+            if (node.isDeclarationFile || (node.transformFlags & 1024) === 0) {
                 return node;
             }
             var visited = ts.visitEachChild(node, visitor, context);
@@ -76347,7 +82090,7 @@ var ts;
             else if (ts.isFunctionLikeDeclaration(node) && node.asteriskToken) {
                 return visitGenerator(node);
             }
-            else if (transformFlags & 512) {
+            else if (transformFlags & 1024) {
                 return ts.visitEachChild(node, visitor, context);
             }
             else {
@@ -76356,13 +82099,13 @@ var ts;
         }
         function visitJavaScriptInStatementContainingYield(node) {
             switch (node.kind) {
-                case 235:
+                case 239:
                     return visitDoStatement(node);
-                case 236:
+                case 240:
                     return visitWhileStatement(node);
-                case 244:
+                case 248:
                     return visitSwitchStatement(node);
-                case 245:
+                case 249:
                     return visitLabeledStatement(node);
                 default:
                     return visitJavaScriptInGeneratorFunctionBody(node);
@@ -76370,30 +82113,30 @@ var ts;
         }
         function visitJavaScriptInGeneratorFunctionBody(node) {
             switch (node.kind) {
-                case 251:
+                case 255:
                     return visitFunctionDeclaration(node);
-                case 208:
+                case 212:
                     return visitFunctionExpression(node);
-                case 167:
-                case 168:
+                case 171:
+                case 172:
                     return visitAccessorDeclaration(node);
-                case 232:
+                case 236:
                     return visitVariableStatement(node);
-                case 237:
+                case 241:
                     return visitForStatement(node);
-                case 238:
+                case 242:
                     return visitForInStatement(node);
-                case 241:
+                case 245:
                     return visitBreakStatement(node);
-                case 240:
+                case 244:
                     return visitContinueStatement(node);
-                case 242:
+                case 246:
                     return visitReturnStatement(node);
                 default:
-                    if (node.transformFlags & 262144) {
+                    if (node.transformFlags & 524288) {
                         return visitJavaScriptContainingYield(node);
                     }
-                    else if (node.transformFlags & (512 | 1048576)) {
+                    else if (node.transformFlags & (1024 | 2097152)) {
                         return ts.visitEachChild(node, visitor, context);
                     }
                     else {
@@ -76403,23 +82146,23 @@ var ts;
         }
         function visitJavaScriptContainingYield(node) {
             switch (node.kind) {
-                case 216:
+                case 220:
                     return visitBinaryExpression(node);
-                case 337:
+                case 349:
                     return visitCommaListExpression(node);
-                case 217:
+                case 221:
                     return visitConditionalExpression(node);
-                case 219:
+                case 223:
                     return visitYieldExpression(node);
-                case 199:
+                case 203:
                     return visitArrayLiteralExpression(node);
-                case 200:
+                case 204:
                     return visitObjectLiteralExpression(node);
-                case 202:
+                case 206:
                     return visitElementAccessExpression(node);
-                case 203:
+                case 207:
                     return visitCallExpression(node);
-                case 204:
+                case 208:
                     return visitNewExpression(node);
                 default:
                     return ts.visitEachChild(node, visitor, context);
@@ -76427,9 +82170,9 @@ var ts;
         }
         function visitGenerator(node) {
             switch (node.kind) {
-                case 251:
+                case 255:
                     return visitFunctionDeclaration(node);
-                case 208:
+                case 212:
                     return visitFunctionExpression(node);
                 default:
                     return ts.Debug.failBadSyntaxKind(node);
@@ -76531,7 +82274,7 @@ var ts;
             return ts.setTextRange(factory.createBlock(statements, body.multiLine), body);
         }
         function visitVariableStatement(node) {
-            if (node.transformFlags & 262144) {
+            if (node.transformFlags & 524288) {
                 transformAndEmitVariableDeclarationList(node.declarationList);
                 return undefined;
             }
@@ -76566,10 +82309,10 @@ var ts;
             if (containsYield(right)) {
                 var target = void 0;
                 switch (left.kind) {
-                    case 201:
+                    case 205:
                         target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
                         break;
-                    case 202:
+                    case 206:
                         target = factory.updateElementAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
                         break;
                     default:
@@ -76688,13 +82431,13 @@ var ts;
                 temp = declareLocal();
                 var initialElements = ts.visitNodes(elements, visitor, ts.isExpression, 0, numInitialElements);
                 emitAssignment(temp, factory.createArrayLiteralExpression(leadingElement
-                    ? __spreadArray([leadingElement], initialElements) : initialElements));
+                    ? __spreadArray([leadingElement], initialElements, true) : initialElements));
                 leadingElement = undefined;
             }
             var expressions = ts.reduceLeft(elements, reduceElement, [], numInitialElements);
             return temp
                 ? factory.createArrayConcatCall(temp, [factory.createArrayLiteralExpression(expressions, multiLine)])
-                : ts.setTextRange(factory.createArrayLiteralExpression(leadingElement ? __spreadArray([leadingElement], expressions) : expressions, multiLine), location);
+                : ts.setTextRange(factory.createArrayLiteralExpression(leadingElement ? __spreadArray([leadingElement], expressions, true) : expressions, multiLine), location);
             function reduceElement(expressions, element) {
                 if (containsYield(element) && expressions.length > 0) {
                     var hasAssignedTemp = temp !== undefined;
@@ -76703,7 +82446,7 @@ var ts;
                     }
                     emitAssignment(temp, hasAssignedTemp
                         ? factory.createArrayConcatCall(temp, [factory.createArrayLiteralExpression(expressions, multiLine)])
-                        : factory.createArrayLiteralExpression(leadingElement ? __spreadArray([leadingElement], expressions) : expressions, multiLine));
+                        : factory.createArrayLiteralExpression(leadingElement ? __spreadArray([leadingElement], expressions, true) : expressions, multiLine));
                     leadingElement = undefined;
                     expressions = [];
                 }
@@ -76781,35 +82524,35 @@ var ts;
         }
         function transformAndEmitStatementWorker(node) {
             switch (node.kind) {
-                case 230:
+                case 234:
                     return transformAndEmitBlock(node);
-                case 233:
+                case 237:
                     return transformAndEmitExpressionStatement(node);
-                case 234:
+                case 238:
                     return transformAndEmitIfStatement(node);
-                case 235:
+                case 239:
                     return transformAndEmitDoStatement(node);
-                case 236:
+                case 240:
                     return transformAndEmitWhileStatement(node);
-                case 237:
+                case 241:
                     return transformAndEmitForStatement(node);
-                case 238:
+                case 242:
                     return transformAndEmitForInStatement(node);
-                case 240:
+                case 244:
                     return transformAndEmitContinueStatement(node);
-                case 241:
+                case 245:
                     return transformAndEmitBreakStatement(node);
-                case 242:
+                case 246:
                     return transformAndEmitReturnStatement(node);
-                case 243:
+                case 247:
                     return transformAndEmitWithStatement(node);
-                case 244:
+                case 248:
                     return transformAndEmitSwitchStatement(node);
-                case 245:
+                case 249:
                     return transformAndEmitLabeledStatement(node);
-                case 246:
+                case 250:
                     return transformAndEmitThrowStatement(node);
-                case 247:
+                case 251:
                     return transformAndEmitTryStatement(node);
                 default:
                     return emitStatement(ts.visitNode(node, visitor, ts.isStatement));
@@ -76972,7 +82715,7 @@ var ts;
                 var variables = ts.getInitializedVariables(initializer);
                 node = factory.updateForStatement(node, variables.length > 0
                     ? factory.inlineExpressions(ts.map(variables, transformInitializedVariable))
-                    : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitNode(node.statement, visitor, ts.isStatement, factory.liftToBlock));
+                    : undefined, ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, visitor, ts.isExpression), ts.visitIterationBody(node.statement, visitor, context));
             }
             else {
                 node = ts.visitEachChild(node, visitor, context);
@@ -77103,7 +82846,7 @@ var ts;
                 for (var i = 0; i < numClauses; i++) {
                     var clause = caseBlock.clauses[i];
                     clauseLabels.push(defineLabel());
-                    if (clause.kind === 285 && defaultClauseIndex === -1) {
+                    if (clause.kind === 289 && defaultClauseIndex === -1) {
                         defaultClauseIndex = i;
                     }
                 }
@@ -77113,7 +82856,7 @@ var ts;
                     var defaultClausesSkipped = 0;
                     for (var i = clausesWritten; i < numClauses; i++) {
                         var clause = caseBlock.clauses[i];
-                        if (clause.kind === 284) {
+                        if (clause.kind === 288) {
                             if (containsYield(clause.expression) && pendingClauses.length > 0) {
                                 break;
                             }
@@ -77204,7 +82947,7 @@ var ts;
             }
         }
         function containsYield(node) {
-            return !!node && (node.transformFlags & 262144) !== 0;
+            return !!node && (node.transformFlags & 524288) !== 0;
         }
         function countInitialNodesWithoutYield(nodes) {
             var numNodes = nodes.length;
@@ -77236,10 +82979,10 @@ var ts;
                     if (declaration) {
                         var name = renamedCatchVariableDeclarations[ts.getOriginalNodeId(declaration)];
                         if (name) {
-                            var clone_5 = ts.setParent(ts.setTextRange(factory.cloneNode(name), name), name.parent);
-                            ts.setSourceMapRange(clone_5, node);
-                            ts.setCommentRange(clone_5, node);
-                            return clone_5;
+                            var clone_6 = ts.setParent(ts.setTextRange(factory.cloneNode(name), name), name.parent);
+                            ts.setSourceMapRange(clone_6, node);
+                            ts.setCommentRange(clone_6, node);
+                            return clone_6;
                         }
                     }
                 }
@@ -77348,7 +83091,7 @@ var ts;
                 if (!renamedCatchVariables) {
                     renamedCatchVariables = new ts.Map();
                     renamedCatchVariableDeclarations = [];
-                    context.enableSubstitution(78);
+                    context.enableSubstitution(79);
                 }
                 renamedCatchVariables.set(text, true);
                 renamedCatchVariableDeclarations[ts.getOriginalNodeId(variable)] = name;
@@ -77918,23 +83661,23 @@ var ts;
         var previousOnEmitNode = context.onEmitNode;
         context.onSubstituteNode = onSubstituteNode;
         context.onEmitNode = onEmitNode;
-        context.enableSubstitution(78);
-        context.enableSubstitution(216);
-        context.enableSubstitution(214);
-        context.enableSubstitution(215);
-        context.enableSubstitution(289);
-        context.enableEmitNotification(297);
+        context.enableSubstitution(207);
+        context.enableSubstitution(209);
+        context.enableSubstitution(79);
+        context.enableSubstitution(220);
+        context.enableSubstitution(295);
+        context.enableEmitNotification(303);
         var moduleInfoMap = [];
         var deferredExports = [];
         var currentSourceFile;
         var currentModuleInfo;
-        var noSubstitution;
+        var noSubstitution = [];
         var needUMDDynamicImportHelper;
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
             if (node.isDeclarationFile ||
                 !(ts.isEffectiveExternalModule(node, compilerOptions) ||
-                    node.transformFlags & 2097152 ||
+                    node.transformFlags & 4194304 ||
                     (ts.isJsonSourceFile(node) && ts.hasJsonModuleEmitEnabled(compilerOptions) && ts.outFile(compilerOptions)))) {
                 return node;
             }
@@ -77958,7 +83701,7 @@ var ts;
             startLexicalEnvironment();
             var statements = [];
             var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
-            var statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict && !ts.isJsonSourceFile(node), sourceElementVisitor);
+            var statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict && !ts.isJsonSourceFile(node), topLevelVisitor);
             if (shouldEmitUnderscoreUnderscoreESModule()) {
                 ts.append(statements, createUnderscoreUnderscoreESModule());
             }
@@ -77968,8 +83711,8 @@ var ts;
                     ts.append(statements, factory.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames.slice(i, i + chunkSize), function (prev, nextId) { return factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.createIdentifier(ts.idText(nextId))), prev); }, factory.createVoidZero())));
                 }
             }
-            ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
-            ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+            ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, ts.isStatement));
+            ts.addRange(statements, ts.visitNodes(node.statements, topLevelVisitor, ts.isStatement, statementOffset));
             addExportEqualsIfNeeded(statements, false);
             ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
             var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray(statements), node.statements));
@@ -77982,18 +83725,18 @@ var ts;
             var jsonSourceFile = ts.isJsonSourceFile(node) && node;
             var _a = collectAsynchronousDependencies(node, true), aliasedModuleNames = _a.aliasedModuleNames, unaliasedModuleNames = _a.unaliasedModuleNames, importAliasNames = _a.importAliasNames;
             var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
-                factory.createExpressionStatement(factory.createCallExpression(define, undefined, __spreadArray(__spreadArray([], (moduleName ? [moduleName] : [])), [
+                factory.createExpressionStatement(factory.createCallExpression(define, undefined, __spreadArray(__spreadArray([], (moduleName ? [moduleName] : []), true), [
                     factory.createArrayLiteralExpression(jsonSourceFile ? ts.emptyArray : __spreadArray(__spreadArray([
                         factory.createStringLiteral("require"),
                         factory.createStringLiteral("exports")
-                    ], aliasedModuleNames), unaliasedModuleNames)),
+                    ], aliasedModuleNames, true), unaliasedModuleNames, true)),
                     jsonSourceFile ?
                         jsonSourceFile.statements.length ? jsonSourceFile.statements[0].expression : factory.createObjectLiteralExpression() :
                         factory.createFunctionExpression(undefined, undefined, undefined, undefined, __spreadArray([
                             factory.createParameterDeclaration(undefined, undefined, undefined, "require"),
                             factory.createParameterDeclaration(undefined, undefined, undefined, "exports")
-                        ], importAliasNames), undefined, transformAsynchronousModuleBody(node))
-                ])))
+                        ], importAliasNames, true), undefined, transformAsynchronousModuleBody(node))
+                ], false)))
             ]), node.statements));
             ts.addEmitHelpers(updated, context.readEmitHelpers());
             return updated;
@@ -78011,13 +83754,13 @@ var ts;
                     ]),
                     ts.setEmitFlags(factory.createIfStatement(factory.createStrictInequality(factory.createIdentifier("v"), factory.createIdentifier("undefined")), factory.createExpressionStatement(factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("module"), "exports"), factory.createIdentifier("v")))), 1)
                 ]), factory.createIfStatement(factory.createLogicalAnd(factory.createTypeCheck(factory.createIdentifier("define"), "function"), factory.createPropertyAccessExpression(factory.createIdentifier("define"), "amd")), factory.createBlock([
-                    factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("define"), undefined, __spreadArray(__spreadArray([], (moduleName ? [moduleName] : [])), [
+                    factory.createExpressionStatement(factory.createCallExpression(factory.createIdentifier("define"), undefined, __spreadArray(__spreadArray([], (moduleName ? [moduleName] : []), true), [
                         factory.createArrayLiteralExpression(__spreadArray(__spreadArray([
                             factory.createStringLiteral("require"),
                             factory.createStringLiteral("exports")
-                        ], aliasedModuleNames), unaliasedModuleNames)),
+                        ], aliasedModuleNames, true), unaliasedModuleNames, true)),
                         factory.createIdentifier("factory")
-                    ])))
+                    ], false)))
                 ])))
             ], true), undefined));
             var updated = factory.updateSourceFile(node, ts.setTextRange(factory.createNodeArray([
@@ -78025,7 +83768,7 @@ var ts;
                     factory.createFunctionExpression(undefined, undefined, undefined, undefined, __spreadArray([
                         factory.createParameterDeclaration(undefined, undefined, undefined, "require"),
                         factory.createParameterDeclaration(undefined, undefined, undefined, "exports")
-                    ], importAliasNames), undefined, transformAsynchronousModuleBody(node))
+                    ], importAliasNames, true), undefined, transformAsynchronousModuleBody(node))
                 ]))
             ]), node.statements));
             ts.addEmitHelpers(updated, context.readEmitHelpers());
@@ -78076,18 +83819,18 @@ var ts;
         function transformAsynchronousModuleBody(node) {
             startLexicalEnvironment();
             var statements = [];
-            var statementOffset = factory.copyPrologue(node.statements, statements, !compilerOptions.noImplicitUseStrict, sourceElementVisitor);
+            var statementOffset = factory.copyPrologue(node.statements, statements, !compilerOptions.noImplicitUseStrict, topLevelVisitor);
             if (shouldEmitUnderscoreUnderscoreESModule()) {
                 ts.append(statements, createUnderscoreUnderscoreESModule());
             }
             if (ts.length(currentModuleInfo.exportedNames)) {
                 ts.append(statements, factory.createExpressionStatement(ts.reduceLeft(currentModuleInfo.exportedNames, function (prev, nextId) { return factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.createIdentifier(ts.idText(nextId))), prev); }, factory.createVoidZero())));
             }
-            ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement));
+            ts.append(statements, ts.visitNode(currentModuleInfo.externalHelpersImportDeclaration, topLevelVisitor, ts.isStatement));
             if (moduleKind === ts.ModuleKind.AMD) {
                 ts.addRange(statements, ts.mapDefined(currentModuleInfo.externalImports, getAMDImportExpressionForImport));
             }
-            ts.addRange(statements, ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset));
+            ts.addRange(statements, ts.visitNodes(node.statements, topLevelVisitor, ts.isStatement, statementOffset));
             addExportEqualsIfNeeded(statements, true);
             ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
             var body = factory.createBlock(statements, true);
@@ -78098,7 +83841,7 @@ var ts;
         }
         function addExportEqualsIfNeeded(statements, emitAsReturn) {
             if (currentModuleInfo.exportEquals) {
-                var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, moduleExpressionElementVisitor);
+                var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor);
                 if (expressionResult) {
                     if (emitAsReturn) {
                         var statement = factory.createReturnStatement(expressionResult);
@@ -78115,67 +83858,88 @@ var ts;
                 }
             }
         }
-        function sourceElementVisitor(node) {
+        function topLevelVisitor(node) {
             switch (node.kind) {
-                case 261:
+                case 265:
                     return visitImportDeclaration(node);
-                case 260:
+                case 264:
                     return visitImportEqualsDeclaration(node);
-                case 267:
+                case 271:
                     return visitExportDeclaration(node);
-                case 266:
+                case 270:
                     return visitExportAssignment(node);
-                case 232:
+                case 236:
                     return visitVariableStatement(node);
-                case 251:
+                case 255:
                     return visitFunctionDeclaration(node);
-                case 252:
+                case 256:
                     return visitClassDeclaration(node);
-                case 338:
+                case 350:
                     return visitMergeDeclarationMarker(node);
-                case 339:
+                case 351:
                     return visitEndOfDeclarationMarker(node);
                 default:
-                    return ts.visitEachChild(node, moduleExpressionElementVisitor, context);
+                    return visitor(node);
             }
         }
-        function moduleExpressionElementVisitor(node) {
-            if (!(node.transformFlags & 2097152) && !(node.transformFlags & 1024)) {
+        function visitorWorker(node, valueIsDiscarded) {
+            if (!(node.transformFlags & (4194304 | 2048 | 67108864))) {
                 return node;
             }
-            if (ts.isImportCall(node)) {
-                return visitImportCallExpression(node);
-            }
-            else if (ts.isDestructuringAssignment(node)) {
-                return visitDestructuringAssignment(node);
-            }
-            else {
-                return ts.visitEachChild(node, moduleExpressionElementVisitor, context);
+            switch (node.kind) {
+                case 241:
+                    return visitForStatement(node);
+                case 237:
+                    return visitExpressionStatement(node);
+                case 211:
+                    return visitParenthesizedExpression(node, valueIsDiscarded);
+                case 348:
+                    return visitPartiallyEmittedExpression(node, valueIsDiscarded);
+                case 207:
+                    if (ts.isImportCall(node) && currentSourceFile.impliedNodeFormat === undefined) {
+                        return visitImportCallExpression(node);
+                    }
+                    break;
+                case 220:
+                    if (ts.isDestructuringAssignment(node)) {
+                        return visitDestructuringAssignment(node, valueIsDiscarded);
+                    }
+                    break;
+                case 218:
+                case 219:
+                    return visitPreOrPostfixUnaryExpression(node, valueIsDiscarded);
             }
+            return ts.visitEachChild(node, visitor, context);
+        }
+        function visitor(node) {
+            return visitorWorker(node, false);
+        }
+        function discardedValueVisitor(node) {
+            return visitorWorker(node, true);
         }
         function destructuringNeedsFlattening(node) {
             if (ts.isObjectLiteralExpression(node)) {
                 for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {
                     var elem = _a[_i];
                     switch (elem.kind) {
-                        case 288:
+                        case 294:
                             if (destructuringNeedsFlattening(elem.initializer)) {
                                 return true;
                             }
                             break;
-                        case 289:
+                        case 295:
                             if (destructuringNeedsFlattening(elem.name)) {
                                 return true;
                             }
                             break;
-                        case 290:
+                        case 296:
                             if (destructuringNeedsFlattening(elem.expression)) {
                                 return true;
                             }
                             break;
-                        case 165:
-                        case 167:
                         case 168:
+                        case 171:
+                        case 172:
                             return false;
                         default: ts.Debug.assertNever(elem, "Unhandled object member kind");
                     }
@@ -78199,17 +83963,68 @@ var ts;
             }
             return false;
         }
-        function visitDestructuringAssignment(node) {
+        function visitDestructuringAssignment(node, valueIsDiscarded) {
             if (destructuringNeedsFlattening(node.left)) {
-                return ts.flattenDestructuringAssignment(node, moduleExpressionElementVisitor, context, 0, false, createAllExportExpressions);
+                return ts.flattenDestructuringAssignment(node, visitor, context, 0, !valueIsDiscarded, createAllExportExpressions);
+            }
+            return ts.visitEachChild(node, visitor, context);
+        }
+        function visitForStatement(node) {
+            return factory.updateForStatement(node, ts.visitNode(node.initializer, discardedValueVisitor, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, discardedValueVisitor, ts.isExpression), ts.visitIterationBody(node.statement, visitor, context));
+        }
+        function visitExpressionStatement(node) {
+            return factory.updateExpressionStatement(node, ts.visitNode(node.expression, discardedValueVisitor, ts.isExpression));
+        }
+        function visitParenthesizedExpression(node, valueIsDiscarded) {
+            return factory.updateParenthesizedExpression(node, ts.visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, ts.isExpression));
+        }
+        function visitPartiallyEmittedExpression(node, valueIsDiscarded) {
+            return factory.updatePartiallyEmittedExpression(node, ts.visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, ts.isExpression));
+        }
+        function visitPreOrPostfixUnaryExpression(node, valueIsDiscarded) {
+            if ((node.operator === 45 || node.operator === 46)
+                && ts.isIdentifier(node.operand)
+                && !ts.isGeneratedIdentifier(node.operand)
+                && !ts.isLocalName(node.operand)
+                && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
+                var exportedNames = getExports(node.operand);
+                if (exportedNames) {
+                    var temp = void 0;
+                    var expression = ts.visitNode(node.operand, visitor, ts.isExpression);
+                    if (ts.isPrefixUnaryExpression(node)) {
+                        expression = factory.updatePrefixUnaryExpression(node, expression);
+                    }
+                    else {
+                        expression = factory.updatePostfixUnaryExpression(node, expression);
+                        if (!valueIsDiscarded) {
+                            temp = factory.createTempVariable(hoistVariableDeclaration);
+                            expression = factory.createAssignment(temp, expression);
+                            ts.setTextRange(expression, node);
+                        }
+                        expression = factory.createComma(expression, factory.cloneNode(node.operand));
+                        ts.setTextRange(expression, node);
+                    }
+                    for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
+                        var exportName = exportedNames_1[_i];
+                        noSubstitution[ts.getNodeId(expression)] = true;
+                        expression = createExportExpression(exportName, expression);
+                        ts.setTextRange(expression, node);
+                    }
+                    if (temp) {
+                        noSubstitution[ts.getNodeId(expression)] = true;
+                        expression = factory.createComma(expression, temp);
+                        ts.setTextRange(expression, node);
+                    }
+                    return expression;
+                }
             }
-            return ts.visitEachChild(node, moduleExpressionElementVisitor, context);
+            return ts.visitEachChild(node, visitor, context);
         }
         function visitImportCallExpression(node) {
             var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
-            var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), moduleExpressionElementVisitor);
+            var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
             var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
-            var containsLexicalThis = !!(node.transformFlags & 4096);
+            var containsLexicalThis = !!(node.transformFlags & 8192);
             switch (compilerOptions.module) {
                 case ts.ModuleKind.AMD:
                     return createImportCallExpressionAMD(argument, containsLexicalThis);
@@ -78252,7 +84067,7 @@ var ts;
                 }
             }
             var promise = factory.createNewExpression(factory.createIdentifier("Promise"), undefined, [func]);
-            if (compilerOptions.esModuleInterop) {
+            if (ts.getESModuleInterop(compilerOptions)) {
                 return factory.createCallExpression(factory.createPropertyAccessExpression(promise, factory.createIdentifier("then")), undefined, [emitHelpers().createImportStarCallbackHelper()]);
             }
             return promise;
@@ -78260,7 +84075,7 @@ var ts;
         function createImportCallExpressionCommonJS(arg, containsLexicalThis) {
             var promiseResolveCall = factory.createCallExpression(factory.createPropertyAccessExpression(factory.createIdentifier("Promise"), "resolve"), undefined, []);
             var requireCall = factory.createCallExpression(factory.createIdentifier("require"), undefined, arg ? [arg] : []);
-            if (compilerOptions.esModuleInterop) {
+            if (ts.getESModuleInterop(compilerOptions)) {
                 requireCall = emitHelpers().createImportStarHelper(requireCall);
             }
             var func;
@@ -78276,7 +84091,7 @@ var ts;
             return factory.createCallExpression(factory.createPropertyAccessExpression(promiseResolveCall, "then"), undefined, [func]);
         }
         function getHelperExpressionForExport(node, innerExpr) {
-            if (!compilerOptions.esModuleInterop || ts.getEmitFlags(node) & 67108864) {
+            if (!ts.getESModuleInterop(compilerOptions) || ts.getEmitFlags(node) & 67108864) {
                 return innerExpr;
             }
             if (ts.getExportNeedsImportStarHelper(node)) {
@@ -78285,7 +84100,7 @@ var ts;
             return innerExpr;
         }
         function getHelperExpressionForImport(node, innerExpr) {
-            if (!compilerOptions.esModuleInterop || ts.getEmitFlags(node) & 67108864) {
+            if (!ts.getESModuleInterop(compilerOptions) || ts.getEmitFlags(node) & 67108864) {
                 return innerExpr;
             }
             if (ts.getImportNeedsImportStarHelper(node)) {
@@ -78384,7 +84199,7 @@ var ts;
                         statements.push(ts.setOriginalNode(ts.setTextRange(factory.createExpressionStatement(emitHelpers().createCreateBindingHelper(generatedName, factory.createStringLiteralFromNode(specifier.propertyName || specifier.name), specifier.propertyName ? factory.createStringLiteralFromNode(specifier.name) : undefined)), specifier), specifier));
                     }
                     else {
-                        var exportNeedsImportDefault = !!compilerOptions.esModuleInterop &&
+                        var exportNeedsImportDefault = !!ts.getESModuleInterop(compilerOptions) &&
                             !(ts.getEmitFlags(node) & 67108864) &&
                             ts.idText(specifier.propertyName || specifier.name) === "default";
                         var exportedValue = factory.createPropertyAccessExpression(exportNeedsImportDefault ? emitHelpers().createImportDefaultHelper(generatedName) : generatedName, specifier.propertyName || specifier.name);
@@ -78413,20 +84228,20 @@ var ts;
             var original = node.original;
             if (original && hasAssociatedEndOfDeclarationMarker(original)) {
                 var id = ts.getOriginalNodeId(node);
-                deferredExports[id] = appendExportStatement(deferredExports[id], factory.createIdentifier("default"), ts.visitNode(node.expression, moduleExpressionElementVisitor), node, true);
+                deferredExports[id] = appendExportStatement(deferredExports[id], factory.createIdentifier("default"), ts.visitNode(node.expression, visitor), node, true);
             }
             else {
-                statements = appendExportStatement(statements, factory.createIdentifier("default"), ts.visitNode(node.expression, moduleExpressionElementVisitor), node, true);
+                statements = appendExportStatement(statements, factory.createIdentifier("default"), ts.visitNode(node.expression, visitor), node, true);
             }
             return ts.singleOrMany(statements);
         }
         function visitFunctionDeclaration(node) {
             var statements;
             if (ts.hasSyntacticModifier(node, 1)) {
-                statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, moduleExpressionElementVisitor), undefined, ts.visitEachChild(node.body, moduleExpressionElementVisitor, context)), node), node));
+                statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor), undefined, ts.visitEachChild(node.body, visitor, context)), node), node));
             }
             else {
-                statements = ts.append(statements, ts.visitEachChild(node, moduleExpressionElementVisitor, context));
+                statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
             }
             if (hasAssociatedEndOfDeclarationMarker(node)) {
                 var id = ts.getOriginalNodeId(node);
@@ -78440,10 +84255,10 @@ var ts;
         function visitClassDeclaration(node) {
             var statements;
             if (ts.hasSyntacticModifier(node, 1)) {
-                statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, moduleExpressionElementVisitor), ts.visitNodes(node.members, moduleExpressionElementVisitor)), node), node));
+                statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(undefined, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, visitor), ts.visitNodes(node.members, visitor)), node), node));
             }
             else {
-                statements = ts.append(statements, ts.visitEachChild(node, moduleExpressionElementVisitor, context));
+                statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
             }
             if (hasAssociatedEndOfDeclarationMarker(node)) {
                 var id = ts.getOriginalNodeId(node);
@@ -78472,7 +84287,7 @@ var ts;
                     else if (variable.initializer) {
                         if (!ts.isBindingPattern(variable.name) && (ts.isArrowFunction(variable.initializer) || ts.isFunctionExpression(variable.initializer) || ts.isClassExpression(variable.initializer))) {
                             var expression = factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), variable.name), variable.name), factory.createIdentifier(ts.getTextOfIdentifierOrLiteral(variable.name)));
-                            var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, moduleExpressionElementVisitor));
+                            var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor));
                             variables = ts.append(variables, updatedVariable);
                             expressions = ts.append(expressions, expression);
                             removeCommentsOnExpressions = true;
@@ -78494,7 +84309,7 @@ var ts;
                 }
             }
             else {
-                statements = ts.append(statements, ts.visitEachChild(node, moduleExpressionElementVisitor, context));
+                statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
             }
             if (hasAssociatedEndOfDeclarationMarker(node)) {
                 var id = ts.getOriginalNodeId(node);
@@ -78509,8 +84324,8 @@ var ts;
             var exportedNames = getExports(name);
             if (exportedNames) {
                 var expression = ts.isExportName(name) ? value : factory.createAssignment(name, value);
-                for (var _i = 0, exportedNames_1 = exportedNames; _i < exportedNames_1.length; _i++) {
-                    var exportName = exportedNames_1[_i];
+                for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
+                    var exportName = exportedNames_2[_i];
                     ts.setEmitFlags(expression, 4);
                     expression = createExportExpression(exportName, expression, location);
                 }
@@ -78520,14 +84335,14 @@ var ts;
         }
         function transformInitializedVariable(node) {
             if (ts.isBindingPattern(node.name)) {
-                return ts.flattenDestructuringAssignment(ts.visitNode(node, moduleExpressionElementVisitor), undefined, context, 0, false, createAllExportExpressions);
+                return ts.flattenDestructuringAssignment(ts.visitNode(node, visitor), undefined, context, 0, false, createAllExportExpressions);
             }
             else {
-                return factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), node.name), node.name), node.initializer ? ts.visitNode(node.initializer, moduleExpressionElementVisitor) : factory.createVoidZero());
+                return factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), node.name), node.name), node.initializer ? ts.visitNode(node.initializer, visitor) : factory.createVoidZero());
             }
         }
         function visitMergeDeclarationMarker(node) {
-            if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 232) {
+            if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 236) {
                 var id = ts.getOriginalNodeId(node);
                 deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original);
             }
@@ -78559,10 +84374,10 @@ var ts;
             var namedBindings = importClause.namedBindings;
             if (namedBindings) {
                 switch (namedBindings.kind) {
-                    case 263:
+                    case 267:
                         statements = appendExportsOfDeclaration(statements, namedBindings);
                         break;
-                    case 264:
+                    case 268:
                         for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
                             var importBinding = _a[_i];
                             statements = appendExportsOfDeclaration(statements, importBinding, true);
@@ -78670,21 +84485,19 @@ var ts;
         }
         function modifierVisitor(node) {
             switch (node.kind) {
-                case 92:
-                case 87:
+                case 93:
+                case 88:
                     return undefined;
             }
             return node;
         }
         function onEmitNode(hint, node, emitCallback) {
-            if (node.kind === 297) {
+            if (node.kind === 303) {
                 currentSourceFile = node;
                 currentModuleInfo = moduleInfoMap[ts.getOriginalNodeId(currentSourceFile)];
-                noSubstitution = [];
                 previousOnEmitNode(hint, node, emitCallback);
                 currentSourceFile = undefined;
                 currentModuleInfo = undefined;
-                noSubstitution = undefined;
             }
             else {
                 previousOnEmitNode(hint, node, emitCallback);
@@ -78717,13 +84530,34 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return substituteExpressionIdentifier(node);
-                case 216:
+                case 207:
+                    return substituteCallExpression(node);
+                case 209:
+                    return substituteTaggedTemplateExpression(node);
+                case 220:
                     return substituteBinaryExpression(node);
-                case 215:
-                case 214:
-                    return substituteUnaryExpression(node);
+            }
+            return node;
+        }
+        function substituteCallExpression(node) {
+            if (ts.isIdentifier(node.expression)) {
+                var expression = substituteExpressionIdentifier(node.expression);
+                noSubstitution[ts.getNodeId(expression)] = true;
+                if (!ts.isIdentifier(expression)) {
+                    return ts.addEmitFlags(factory.updateCallExpression(node, expression, undefined, node.arguments), 536870912);
+                }
+            }
+            return node;
+        }
+        function substituteTaggedTemplateExpression(node) {
+            if (ts.isIdentifier(node.tag)) {
+                var tag = substituteExpressionIdentifier(node.tag);
+                noSubstitution[ts.getNodeId(tag)] = true;
+                if (!ts.isIdentifier(tag)) {
+                    return ts.addEmitFlags(factory.updateTaggedTemplateExpression(node, tag, undefined, node.template), 536870912);
+                }
             }
             return node;
         }
@@ -78736,9 +84570,9 @@ var ts;
                 }
                 return node;
             }
-            if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64)) && !ts.isLocalName(node)) {
+            else if (!(ts.isGeneratedIdentifier(node) && !(node.autoGenerateFlags & 64)) && !ts.isLocalName(node)) {
                 var exportContainer = resolver.getReferencedExportContainer(node, ts.isExportName(node));
-                if (exportContainer && exportContainer.kind === 297) {
+                if (exportContainer && exportContainer.kind === 303) {
                     return ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.cloneNode(node)), node);
                 }
                 var importDeclaration = resolver.getReferencedImportDeclaration(node);
@@ -78763,31 +84597,10 @@ var ts;
                 var exportedNames = getExports(node.left);
                 if (exportedNames) {
                     var expression = node;
-                    for (var _i = 0, exportedNames_2 = exportedNames; _i < exportedNames_2.length; _i++) {
-                        var exportName = exportedNames_2[_i];
-                        noSubstitution[ts.getNodeId(expression)] = true;
-                        expression = createExportExpression(exportName, expression, node);
-                    }
-                    return expression;
-                }
-            }
-            return node;
-        }
-        function substituteUnaryExpression(node) {
-            if ((node.operator === 45 || node.operator === 46)
-                && ts.isIdentifier(node.operand)
-                && !ts.isGeneratedIdentifier(node.operand)
-                && !ts.isLocalName(node.operand)
-                && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
-                var exportedNames = getExports(node.operand);
-                if (exportedNames) {
-                    var expression = node.kind === 215
-                        ? ts.setTextRange(factory.createBinaryExpression(node.operand, factory.createToken(node.operator === 45 ? 63 : 64), factory.createNumericLiteral(1)), node)
-                        : node;
                     for (var _i = 0, exportedNames_3 = exportedNames; _i < exportedNames_3.length; _i++) {
                         var exportName = exportedNames_3[_i];
                         noSubstitution[ts.getNodeId(expression)] = true;
-                        expression = factory.createParenthesizedExpression(createExportExpression(exportName, expression));
+                        expression = createExportExpression(exportName, expression, node);
                     }
                     return expression;
                 }
@@ -78823,13 +84636,11 @@ var ts;
         var previousOnEmitNode = context.onEmitNode;
         context.onSubstituteNode = onSubstituteNode;
         context.onEmitNode = onEmitNode;
-        context.enableSubstitution(78);
-        context.enableSubstitution(289);
-        context.enableSubstitution(216);
-        context.enableSubstitution(214);
-        context.enableSubstitution(215);
-        context.enableSubstitution(226);
-        context.enableEmitNotification(297);
+        context.enableSubstitution(79);
+        context.enableSubstitution(295);
+        context.enableSubstitution(220);
+        context.enableSubstitution(230);
+        context.enableEmitNotification(303);
         var moduleInfoMap = [];
         var deferredExports = [];
         var exportFunctionsMap = [];
@@ -78844,7 +84655,7 @@ var ts;
         var noSubstitution;
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
-            if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 2097152)) {
+            if (node.isDeclarationFile || !(ts.isEffectiveExternalModule(node, compilerOptions) || node.transformFlags & 4194304)) {
                 return node;
             }
             var id = ts.getOriginalNodeId(node);
@@ -78909,16 +84720,16 @@ var ts;
             var statements = [];
             startLexicalEnvironment();
             var ensureUseStrict = ts.getStrictOptionValue(compilerOptions, "alwaysStrict") || (!compilerOptions.noImplicitUseStrict && ts.isExternalModule(currentSourceFile));
-            var statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict, sourceElementVisitor);
+            var statementOffset = factory.copyPrologue(node.statements, statements, ensureUseStrict, topLevelVisitor);
             statements.push(factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
                 factory.createVariableDeclaration("__moduleName", undefined, undefined, factory.createLogicalAnd(contextObject, factory.createPropertyAccessExpression(contextObject, "id")))
             ])));
-            ts.visitNode(moduleInfo.externalHelpersImportDeclaration, sourceElementVisitor, ts.isStatement);
-            var executeStatements = ts.visitNodes(node.statements, sourceElementVisitor, ts.isStatement, statementOffset);
+            ts.visitNode(moduleInfo.externalHelpersImportDeclaration, topLevelVisitor, ts.isStatement);
+            var executeStatements = ts.visitNodes(node.statements, topLevelVisitor, ts.isStatement, statementOffset);
             ts.addRange(statements, hoistedStatements);
             ts.insertStatementsAfterStandardPrologue(statements, endLexicalEnvironment());
             var exportStarFunction = addExportStarIfNeeded(statements);
-            var modifiers = node.transformFlags & 524288 ?
+            var modifiers = node.transformFlags & 1048576 ?
                 factory.createModifiersFromModifierFlags(256) :
                 undefined;
             var moduleObject = factory.createObjectLiteralExpression([
@@ -78936,7 +84747,7 @@ var ts;
                 var hasExportDeclarationWithExportClause = false;
                 for (var _i = 0, _a = moduleInfo.externalImports; _i < _a.length; _i++) {
                     var externalImport = _a[_i];
-                    if (externalImport.kind === 267 && externalImport.exportClause) {
+                    if (externalImport.kind === 271 && externalImport.exportClause) {
                         hasExportDeclarationWithExportClause = true;
                         break;
                     }
@@ -78997,15 +84808,15 @@ var ts;
                     var entry = _b[_a];
                     var importVariableName = ts.getLocalNameForExternalImport(factory, entry, currentSourceFile);
                     switch (entry.kind) {
-                        case 261:
+                        case 265:
                             if (!entry.importClause) {
                                 break;
                             }
-                        case 260:
+                        case 264:
                             ts.Debug.assert(importVariableName !== undefined);
                             statements.push(factory.createExpressionStatement(factory.createAssignment(importVariableName, parameterName)));
                             break;
-                        case 267:
+                        case 271:
                             ts.Debug.assert(importVariableName !== undefined);
                             if (entry.exportClause) {
                                 if (ts.isNamedExports(entry.exportClause)) {
@@ -79033,18 +84844,18 @@ var ts;
             }
             return factory.createArrayLiteralExpression(setters, true);
         }
-        function sourceElementVisitor(node) {
+        function topLevelVisitor(node) {
             switch (node.kind) {
-                case 261:
+                case 265:
                     return visitImportDeclaration(node);
-                case 260:
+                case 264:
                     return visitImportEqualsDeclaration(node);
-                case 267:
+                case 271:
                     return visitExportDeclaration(node);
-                case 266:
+                case 270:
                     return visitExportAssignment(node);
                 default:
-                    return nestedElementVisitor(node);
+                    return topLevelNestedVisitor(node);
             }
         }
         function visitImportDeclaration(node) {
@@ -79082,7 +84893,7 @@ var ts;
             if (node.isExportEquals) {
                 return undefined;
             }
-            var expression = ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression);
+            var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
             var original = node.original;
             if (original && hasAssociatedEndOfDeclarationMarker(original)) {
                 var id = ts.getOriginalNodeId(node);
@@ -79094,10 +84905,10 @@ var ts;
         }
         function visitFunctionDeclaration(node) {
             if (ts.hasSyntacticModifier(node, 1)) {
-                hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, destructuringAndImportCallVisitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, destructuringAndImportCallVisitor, ts.isBlock)));
+                hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, node.decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)));
             }
             else {
-                hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, destructuringAndImportCallVisitor, context));
+                hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, visitor, context));
             }
             if (hasAssociatedEndOfDeclarationMarker(node)) {
                 var id = ts.getOriginalNodeId(node);
@@ -79112,7 +84923,7 @@ var ts;
             var statements;
             var name = factory.getLocalName(node);
             hoistVariableDeclaration(name);
-            statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.decorators, destructuringAndImportCallVisitor, ts.isDecorator), undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, destructuringAndImportCallVisitor, ts.isHeritageClause), ts.visitNodes(node.members, destructuringAndImportCallVisitor, ts.isClassElement)), node))), node));
+            statements = ts.append(statements, ts.setTextRange(factory.createExpressionStatement(factory.createAssignment(name, ts.setTextRange(factory.createClassExpression(ts.visitNodes(node.decorators, visitor, ts.isDecorator), undefined, node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement)), node))), node));
             if (hasAssociatedEndOfDeclarationMarker(node)) {
                 var id = ts.getOriginalNodeId(node);
                 deferredExports[id] = appendExportsOfHoistedDeclaration(deferredExports[id], node);
@@ -79124,7 +84935,7 @@ var ts;
         }
         function visitVariableStatement(node) {
             if (!shouldHoistVariableDeclarationList(node.declarationList)) {
-                return ts.visitNode(node, destructuringAndImportCallVisitor, ts.isStatement);
+                return ts.visitNode(node, visitor, ts.isStatement);
             }
             var expressions;
             var isExportedDeclaration = ts.hasSyntacticModifier(node, 1);
@@ -79166,14 +84977,14 @@ var ts;
         }
         function shouldHoistVariableDeclarationList(node) {
             return (ts.getEmitFlags(node) & 2097152) === 0
-                && (enclosingBlockScopedContainer.kind === 297
+                && (enclosingBlockScopedContainer.kind === 303
                     || (ts.getOriginalNode(node).flags & 3) === 0);
         }
         function transformInitializedVariable(node, isExportedDeclaration) {
             var createAssignment = isExportedDeclaration ? createExportedVariableAssignment : createNonExportedVariableAssignment;
             return ts.isBindingPattern(node.name)
-                ? ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, false, createAssignment)
-                : node.initializer ? createAssignment(node.name, ts.visitNode(node.initializer, destructuringAndImportCallVisitor, ts.isExpression)) : node.name;
+                ? ts.flattenDestructuringAssignment(node, visitor, context, 0, false, createAssignment)
+                : node.initializer ? createAssignment(node.name, ts.visitNode(node.initializer, visitor, ts.isExpression)) : node.name;
         }
         function createExportedVariableAssignment(name, value, location) {
             return createVariableAssignment(name, value, location, true);
@@ -79188,7 +84999,7 @@ var ts;
                 : preventSubstitution(ts.setTextRange(factory.createAssignment(name, value), location));
         }
         function visitMergeDeclarationMarker(node) {
-            if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 232) {
+            if (hasAssociatedEndOfDeclarationMarker(node) && node.original.kind === 236) {
                 var id = ts.getOriginalNodeId(node);
                 var isExportedDeclaration = ts.hasSyntacticModifier(node.original, 1);
                 deferredExports[id] = appendExportsOfVariableStatement(deferredExports[id], node.original, isExportedDeclaration);
@@ -79227,10 +85038,10 @@ var ts;
             var namedBindings = importClause.namedBindings;
             if (namedBindings) {
                 switch (namedBindings.kind) {
-                    case 263:
+                    case 267:
                         statements = appendExportsOfDeclaration(statements, namedBindings);
                         break;
-                    case 264:
+                    case 268:
                         for (var _i = 0, _a = namedBindings.elements; _i < _a.length; _i++) {
                             var importBinding = _a[_i];
                             statements = appendExportsOfDeclaration(statements, importBinding);
@@ -79328,68 +85139,68 @@ var ts;
             ts.setEmitFlags(value, ts.getEmitFlags(value) | 1536);
             return ts.setCommentRange(factory.createCallExpression(exportFunction, undefined, [exportName, value]), value);
         }
-        function nestedElementVisitor(node) {
+        function topLevelNestedVisitor(node) {
             switch (node.kind) {
-                case 232:
+                case 236:
                     return visitVariableStatement(node);
-                case 251:
+                case 255:
                     return visitFunctionDeclaration(node);
-                case 252:
+                case 256:
                     return visitClassDeclaration(node);
-                case 237:
-                    return visitForStatement(node);
-                case 238:
+                case 241:
+                    return visitForStatement(node, true);
+                case 242:
                     return visitForInStatement(node);
-                case 239:
+                case 243:
                     return visitForOfStatement(node);
-                case 235:
+                case 239:
                     return visitDoStatement(node);
-                case 236:
+                case 240:
                     return visitWhileStatement(node);
-                case 245:
+                case 249:
                     return visitLabeledStatement(node);
-                case 243:
+                case 247:
                     return visitWithStatement(node);
-                case 244:
+                case 248:
                     return visitSwitchStatement(node);
-                case 258:
+                case 262:
                     return visitCaseBlock(node);
-                case 284:
+                case 288:
                     return visitCaseClause(node);
-                case 285:
+                case 289:
                     return visitDefaultClause(node);
-                case 247:
+                case 251:
                     return visitTryStatement(node);
-                case 287:
+                case 291:
                     return visitCatchClause(node);
-                case 230:
+                case 234:
                     return visitBlock(node);
-                case 338:
+                case 350:
                     return visitMergeDeclarationMarker(node);
-                case 339:
+                case 351:
                     return visitEndOfDeclarationMarker(node);
                 default:
-                    return destructuringAndImportCallVisitor(node);
+                    return visitor(node);
             }
         }
-        function visitForStatement(node) {
+        function visitForStatement(node, isTopLevel) {
             var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
             enclosingBlockScopedContainer = node;
-            node = factory.updateForStatement(node, node.initializer && visitForInitializer(node.initializer), ts.visitNode(node.condition, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.incrementor, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement));
+            node = factory.updateForStatement(node, ts.visitNode(node.initializer, isTopLevel ? visitForInitializer : discardedValueVisitor, ts.isForInitializer), ts.visitNode(node.condition, visitor, ts.isExpression), ts.visitNode(node.incrementor, discardedValueVisitor, ts.isExpression), ts.visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context));
             enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
             return node;
         }
         function visitForInStatement(node) {
             var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
             enclosingBlockScopedContainer = node;
-            node = factory.updateForInStatement(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, factory.liftToBlock));
+            node = factory.updateForInStatement(node, visitForInitializer(node.initializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, topLevelNestedVisitor, context));
             enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
             return node;
         }
         function visitForOfStatement(node) {
             var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
             enclosingBlockScopedContainer = node;
-            node = factory.updateForOfStatement(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, factory.liftToBlock));
+            node = factory.updateForOfStatement(node, node.awaitModifier, visitForInitializer(node.initializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, topLevelNestedVisitor, context));
             enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
             return node;
         }
@@ -79410,79 +85221,109 @@ var ts;
                 return expressions ? factory.inlineExpressions(expressions) : factory.createOmittedExpression();
             }
             else {
-                return ts.visitEachChild(node, nestedElementVisitor, context);
+                return ts.visitNode(node, discardedValueVisitor, ts.isExpression);
             }
         }
         function visitDoStatement(node) {
-            return factory.updateDoStatement(node, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, factory.liftToBlock), ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression));
+            return factory.updateDoStatement(node, ts.visitIterationBody(node.statement, topLevelNestedVisitor, context), ts.visitNode(node.expression, visitor, ts.isExpression));
         }
         function visitWhileStatement(node) {
-            return factory.updateWhileStatement(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, factory.liftToBlock));
+            return factory.updateWhileStatement(node, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, topLevelNestedVisitor, context));
         }
         function visitLabeledStatement(node) {
-            return factory.updateLabeledStatement(node, node.label, ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, factory.liftToBlock));
+            return factory.updateLabeledStatement(node, node.label, ts.visitNode(node.statement, topLevelNestedVisitor, ts.isStatement, factory.liftToBlock));
         }
         function visitWithStatement(node) {
-            return factory.updateWithStatement(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.statement, nestedElementVisitor, ts.isStatement, factory.liftToBlock));
+            return factory.updateWithStatement(node, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.statement, topLevelNestedVisitor, ts.isStatement, factory.liftToBlock));
         }
         function visitSwitchStatement(node) {
-            return factory.updateSwitchStatement(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNode(node.caseBlock, nestedElementVisitor, ts.isCaseBlock));
+            return factory.updateSwitchStatement(node, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNode(node.caseBlock, topLevelNestedVisitor, ts.isCaseBlock));
         }
         function visitCaseBlock(node) {
             var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
             enclosingBlockScopedContainer = node;
-            node = factory.updateCaseBlock(node, ts.visitNodes(node.clauses, nestedElementVisitor, ts.isCaseOrDefaultClause));
+            node = factory.updateCaseBlock(node, ts.visitNodes(node.clauses, topLevelNestedVisitor, ts.isCaseOrDefaultClause));
             enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
             return node;
         }
         function visitCaseClause(node) {
-            return factory.updateCaseClause(node, ts.visitNode(node.expression, destructuringAndImportCallVisitor, ts.isExpression), ts.visitNodes(node.statements, nestedElementVisitor, ts.isStatement));
+            return factory.updateCaseClause(node, ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitNodes(node.statements, topLevelNestedVisitor, ts.isStatement));
         }
         function visitDefaultClause(node) {
-            return ts.visitEachChild(node, nestedElementVisitor, context);
+            return ts.visitEachChild(node, topLevelNestedVisitor, context);
         }
         function visitTryStatement(node) {
-            return ts.visitEachChild(node, nestedElementVisitor, context);
+            return ts.visitEachChild(node, topLevelNestedVisitor, context);
         }
         function visitCatchClause(node) {
             var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
             enclosingBlockScopedContainer = node;
-            node = factory.updateCatchClause(node, node.variableDeclaration, ts.visitNode(node.block, nestedElementVisitor, ts.isBlock));
+            node = factory.updateCatchClause(node, node.variableDeclaration, ts.visitNode(node.block, topLevelNestedVisitor, ts.isBlock));
             enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
             return node;
         }
         function visitBlock(node) {
             var savedEnclosingBlockScopedContainer = enclosingBlockScopedContainer;
             enclosingBlockScopedContainer = node;
-            node = ts.visitEachChild(node, nestedElementVisitor, context);
+            node = ts.visitEachChild(node, topLevelNestedVisitor, context);
             enclosingBlockScopedContainer = savedEnclosingBlockScopedContainer;
             return node;
         }
-        function destructuringAndImportCallVisitor(node) {
-            if (ts.isDestructuringAssignment(node)) {
-                return visitDestructuringAssignment(node);
-            }
-            else if (ts.isImportCall(node)) {
-                return visitImportCallExpression(node);
-            }
-            else if ((node.transformFlags & 1024) || (node.transformFlags & 2097152)) {
-                return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
-            }
-            else {
+        function visitorWorker(node, valueIsDiscarded) {
+            if (!(node.transformFlags & (2048 | 4194304 | 67108864))) {
                 return node;
             }
+            switch (node.kind) {
+                case 241:
+                    return visitForStatement(node, false);
+                case 237:
+                    return visitExpressionStatement(node);
+                case 211:
+                    return visitParenthesizedExpression(node, valueIsDiscarded);
+                case 348:
+                    return visitPartiallyEmittedExpression(node, valueIsDiscarded);
+                case 220:
+                    if (ts.isDestructuringAssignment(node)) {
+                        return visitDestructuringAssignment(node, valueIsDiscarded);
+                    }
+                    break;
+                case 207:
+                    if (ts.isImportCall(node)) {
+                        return visitImportCallExpression(node);
+                    }
+                    break;
+                case 218:
+                case 219:
+                    return visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded);
+            }
+            return ts.visitEachChild(node, visitor, context);
+        }
+        function visitor(node) {
+            return visitorWorker(node, false);
+        }
+        function discardedValueVisitor(node) {
+            return visitorWorker(node, true);
+        }
+        function visitExpressionStatement(node) {
+            return factory.updateExpressionStatement(node, ts.visitNode(node.expression, discardedValueVisitor, ts.isExpression));
+        }
+        function visitParenthesizedExpression(node, valueIsDiscarded) {
+            return factory.updateParenthesizedExpression(node, ts.visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, ts.isExpression));
+        }
+        function visitPartiallyEmittedExpression(node, valueIsDiscarded) {
+            return factory.updatePartiallyEmittedExpression(node, ts.visitNode(node.expression, valueIsDiscarded ? discardedValueVisitor : visitor, ts.isExpression));
         }
         function visitImportCallExpression(node) {
             var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
-            var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), destructuringAndImportCallVisitor);
+            var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
             var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
             return factory.createCallExpression(factory.createPropertyAccessExpression(contextObject, factory.createIdentifier("import")), undefined, argument ? [argument] : []);
         }
-        function visitDestructuringAssignment(node) {
+        function visitDestructuringAssignment(node, valueIsDiscarded) {
             if (hasExportedReferenceInDestructuringTarget(node.left)) {
-                return ts.flattenDestructuringAssignment(node, destructuringAndImportCallVisitor, context, 0, true);
+                return ts.flattenDestructuringAssignment(node, visitor, context, 0, !valueIsDiscarded);
             }
-            return ts.visitEachChild(node, destructuringAndImportCallVisitor, context);
+            return ts.visitEachChild(node, visitor, context);
         }
         function hasExportedReferenceInDestructuringTarget(node) {
             if (ts.isAssignmentExpression(node, true)) {
@@ -79505,22 +85346,58 @@ var ts;
             }
             else if (ts.isIdentifier(node)) {
                 var container = resolver.getReferencedExportContainer(node);
-                return container !== undefined && container.kind === 297;
+                return container !== undefined && container.kind === 303;
             }
             else {
                 return false;
             }
         }
+        function visitPrefixOrPostfixUnaryExpression(node, valueIsDiscarded) {
+            if ((node.operator === 45 || node.operator === 46)
+                && ts.isIdentifier(node.operand)
+                && !ts.isGeneratedIdentifier(node.operand)
+                && !ts.isLocalName(node.operand)
+                && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
+                var exportedNames = getExports(node.operand);
+                if (exportedNames) {
+                    var temp = void 0;
+                    var expression = ts.visitNode(node.operand, visitor, ts.isExpression);
+                    if (ts.isPrefixUnaryExpression(node)) {
+                        expression = factory.updatePrefixUnaryExpression(node, expression);
+                    }
+                    else {
+                        expression = factory.updatePostfixUnaryExpression(node, expression);
+                        if (!valueIsDiscarded) {
+                            temp = factory.createTempVariable(hoistVariableDeclaration);
+                            expression = factory.createAssignment(temp, expression);
+                            ts.setTextRange(expression, node);
+                        }
+                        expression = factory.createComma(expression, factory.cloneNode(node.operand));
+                        ts.setTextRange(expression, node);
+                    }
+                    for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
+                        var exportName = exportedNames_4[_i];
+                        expression = createExportExpression(exportName, preventSubstitution(expression));
+                    }
+                    if (temp) {
+                        expression = factory.createComma(expression, temp);
+                        ts.setTextRange(expression, node);
+                    }
+                    return expression;
+                }
+            }
+            return ts.visitEachChild(node, visitor, context);
+        }
         function modifierVisitor(node) {
             switch (node.kind) {
-                case 92:
-                case 87:
+                case 93:
+                case 88:
                     return undefined;
             }
             return node;
         }
         function onEmitNode(hint, node, emitCallback) {
-            if (node.kind === 297) {
+            if (node.kind === 303) {
                 var id = ts.getOriginalNodeId(node);
                 currentSourceFile = node;
                 moduleInfo = moduleInfoMap[id];
@@ -79556,7 +85433,7 @@ var ts;
         }
         function substituteUnspecified(node) {
             switch (node.kind) {
-                case 289:
+                case 295:
                     return substituteShorthandPropertyAssignment(node);
             }
             return node;
@@ -79579,14 +85456,11 @@ var ts;
         }
         function substituteExpression(node) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return substituteExpressionIdentifier(node);
-                case 216:
+                case 220:
                     return substituteBinaryExpression(node);
-                case 214:
-                case 215:
-                    return substituteUnaryExpression(node);
-                case 226:
+                case 230:
                     return substituteMetaProperty(node);
             }
             return node;
@@ -79622,35 +85496,10 @@ var ts;
                 var exportedNames = getExports(node.left);
                 if (exportedNames) {
                     var expression = node;
-                    for (var _i = 0, exportedNames_4 = exportedNames; _i < exportedNames_4.length; _i++) {
-                        var exportName = exportedNames_4[_i];
-                        expression = createExportExpression(exportName, preventSubstitution(expression));
-                    }
-                    return expression;
-                }
-            }
-            return node;
-        }
-        function substituteUnaryExpression(node) {
-            if ((node.operator === 45 || node.operator === 46)
-                && ts.isIdentifier(node.operand)
-                && !ts.isGeneratedIdentifier(node.operand)
-                && !ts.isLocalName(node.operand)
-                && !ts.isDeclarationNameOfEnumOrNamespace(node.operand)) {
-                var exportedNames = getExports(node.operand);
-                if (exportedNames) {
-                    var expression = node.kind === 215
-                        ? ts.setTextRange(factory.createPrefixUnaryExpression(node.operator, node.operand), node)
-                        : node;
                     for (var _i = 0, exportedNames_5 = exportedNames; _i < exportedNames_5.length; _i++) {
                         var exportName = exportedNames_5[_i];
                         expression = createExportExpression(exportName, preventSubstitution(expression));
                     }
-                    if (node.kind === 215) {
-                        expression = node.operator === 45
-                            ? factory.createSubtract(preventSubstitution(expression), factory.createNumericLiteral(1))
-                            : factory.createAdd(preventSubstitution(expression), factory.createNumericLiteral(1));
-                    }
                     return expression;
                 }
             }
@@ -79669,7 +85518,7 @@ var ts;
                     || resolver.getReferencedValueDeclaration(name);
                 if (valueDeclaration) {
                     var exportContainer = resolver.getReferencedExportContainer(name, false);
-                    if (exportContainer && exportContainer.kind === 297) {
+                    if (exportContainer && exportContainer.kind === 303) {
                         exportedNames = ts.append(exportedNames, factory.getDeclarationName(valueDeclaration));
                     }
                     exportedNames = ts.addRange(exportedNames, moduleInfo && moduleInfo.exportedBindings[ts.getOriginalNodeId(valueDeclaration)]);
@@ -79693,25 +85542,36 @@ var ts;
 (function (ts) {
     function transformECMAScriptModule(context) {
         var factory = context.factory, emitHelpers = context.getEmitHelperFactory;
+        var host = context.getEmitHost();
+        var resolver = context.getEmitResolver();
         var compilerOptions = context.getCompilerOptions();
+        var languageVersion = ts.getEmitScriptTarget(compilerOptions);
         var previousOnEmitNode = context.onEmitNode;
         var previousOnSubstituteNode = context.onSubstituteNode;
         context.onEmitNode = onEmitNode;
         context.onSubstituteNode = onSubstituteNode;
-        context.enableEmitNotification(297);
-        context.enableSubstitution(78);
+        context.enableEmitNotification(303);
+        context.enableSubstitution(79);
         var helperNameSubstitutions;
+        var currentSourceFile;
+        var importRequireStatements;
         return ts.chainBundle(context, transformSourceFile);
         function transformSourceFile(node) {
             if (node.isDeclarationFile) {
                 return node;
             }
             if (ts.isExternalModule(node) || compilerOptions.isolatedModules) {
+                currentSourceFile = node;
+                importRequireStatements = undefined;
                 var result = updateExternalModule(node);
+                currentSourceFile = undefined;
+                if (importRequireStatements) {
+                    result = factory.updateSourceFile(result, ts.setTextRange(factory.createNodeArray(ts.insertStatementsAfterCustomPrologue(result.statements.slice(), importRequireStatements)), result.statements));
+                }
                 if (!ts.isExternalModule(node) || ts.some(result.statements, ts.isExternalModuleIndicator)) {
                     return result;
                 }
-                return factory.updateSourceFile(result, ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray([], result.statements), [ts.createEmptyExports(factory)])), result.statements));
+                return factory.updateSourceFile(result, ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray([], result.statements, true), [ts.createEmptyExports(factory)], false)), result.statements));
             }
             return node;
         }
@@ -79730,16 +85590,54 @@ var ts;
         }
         function visitor(node) {
             switch (node.kind) {
-                case 260:
-                    return undefined;
-                case 266:
+                case 264:
+                    return ts.getEmitScriptTarget(compilerOptions) >= ts.ModuleKind.ES2020 ? visitImportEqualsDeclaration(node) : undefined;
+                case 270:
                     return visitExportAssignment(node);
-                case 267:
+                case 271:
                     var exportDecl = node;
                     return visitExportDeclaration(exportDecl);
             }
             return node;
         }
+        function createRequireCall(importNode) {
+            var moduleName = ts.getExternalModuleNameLiteral(factory, importNode, ts.Debug.checkDefined(currentSourceFile), host, resolver, compilerOptions);
+            var args = [];
+            if (moduleName) {
+                args.push(moduleName);
+            }
+            if (!importRequireStatements) {
+                var createRequireName = factory.createUniqueName("_createRequire", 16 | 32);
+                var importStatement = factory.createImportDeclaration(undefined, undefined, factory.createImportClause(false, undefined, factory.createNamedImports([
+                    factory.createImportSpecifier(false, factory.createIdentifier("createRequire"), createRequireName)
+                ])), factory.createStringLiteral("module"));
+                var requireHelperName = factory.createUniqueName("__require", 16 | 32);
+                var requireStatement = factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
+                    factory.createVariableDeclaration(requireHelperName, undefined, undefined, factory.createCallExpression(factory.cloneNode(createRequireName), undefined, [
+                        factory.createPropertyAccessExpression(factory.createMetaProperty(100, factory.createIdentifier("meta")), factory.createIdentifier("url"))
+                    ]))
+                ], languageVersion >= 2 ? 2 : 0));
+                importRequireStatements = [importStatement, requireStatement];
+            }
+            var name = importRequireStatements[1].declarationList.declarations[0].name;
+            ts.Debug.assertNode(name, ts.isIdentifier);
+            return factory.createCallExpression(factory.cloneNode(name), undefined, args);
+        }
+        function visitImportEqualsDeclaration(node) {
+            ts.Debug.assert(ts.isExternalModuleImportEqualsDeclaration(node), "import= for internal module references should be handled in an earlier transformer.");
+            var statements;
+            statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createVariableStatement(undefined, factory.createVariableDeclarationList([
+                factory.createVariableDeclaration(factory.cloneNode(node.name), undefined, undefined, createRequireCall(node))
+            ], languageVersion >= 2 ? 2 : 0)), node), node));
+            statements = appendExportsOfImportEqualsDeclaration(statements, node);
+            return ts.singleOrMany(statements);
+        }
+        function appendExportsOfImportEqualsDeclaration(statements, node) {
+            if (ts.hasSyntacticModifier(node, 1)) {
+                statements = ts.append(statements, factory.createExportDeclaration(undefined, undefined, node.isTypeOnly, factory.createNamedExports([factory.createExportSpecifier(false, undefined, ts.idText(node.name))])));
+            }
+            return statements;
+        }
         function visitExportAssignment(node) {
             return node.isExportEquals ? undefined : node;
         }
@@ -79752,9 +85650,9 @@ var ts;
             }
             var oldIdentifier = node.exportClause.name;
             var synthName = factory.getGeneratedNameForNode(oldIdentifier);
-            var importDecl = factory.createImportDeclaration(undefined, undefined, factory.createImportClause(false, undefined, factory.createNamespaceImport(synthName)), node.moduleSpecifier);
+            var importDecl = factory.createImportDeclaration(undefined, undefined, factory.createImportClause(false, undefined, factory.createNamespaceImport(synthName)), node.moduleSpecifier, node.assertClause);
             ts.setOriginalNode(importDecl, node.exportClause);
-            var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(undefined, undefined, false, factory.createNamedExports([factory.createExportSpecifier(synthName, oldIdentifier)]));
+            var exportDecl = ts.isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration(undefined, undefined, false, factory.createNamedExports([factory.createExportSpecifier(false, synthName, oldIdentifier)]));
             ts.setOriginalNode(exportDecl, node);
             return [importDecl, exportDecl];
         }
@@ -79789,6 +85687,74 @@ var ts;
     ts.transformECMAScriptModule = transformECMAScriptModule;
 })(ts || (ts = {}));
 var ts;
+(function (ts) {
+    function transformNodeModule(context) {
+        var previousOnSubstituteNode = context.onSubstituteNode;
+        var previousOnEmitNode = context.onEmitNode;
+        var esmTransform = ts.transformECMAScriptModule(context);
+        var esmOnSubstituteNode = context.onSubstituteNode;
+        var esmOnEmitNode = context.onEmitNode;
+        context.onSubstituteNode = previousOnSubstituteNode;
+        context.onEmitNode = previousOnEmitNode;
+        var cjsTransform = ts.transformModule(context);
+        var cjsOnSubstituteNode = context.onSubstituteNode;
+        var cjsOnEmitNode = context.onEmitNode;
+        context.onSubstituteNode = onSubstituteNode;
+        context.onEmitNode = onEmitNode;
+        context.enableSubstitution(303);
+        context.enableEmitNotification(303);
+        var currentSourceFile;
+        return transformSourceFileOrBundle;
+        function onSubstituteNode(hint, node) {
+            if (ts.isSourceFile(node)) {
+                currentSourceFile = node;
+                return previousOnSubstituteNode(hint, node);
+            }
+            else {
+                if (!currentSourceFile) {
+                    return previousOnSubstituteNode(hint, node);
+                }
+                if (currentSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
+                    return esmOnSubstituteNode(hint, node);
+                }
+                return cjsOnSubstituteNode(hint, node);
+            }
+        }
+        function onEmitNode(hint, node, emitCallback) {
+            if (ts.isSourceFile(node)) {
+                currentSourceFile = node;
+            }
+            if (!currentSourceFile) {
+                return previousOnEmitNode(hint, node, emitCallback);
+            }
+            if (currentSourceFile.impliedNodeFormat === ts.ModuleKind.ESNext) {
+                return esmOnEmitNode(hint, node, emitCallback);
+            }
+            return cjsOnEmitNode(hint, node, emitCallback);
+        }
+        function getModuleTransformForFile(file) {
+            return file.impliedNodeFormat === ts.ModuleKind.ESNext ? esmTransform : cjsTransform;
+        }
+        function transformSourceFile(node) {
+            if (node.isDeclarationFile) {
+                return node;
+            }
+            currentSourceFile = node;
+            var result = getModuleTransformForFile(node)(node);
+            currentSourceFile = undefined;
+            ts.Debug.assert(ts.isSourceFile(result));
+            return result;
+        }
+        function transformSourceFileOrBundle(node) {
+            return node.kind === 303 ? transformSourceFile(node) : transformBundle(node);
+        }
+        function transformBundle(node) {
+            return context.factory.createBundle(ts.map(node.sourceFiles, transformSourceFile), node.prepends);
+        }
+    }
+    ts.transformNodeModule = transformNodeModule;
+})(ts || (ts = {}));
+var ts;
 (function (ts) {
     function canProduceDiagnostics(node) {
         return ts.isVariableDeclaration(node) ||
@@ -79832,14 +85798,14 @@ var ts;
             } : undefined;
         }
         function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult) {
-            if (ts.hasSyntacticModifier(node, 32)) {
+            if (ts.isStatic(node)) {
                 return symbolAccessibilityResult.errorModuleName ?
                     symbolAccessibilityResult.accessibility === 2 ?
                         ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                         ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
                     ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
             }
-            else if (node.parent.kind === 252) {
+            else if (node.parent.kind === 256) {
                 return symbolAccessibilityResult.errorModuleName ?
                     symbolAccessibilityResult.accessibility === 2 ?
                         ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -79861,14 +85827,14 @@ var ts;
             } : undefined;
         }
         function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult) {
-            if (ts.hasSyntacticModifier(node, 32)) {
+            if (ts.isStatic(node)) {
                 return symbolAccessibilityResult.errorModuleName ?
                     symbolAccessibilityResult.accessibility === 2 ?
                         ts.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                         ts.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
                     ts.Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1;
             }
-            else if (node.parent.kind === 252) {
+            else if (node.parent.kind === 256) {
                 return symbolAccessibilityResult.errorModuleName ?
                     symbolAccessibilityResult.accessibility === 2 ?
                         ts.Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -79912,26 +85878,26 @@ var ts;
             return getTypeAliasDeclarationVisibilityError;
         }
         else {
-            return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: " + ts.SyntaxKind[node.kind]);
+            return ts.Debug.assertNever(node, "Attempted to set a declaration diagnostic context for unhandled node kind: ".concat(ts.SyntaxKind[node.kind]));
         }
         function getVariableDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
-            if (node.kind === 249 || node.kind === 198) {
+            if (node.kind === 253 || node.kind === 202) {
                 return symbolAccessibilityResult.errorModuleName ?
                     symbolAccessibilityResult.accessibility === 2 ?
                         ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                         ts.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2 :
                     ts.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1;
             }
-            else if (node.kind === 163 || node.kind === 201 || node.kind === 162 ||
-                (node.kind === 160 && ts.hasSyntacticModifier(node.parent, 8))) {
-                if (ts.hasSyntacticModifier(node, 32)) {
+            else if (node.kind === 166 || node.kind === 205 || node.kind === 165 ||
+                (node.kind === 163 && ts.hasSyntacticModifier(node.parent, 8))) {
+                if (ts.isStatic(node)) {
                     return symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                             ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
                 }
-                else if (node.parent.kind === 252 || node.kind === 160) {
+                else if (node.parent.kind === 256 || node.kind === 163) {
                     return symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -79955,8 +85921,8 @@ var ts;
         }
         function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult) {
             var diagnosticMessage;
-            if (node.kind === 168) {
-                if (ts.hasSyntacticModifier(node, 32)) {
+            if (node.kind === 172) {
+                if (ts.isStatic(node)) {
                     diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_type_of_public_static_setter_0_from_exported_class_has_or_is_using_private_name_1;
@@ -79968,7 +85934,7 @@ var ts;
                 }
             }
             else {
-                if (ts.hasSyntacticModifier(node, 32)) {
+                if (ts.isStatic(node)) {
                     diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Return_type_of_public_static_getter_0_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -79992,31 +85958,31 @@ var ts;
         function getReturnTypeVisibilityError(symbolAccessibilityResult) {
             var diagnosticMessage;
             switch (node.kind) {
-                case 170:
+                case 174:
                     diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                         ts.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;
                     break;
-                case 169:
+                case 173:
                     diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                         ts.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;
                     break;
-                case 171:
+                case 175:
                     diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1 :
                         ts.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;
                     break;
-                case 165:
-                case 164:
-                    if (ts.hasSyntacticModifier(node, 32)) {
+                case 168:
+                case 167:
+                    if (ts.isStatic(node)) {
                         diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                             symbolAccessibilityResult.accessibility === 2 ?
                                 ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
                                 ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1 :
                             ts.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0;
                     }
-                    else if (node.parent.kind === 252) {
+                    else if (node.parent.kind === 256) {
                         diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                             symbolAccessibilityResult.accessibility === 2 ?
                                 ts.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -80029,7 +85995,7 @@ var ts;
                             ts.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;
                     }
                     break;
-                case 251:
+                case 255:
                     diagnosticMessage = symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named :
@@ -80054,35 +86020,35 @@ var ts;
         }
         function getParameterDeclarationTypeVisibilityDiagnosticMessage(symbolAccessibilityResult) {
             switch (node.parent.kind) {
-                case 166:
+                case 170:
                     return symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                             ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;
-                case 170:
-                case 175:
+                case 174:
+                case 179:
                     return symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
-                case 169:
+                case 173:
                     return symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
-                case 171:
+                case 175:
                     return symbolAccessibilityResult.errorModuleName ?
                         ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_0_of_index_signature_from_exported_interface_has_or_is_using_private_name_1;
-                case 165:
-                case 164:
-                    if (ts.hasSyntacticModifier(node.parent, 32)) {
+                case 168:
+                case 167:
+                    if (ts.isStatic(node.parent)) {
                         return symbolAccessibilityResult.errorModuleName ?
                             symbolAccessibilityResult.accessibility === 2 ?
                                 ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                                 ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2 :
                             ts.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
                     }
-                    else if (node.parent.parent.kind === 252) {
+                    else if (node.parent.parent.kind === 256) {
                         return symbolAccessibilityResult.errorModuleName ?
                             symbolAccessibilityResult.accessibility === 2 ?
                                 ts.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
@@ -80094,60 +86060,60 @@ var ts;
                             ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2 :
                             ts.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
                     }
-                case 251:
-                case 174:
+                case 255:
+                case 178:
                     return symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                             ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;
-                case 168:
-                case 167:
+                case 172:
+                case 171:
                     return symbolAccessibilityResult.errorModuleName ?
                         symbolAccessibilityResult.accessibility === 2 ?
                             ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
                             ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_name_1_from_private_module_2 :
                         ts.Diagnostics.Parameter_0_of_accessor_has_or_is_using_private_name_1;
                 default:
-                    return ts.Debug.fail("Unknown parent for parameter: " + ts.SyntaxKind[node.parent.kind]);
+                    return ts.Debug.fail("Unknown parent for parameter: ".concat(ts.SyntaxKind[node.parent.kind]));
             }
         }
         function getTypeParameterConstraintVisibilityError() {
             var diagnosticMessage;
             switch (node.parent.kind) {
-                case 252:
+                case 256:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;
                     break;
-                case 253:
+                case 257:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;
                     break;
-                case 190:
+                case 194:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_mapped_object_type_is_using_private_name_1;
                     break;
-                case 175:
-                case 170:
+                case 179:
+                case 174:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;
                     break;
-                case 169:
+                case 173:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;
                     break;
-                case 165:
-                case 164:
-                    if (ts.hasSyntacticModifier(node.parent, 32)) {
+                case 168:
+                case 167:
+                    if (ts.isStatic(node.parent)) {
                         diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1;
                     }
-                    else if (node.parent.parent.kind === 252) {
+                    else if (node.parent.parent.kind === 256) {
                         diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1;
                     }
                     else {
                         diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;
                     }
                     break;
-                case 174:
-                case 251:
+                case 178:
+                case 255:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;
                     break;
-                case 254:
+                case 258:
                     diagnosticMessage = ts.Diagnostics.Type_parameter_0_of_exported_type_alias_has_or_is_using_private_name_1;
                     break;
                 default:
@@ -80162,7 +86128,7 @@ var ts;
         function getHeritageClauseVisibilityError() {
             var diagnosticMessage;
             if (ts.isClassDeclaration(node.parent.parent)) {
-                diagnosticMessage = ts.isHeritageClause(node.parent) && node.parent.token === 116 ?
+                diagnosticMessage = ts.isHeritageClause(node.parent) && node.parent.token === 117 ?
                     ts.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 :
                     node.parent.parent.name ? ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 :
                         ts.Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0;
@@ -80209,7 +86175,7 @@ var ts;
     }
     function isInternalDeclaration(node, currentSourceFile) {
         var parseTreeNode = ts.getParseTreeNode(node);
-        if (parseTreeNode && parseTreeNode.kind === 160) {
+        if (parseTreeNode && parseTreeNode.kind === 163) {
             var paramIdx = parseTreeNode.parent.parameters.indexOf(parseTreeNode);
             var previousSibling = paramIdx > 0 ? parseTreeNode.parent.parameters[paramIdx - 1] : undefined;
             var text = currentSourceFile.text;
@@ -80258,7 +86224,8 @@ var ts;
             moduleResolverHost: host,
             trackReferencedAmbientModule: trackReferencedAmbientModule,
             trackExternalModuleSymbolOfImportTypeNode: trackExternalModuleSymbolOfImportTypeNode,
-            reportNonlocalAugmentation: reportNonlocalAugmentation
+            reportNonlocalAugmentation: reportNonlocalAugmentation,
+            reportNonSerializableProperty: reportNonSerializableProperty
         };
         var errorNameNode;
         var errorFallbackNode;
@@ -80311,8 +86278,10 @@ var ts;
                     else {
                         context.addDiagnostic(ts.createDiagnosticForNode(symbolAccessibilityResult.errorNode || errorInfo.errorNode, errorInfo.diagnosticMessage, symbolAccessibilityResult.errorSymbolName, symbolAccessibilityResult.errorModuleName));
                     }
+                    return true;
                 }
             }
+            return false;
         }
         function trackExternalModuleSymbolOfImportTypeNode(symbol) {
             if (!isBundledEmit) {
@@ -80321,33 +86290,40 @@ var ts;
         }
         function trackSymbol(symbol, enclosingDeclaration, meaning) {
             if (symbol.flags & 262144)
-                return;
-            handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
+                return false;
+            var issuedDiagnostic = handleSymbolAccessibilityError(resolver.isSymbolAccessible(symbol, enclosingDeclaration, meaning, true));
             recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
+            return issuedDiagnostic;
         }
         function reportPrivateInBaseOfClassExpression(propertyName) {
             if (errorNameNode || errorFallbackNode) {
                 context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName));
             }
         }
+        function errorDeclarationNameWithFallback() {
+            return errorNameNode ? ts.declarationNameToString(errorNameNode) :
+                errorFallbackNode && ts.getNameOfDeclaration(errorFallbackNode) ? ts.declarationNameToString(ts.getNameOfDeclaration(errorFallbackNode)) :
+                    errorFallbackNode && ts.isExportAssignment(errorFallbackNode) ? errorFallbackNode.isExportEquals ? "export=" : "default" :
+                        "(Missing)";
+        }
         function reportInaccessibleUniqueSymbolError() {
-            if (errorNameNode) {
-                context.addDiagnostic(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, ts.declarationNameToString(errorNameNode), "unique symbol"));
+            if (errorNameNode || errorFallbackNode) {
+                context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "unique symbol"));
             }
         }
         function reportCyclicStructureError() {
-            if (errorNameNode) {
-                context.addDiagnostic(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, ts.declarationNameToString(errorNameNode)));
+            if (errorNameNode || errorFallbackNode) {
+                context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_inferred_type_of_0_references_a_type_with_a_cyclic_structure_which_cannot_be_trivially_serialized_A_type_annotation_is_necessary, errorDeclarationNameWithFallback()));
             }
         }
         function reportInaccessibleThisError() {
-            if (errorNameNode) {
-                context.addDiagnostic(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, ts.declarationNameToString(errorNameNode), "this"));
+            if (errorNameNode || errorFallbackNode) {
+                context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), "this"));
             }
         }
         function reportLikelyUnsafeImportRequiredError(specifier) {
-            if (errorNameNode) {
-                context.addDiagnostic(ts.createDiagnosticForNode(errorNameNode, ts.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, ts.declarationNameToString(errorNameNode), specifier));
+            if (errorNameNode || errorFallbackNode) {
+                context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_inferred_type_of_0_cannot_be_named_without_a_reference_to_1_This_is_likely_not_portable_A_type_annotation_is_necessary, errorDeclarationNameWithFallback(), specifier));
             }
         }
         function reportTruncationError() {
@@ -80356,11 +86332,19 @@ var ts;
             }
         }
         function reportNonlocalAugmentation(containingFile, parentSymbol, symbol) {
-            var primaryDeclaration = ts.find(parentSymbol.declarations, function (d) { return ts.getSourceFileOfNode(d) === containingFile; });
+            var _a;
+            var primaryDeclaration = (_a = parentSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return ts.getSourceFileOfNode(d) === containingFile; });
             var augmentingDeclarations = ts.filter(symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== containingFile; });
-            for (var _i = 0, augmentingDeclarations_1 = augmentingDeclarations; _i < augmentingDeclarations_1.length; _i++) {
-                var augmentations = augmentingDeclarations_1[_i];
-                context.addDiagnostic(ts.addRelatedInfo(ts.createDiagnosticForNode(augmentations, ts.Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), ts.createDiagnosticForNode(primaryDeclaration, ts.Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)));
+            if (augmentingDeclarations) {
+                for (var _i = 0, augmentingDeclarations_1 = augmentingDeclarations; _i < augmentingDeclarations_1.length; _i++) {
+                    var augmentations = augmentingDeclarations_1[_i];
+                    context.addDiagnostic(ts.addRelatedInfo(ts.createDiagnosticForNode(augmentations, ts.Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), ts.createDiagnosticForNode(primaryDeclaration, ts.Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)));
+                }
+            }
+        }
+        function reportNonSerializableProperty(propertyName) {
+            if (errorNameNode || errorFallbackNode) {
+                context.addDiagnostic(ts.createDiagnosticForNode((errorNameNode || errorFallbackNode), ts.Diagnostics.The_type_of_this_node_cannot_be_serialized_because_its_property_0_cannot_be_serialized, propertyName));
             }
         }
         function transformDeclarationsForJS(sourceFile, bundled) {
@@ -80376,10 +86360,10 @@ var ts;
             return result;
         }
         function transformRoot(node) {
-            if (node.kind === 297 && node.isDeclarationFile) {
+            if (node.kind === 303 && node.isDeclarationFile) {
                 return node;
             }
-            if (node.kind === 298) {
+            if (node.kind === 304) {
                 isBundledEmit = true;
                 refs = new ts.Map();
                 libs = new ts.Map();
@@ -80402,14 +86386,14 @@ var ts;
                         resultHasExternalModuleIndicator = false;
                         needsDeclare = false;
                         var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
-                        var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([], [factory.createModifier(133)], factory.createStringLiteral(ts.getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory.createModuleBlock(ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)))], true, [], [], false, []);
+                        var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([], [factory.createModifier(135)], factory.createStringLiteral(ts.getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory.createModuleBlock(ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)))], true, [], [], false, []);
                         return newFile;
                     }
                     needsDeclare = true;
                     var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
                     return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), true, [], [], false, []);
                 }), ts.mapDefined(node.prepends, function (prepend) {
-                    if (prepend.kind === 300) {
+                    if (prepend.kind === 306) {
                         var sourceFile = ts.createUnparsedSourceFile(prepend, "dts", stripInternal);
                         hasNoDefaultLib_1 = hasNoDefaultLib_1 || !!sourceFile.hasNoDefaultLib;
                         collectReferences(sourceFile, refs);
@@ -80457,7 +86441,7 @@ var ts;
                 refs.forEach(referenceVisitor);
                 emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
                 if (ts.isExternalModule(node) && (!resultHasExternalModuleIndicator || (needsScopeFixMarker && !resultHasScopeMarker))) {
-                    combinedStatements = ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray([], combinedStatements), [ts.createEmptyExports(factory)])), combinedStatements);
+                    combinedStatements = ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray([], combinedStatements, true), [ts.createEmptyExports(factory)], false)), combinedStatements);
                 }
             }
             var updated = factory.updateSourceFile(node, combinedStatements, true, references, getFileReferencesForUsedTypeReferences(), node.hasNoDefaultLib, getLibReferences());
@@ -80499,7 +86483,7 @@ var ts;
                         declFileName = paths.declarationFilePath || paths.jsFilePath || file.fileName;
                     }
                     if (declFileName) {
-                        var specifier = ts.moduleSpecifiers.getModuleSpecifier(__assign(__assign({}, options), { baseUrl: options.baseUrl && ts.toPath(options.baseUrl, host.getCurrentDirectory(), host.getCanonicalFileName) }), currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host, undefined);
+                        var specifier = ts.moduleSpecifiers.getModuleSpecifier(options, currentSourceFile, ts.toPath(outputFilePath, host.getCurrentDirectory(), host.getCanonicalFileName), ts.toPath(declFileName, host.getCurrentDirectory(), host.getCanonicalFileName), host);
                         if (!ts.pathIsRelative(specifier)) {
                             recordTypeReferenceDirectivesIfNecessary([specifier]);
                             return;
@@ -80537,11 +86521,11 @@ var ts;
             return ret;
         }
         function filterBindingPatternInitializers(name) {
-            if (name.kind === 78) {
+            if (name.kind === 79) {
                 return name;
             }
             else {
-                if (name.kind === 197) {
+                if (name.kind === 201) {
                     return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
                 }
                 else {
@@ -80549,7 +86533,7 @@ var ts;
                 }
             }
             function visitBindingElement(elem) {
-                if (elem.kind === 222) {
+                if (elem.kind === 226) {
                     return elem;
                 }
                 return factory.updateBindingElement(elem, elem.dotDotDotToken, elem.propertyName, filterBindingPatternInitializers(elem.name), shouldPrintWithInitializer(elem) ? elem.initializer : undefined);
@@ -80583,17 +86567,17 @@ var ts;
             if (shouldPrintWithInitializer(node)) {
                 return;
             }
-            var shouldUseResolverType = node.kind === 160 &&
+            var shouldUseResolverType = node.kind === 163 &&
                 (resolver.isRequiredInitializedParameter(node) ||
                     resolver.isOptionalUninitializedParameterProperty(node));
             if (type && !shouldUseResolverType) {
                 return ts.visitNode(type, visitDeclarationSubtree);
             }
             if (!ts.getParseTreeNode(node)) {
-                return type ? ts.visitNode(type, visitDeclarationSubtree) : factory.createKeywordTypeNode(128);
+                return type ? ts.visitNode(type, visitDeclarationSubtree) : factory.createKeywordTypeNode(130);
             }
-            if (node.kind === 168) {
-                return factory.createKeywordTypeNode(128);
+            if (node.kind === 172) {
+                return factory.createKeywordTypeNode(130);
             }
             errorNameNode = node.name;
             var oldDiag;
@@ -80601,12 +86585,12 @@ var ts;
                 oldDiag = getSymbolAccessibilityDiagnostic;
                 getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(node);
             }
-            if (node.kind === 249 || node.kind === 198) {
+            if (node.kind === 253 || node.kind === 202) {
                 return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker));
             }
-            if (node.kind === 160
-                || node.kind === 163
-                || node.kind === 162) {
+            if (node.kind === 163
+                || node.kind === 166
+                || node.kind === 165) {
                 if (!node.initializer)
                     return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType));
                 return cleanup(resolver.createTypeOfDeclaration(node, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker, shouldUseResolverType) || resolver.createTypeOfExpression(node.initializer, enclosingDeclaration, declarationEmitNodeBuilderFlags, symbolTracker));
@@ -80617,29 +86601,39 @@ var ts;
                 if (!suppressNewDiagnosticContexts) {
                     getSymbolAccessibilityDiagnostic = oldDiag;
                 }
-                return returnValue || factory.createKeywordTypeNode(128);
+                return returnValue || factory.createKeywordTypeNode(130);
             }
         }
         function isDeclarationAndNotVisible(node) {
             node = ts.getParseTreeNode(node);
             switch (node.kind) {
-                case 251:
-                case 256:
-                case 253:
-                case 252:
-                case 254:
                 case 255:
+                case 260:
+                case 257:
+                case 256:
+                case 258:
+                case 259:
                     return !resolver.isDeclarationVisible(node);
-                case 249:
+                case 253:
                     return !getBindingNameVisible(node);
-                case 260:
-                case 261:
-                case 267:
-                case 266:
+                case 264:
+                case 265:
+                case 271:
+                case 270:
                     return false;
+                case 169:
+                    return true;
             }
             return false;
         }
+        function shouldEmitFunctionProperties(input) {
+            var _a;
+            if (input.body) {
+                return true;
+            }
+            var overloadSignatures = (_a = input.symbol.declarations) === null || _a === void 0 ? void 0 : _a.filter(function (decl) { return ts.isFunctionDeclaration(decl) && !decl.body; });
+            return !overloadSignatures || overloadSignatures.indexOf(input) === overloadSignatures.length - 1;
+        }
         function getBindingNameVisible(elem) {
             if (ts.isOmittedExpression(elem)) {
                 return false;
@@ -80712,7 +86706,7 @@ var ts;
         function rewriteModuleSpecifier(parent, input) {
             if (!input)
                 return undefined;
-            resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || (parent.kind !== 256 && parent.kind !== 195);
+            resultHasExternalModuleIndicator = resultHasExternalModuleIndicator || (parent.kind !== 260 && parent.kind !== 199);
             if (ts.isStringLiteralLike(input)) {
                 if (isBundledEmit) {
                     var newName = ts.getExternalModuleNameFromDeclaration(context.getEmitHost(), resolver, parent);
@@ -80732,7 +86726,7 @@ var ts;
         function transformImportEqualsDeclaration(decl) {
             if (!resolver.isDeclarationVisible(decl))
                 return;
-            if (decl.moduleReference.kind === 272) {
+            if (decl.moduleReference.kind === 276) {
                 var specifier = ts.getExternalModuleImportEqualsDeclarationExpression(decl);
                 return factory.updateImportEqualsDeclaration(decl, undefined, decl.modifiers, decl.isTypeOnly, decl.name, factory.updateExternalModuleReference(decl.moduleReference, rewriteModuleSpecifier(decl, specifier)));
             }
@@ -80746,29 +86740,29 @@ var ts;
         }
         function transformImportDeclaration(decl) {
             if (!decl.importClause) {
-                return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier));
+                return factory.updateImportDeclaration(decl, undefined, decl.modifiers, decl.importClause, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
             }
             var visibleDefaultBinding = decl.importClause && decl.importClause.name && resolver.isDeclarationVisible(decl.importClause) ? decl.importClause.name : undefined;
             if (!decl.importClause.namedBindings) {
-                return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier));
+                return visibleDefaultBinding && factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
             }
-            if (decl.importClause.namedBindings.kind === 263) {
+            if (decl.importClause.namedBindings.kind === 267) {
                 var namedBindings = resolver.isDeclarationVisible(decl.importClause.namedBindings) ? decl.importClause.namedBindings : undefined;
-                return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier)) : undefined;
+                return visibleDefaultBinding || namedBindings ? factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, namedBindings), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined) : undefined;
             }
             var bindingList = ts.mapDefined(decl.importClause.namedBindings.elements, function (b) { return resolver.isDeclarationVisible(b) ? b : undefined; });
             if ((bindingList && bindingList.length) || visibleDefaultBinding) {
-                return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier));
+                return factory.updateImportDeclaration(decl, undefined, decl.modifiers, factory.updateImportClause(decl.importClause, decl.importClause.isTypeOnly, visibleDefaultBinding, bindingList && bindingList.length ? factory.updateNamedImports(decl.importClause.namedBindings, bindingList) : undefined), rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
             }
             if (resolver.isImportRequiredByAugmentation(decl)) {
-                return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier));
+                return factory.updateImportDeclaration(decl, undefined, decl.modifiers, undefined, rewriteModuleSpecifier(decl, decl.moduleSpecifier), undefined);
             }
         }
         function transformAndReplaceLatePaintedStatements(statements) {
             while (ts.length(lateMarkedStatements)) {
                 var i = lateMarkedStatements.shift();
                 if (!ts.isLateVisibilityPaintedStatement(i)) {
-                    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));
+                    return ts.Debug.fail("Late replaced statement was found which is not handled by the declaration transformer!: ".concat(ts.SyntaxKind ? ts.SyntaxKind[i.kind] : i.kind));
                 }
                 var priorNeedsDeclare = needsDeclare;
                 needsDeclare = i.parent && ts.isSourceFile(i.parent) && !(ts.isExternalModule(i.parent) && isBundledEmit);
@@ -80819,7 +86813,7 @@ var ts;
             var oldDiag = getSymbolAccessibilityDiagnostic;
             var canProduceDiagnostic = ts.canProduceDiagnostics(input);
             var oldWithinObjectLiteralType = suppressNewDiagnosticContexts;
-            var shouldEnterSuppressNewDiagnosticsContextContext = ((input.kind === 177 || input.kind === 190) && input.parent.kind !== 254);
+            var shouldEnterSuppressNewDiagnosticsContextContext = ((input.kind === 181 || input.kind === 194) && input.parent.kind !== 258);
             if (ts.isMethodDeclaration(input) || ts.isMethodSignature(input)) {
                 if (ts.hasEffectiveModifier(input, 8)) {
                     if (input.symbol && input.symbol.declarations && input.symbol.declarations[0] !== input)
@@ -80838,67 +86832,67 @@ var ts;
             }
             if (isProcessedComponent(input)) {
                 switch (input.kind) {
-                    case 223: {
+                    case 227: {
                         if ((ts.isEntityName(input.expression) || ts.isEntityNameExpression(input.expression))) {
                             checkEntityNameVisibility(input.expression, enclosingDeclaration);
                         }
                         var node = ts.visitEachChild(input, visitDeclarationSubtree, context);
                         return cleanup(factory.updateExpressionWithTypeArguments(node, node.expression, node.typeArguments));
                     }
-                    case 173: {
+                    case 177: {
                         checkEntityNameVisibility(input.typeName, enclosingDeclaration);
                         var node = ts.visitEachChild(input, visitDeclarationSubtree, context);
                         return cleanup(factory.updateTypeReferenceNode(node, node.typeName, node.typeArguments));
                     }
-                    case 170:
+                    case 174:
                         return cleanup(factory.updateConstructSignature(input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
-                    case 166: {
+                    case 170: {
                         var ctor = factory.createConstructorDeclaration(undefined, ensureModifiers(input), updateParamsList(input, input.parameters, 0), undefined);
                         return cleanup(ctor);
                     }
-                    case 165: {
+                    case 168: {
                         if (ts.isPrivateIdentifier(input.name)) {
                             return cleanup(undefined);
                         }
                         var sig = factory.createMethodDeclaration(undefined, ensureModifiers(input), undefined, input.name, input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), undefined);
                         return cleanup(sig);
                     }
-                    case 167: {
+                    case 171: {
                         if (ts.isPrivateIdentifier(input.name)) {
                             return cleanup(undefined);
                         }
                         var accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input));
                         return cleanup(factory.updateGetAccessorDeclaration(input, undefined, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8)), ensureType(input, accessorType), undefined));
                     }
-                    case 168: {
+                    case 172: {
                         if (ts.isPrivateIdentifier(input.name)) {
                             return cleanup(undefined);
                         }
                         return cleanup(factory.updateSetAccessorDeclaration(input, undefined, ensureModifiers(input), input.name, updateAccessorParamsList(input, ts.hasEffectiveModifier(input, 8)), undefined));
                     }
-                    case 163:
+                    case 166:
                         if (ts.isPrivateIdentifier(input.name)) {
                             return cleanup(undefined);
                         }
                         return cleanup(factory.updatePropertyDeclaration(input, undefined, ensureModifiers(input), input.name, input.questionToken, ensureType(input, input.type), ensureNoInitializer(input)));
-                    case 162:
+                    case 165:
                         if (ts.isPrivateIdentifier(input.name)) {
                             return cleanup(undefined);
                         }
                         return cleanup(factory.updatePropertySignature(input, ensureModifiers(input), input.name, input.questionToken, ensureType(input, input.type)));
-                    case 164: {
+                    case 167: {
                         if (ts.isPrivateIdentifier(input.name)) {
                             return cleanup(undefined);
                         }
                         return cleanup(factory.updateMethodSignature(input, ensureModifiers(input), input.name, input.questionToken, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
                     }
-                    case 169: {
+                    case 173: {
                         return cleanup(factory.updateCallSignature(input, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type)));
                     }
-                    case 171: {
-                        return cleanup(factory.updateIndexSignature(input, undefined, ensureModifiers(input), updateParamsList(input, input.parameters), ts.visitNode(input.type, visitDeclarationSubtree) || factory.createKeywordTypeNode(128)));
+                    case 175: {
+                        return cleanup(factory.updateIndexSignature(input, undefined, ensureModifiers(input), updateParamsList(input, input.parameters), ts.visitNode(input.type, visitDeclarationSubtree) || factory.createKeywordTypeNode(130)));
                     }
-                    case 249: {
+                    case 253: {
                         if (ts.isBindingPattern(input.name)) {
                             return recreateBindingPattern(input.name);
                         }
@@ -80906,13 +86900,13 @@ var ts;
                         suppressNewDiagnosticContexts = true;
                         return cleanup(factory.updateVariableDeclaration(input, input.name, undefined, ensureType(input, input.type), ensureNoInitializer(input)));
                     }
-                    case 159: {
+                    case 162: {
                         if (isPrivateMethodTypeParameter(input) && (input.default || input.constraint)) {
                             return cleanup(factory.updateTypeParameterDeclaration(input, input.name, undefined, undefined));
                         }
                         return cleanup(ts.visitEachChild(input, visitDeclarationSubtree, context));
                     }
-                    case 184: {
+                    case 188: {
                         var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree);
                         var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree);
                         var oldEnclosingDecl = enclosingDeclaration;
@@ -80922,18 +86916,18 @@ var ts;
                         var falseType = ts.visitNode(input.falseType, visitDeclarationSubtree);
                         return cleanup(factory.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
                     }
-                    case 174: {
+                    case 178: {
                         return cleanup(factory.updateFunctionTypeNode(input, ts.visitNodes(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), ts.visitNode(input.type, visitDeclarationSubtree)));
                     }
-                    case 175: {
+                    case 179: {
                         return cleanup(factory.updateConstructorTypeNode(input, ensureModifiers(input), ts.visitNodes(input.typeParameters, visitDeclarationSubtree), updateParamsList(input, input.parameters), ts.visitNode(input.type, visitDeclarationSubtree)));
                     }
-                    case 195: {
+                    case 199: {
                         if (!ts.isLiteralImportTypeNode(input))
                             return cleanup(input);
                         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));
                     }
-                    default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: " + ts.SyntaxKind[input.kind]);
+                    default: ts.Debug.assertNever(input, "Attempted to process unhandled node kind: ".concat(ts.SyntaxKind[input.kind]));
                 }
             }
             if (ts.isTupleTypeNode(input) && (ts.getLineAndCharacterOfPosition(currentSourceFile, input.pos).line === ts.getLineAndCharacterOfPosition(currentSourceFile, input.end).line)) {
@@ -80960,7 +86954,7 @@ var ts;
             }
         }
         function isPrivateMethodTypeParameter(node) {
-            return node.parent.kind === 165 && ts.hasEffectiveModifier(node.parent, 8);
+            return node.parent.kind === 168 && ts.hasEffectiveModifier(node.parent, 8);
         }
         function visitDeclarationStatements(input) {
             if (!isPreservedDeclarationStatement(input)) {
@@ -80969,19 +86963,19 @@ var ts;
             if (shouldStripInternal(input))
                 return;
             switch (input.kind) {
-                case 267: {
+                case 271: {
                     if (ts.isSourceFile(input.parent)) {
                         resultHasExternalModuleIndicator = true;
                     }
                     resultHasScopeMarker = true;
-                    return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier));
+                    return factory.updateExportDeclaration(input, undefined, input.modifiers, input.isTypeOnly, input.exportClause, rewriteModuleSpecifier(input, input.moduleSpecifier), undefined);
                 }
-                case 266: {
+                case 270: {
                     if (ts.isSourceFile(input.parent)) {
                         resultHasExternalModuleIndicator = true;
                     }
                     resultHasScopeMarker = true;
-                    if (input.expression.kind === 78) {
+                    if (input.expression.kind === 79) {
                         return input;
                     }
                     else {
@@ -80993,7 +86987,7 @@ var ts;
                         errorFallbackNode = input;
                         var varDecl = factory.createVariableDeclaration(newId, undefined, resolver.createTypeOfExpression(input.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), undefined);
                         errorFallbackNode = undefined;
-                        var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(133)] : [], factory.createVariableDeclarationList([varDecl], 2));
+                        var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(135)] : [], factory.createVariableDeclarationList([varDecl], 2));
                         return [statement, factory.updateExportAssignment(input, input.decorators, input.modifiers, newId)];
                     }
                 }
@@ -81006,17 +87000,17 @@ var ts;
             if (ts.isImportEqualsDeclaration(statement) || ts.hasEffectiveModifier(statement, 512) || !ts.canHaveModifiers(statement)) {
                 return statement;
             }
-            var modifiers = factory.createModifiersFromModifierFlags(ts.getEffectiveModifierFlags(statement) & (11263 ^ 1));
+            var modifiers = factory.createModifiersFromModifierFlags(ts.getEffectiveModifierFlags(statement) & (27647 ^ 1));
             return factory.updateModifiers(statement, modifiers);
         }
         function transformTopLevelDeclaration(input) {
             if (shouldStripInternal(input))
                 return;
             switch (input.kind) {
-                case 260: {
+                case 264: {
                     return transformImportEqualsDeclaration(input);
                 }
-                case 261: {
+                case 265: {
                     return transformImportDeclaration(input);
                 }
             }
@@ -81036,14 +87030,14 @@ var ts;
             }
             var previousNeedsDeclare = needsDeclare;
             switch (input.kind) {
-                case 254:
+                case 258:
                     return cleanup(factory.updateTypeAliasDeclaration(input, undefined, ensureModifiers(input), input.name, ts.visitNodes(input.typeParameters, visitDeclarationSubtree, ts.isTypeParameterDeclaration), ts.visitNode(input.type, visitDeclarationSubtree, ts.isTypeNode)));
-                case 253: {
+                case 257: {
                     return cleanup(factory.updateInterfaceDeclaration(input, undefined, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree)));
                 }
-                case 251: {
+                case 255: {
                     var clean = cleanup(factory.updateFunctionDeclaration(input, undefined, ensureModifiers(input), undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), undefined));
-                    if (clean && resolver.isExpandoFunctionDeclaration(input)) {
+                    if (clean && resolver.isExpandoFunctionDeclaration(input) && shouldEmitFunctionProperties(input)) {
                         var props = resolver.getPropertiesOfContainerFunction(input);
                         var fakespace_1 = ts.parseNodeFactory.createModuleDeclaration(undefined, undefined, clean.name || factory.createIdentifier("_default"), factory.createModuleBlock([]), 16);
                         ts.setParent(fakespace_1, enclosingDeclaration);
@@ -81051,7 +87045,7 @@ var ts;
                         fakespace_1.symbol = props[0].parent;
                         var exportMappings_1 = [];
                         var declarations = ts.mapDefined(props, function (p) {
-                            if (!ts.isPropertyAccessExpression(p.valueDeclaration)) {
+                            if (!p.valueDeclaration || !ts.isPropertyAccessExpression(p.valueDeclaration)) {
                                 return undefined;
                             }
                             getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(p.valueDeclaration);
@@ -81064,7 +87058,7 @@ var ts;
                                 exportMappings_1.push([name, nameStr]);
                             }
                             var varDecl = factory.createVariableDeclaration(name, undefined, type, undefined);
-                            return factory.createVariableStatement(isNonContextualKeywordName ? undefined : [factory.createToken(92)], factory.createVariableDeclarationList([varDecl]));
+                            return factory.createVariableStatement(isNonContextualKeywordName ? undefined : [factory.createToken(93)], factory.createVariableDeclarationList([varDecl]));
                         });
                         if (!exportMappings_1.length) {
                             declarations = ts.mapDefined(declarations, function (declaration) { return factory.updateModifiers(declaration, 0); });
@@ -81072,7 +87066,7 @@ var ts;
                         else {
                             declarations.push(factory.createExportDeclaration(undefined, undefined, false, factory.createNamedExports(ts.map(exportMappings_1, function (_a) {
                                 var gen = _a[0], exp = _a[1];
-                                return factory.createExportSpecifier(gen, exp);
+                                return factory.createExportSpecifier(false, gen, exp);
                             }))));
                         }
                         var namespaceDecl = factory.createModuleDeclaration(undefined, ensureModifiers(input), input.name, factory.createModuleBlock(declarations), 16);
@@ -81093,10 +87087,10 @@ var ts;
                         return clean;
                     }
                 }
-                case 256: {
+                case 260: {
                     needsDeclare = false;
                     var inner = input.body;
-                    if (inner && inner.kind === 257) {
+                    if (inner && inner.kind === 261) {
                         var oldNeedsScopeFix = needsScopeFixMarker;
                         var oldHasScopeFix = resultHasScopeMarker;
                         resultHasScopeMarker = false;
@@ -81108,7 +87102,7 @@ var ts;
                         }
                         if (!ts.isGlobalScopeAugmentation(input) && !hasScopeMarker(lateStatements) && !resultHasScopeMarker) {
                             if (needsScopeFixMarker) {
-                                lateStatements = factory.createNodeArray(__spreadArray(__spreadArray([], lateStatements), [ts.createEmptyExports(factory)]));
+                                lateStatements = factory.createNodeArray(__spreadArray(__spreadArray([], lateStatements, true), [ts.createEmptyExports(factory)], false));
                             }
                             else {
                                 lateStatements = ts.visitNodes(lateStatements, stripExportModifiers);
@@ -81132,7 +87126,7 @@ var ts;
                         return cleanup(factory.updateModuleDeclaration(input, undefined, mods, input.name, body));
                     }
                 }
-                case 252: {
+                case 256: {
                     errorNameNode = input.name;
                     errorFallbackNode = input;
                     var modifiers = factory.createNodeArray(ensureModifiers(input));
@@ -81142,10 +87136,10 @@ var ts;
                     if (ctor) {
                         var oldDiag_1 = getSymbolAccessibilityDiagnostic;
                         parameterProperties = ts.compact(ts.flatMap(ctor.parameters, function (param) {
-                            if (!ts.hasSyntacticModifier(param, 92) || shouldStripInternal(param))
+                            if (!ts.hasSyntacticModifier(param, 16476) || shouldStripInternal(param))
                                 return;
                             getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(param);
-                            if (param.name.kind === 78) {
+                            if (param.name.kind === 79) {
                                 return preserveJsDoc(factory.createPropertyDeclaration(undefined, ensureModifiers(param), param.name, param.questionToken, ensureType(param, param.type), ensureNoInitializer(param)), param);
                             }
                             else {
@@ -81175,25 +87169,25 @@ var ts;
                     var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
                     var members = factory.createNodeArray(memberNodes);
                     var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
-                    if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 103) {
+                    if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
                         var oldId = input.name ? ts.unescapeLeadingUnderscores(input.name.escapedText) : "default";
-                        var newId_1 = factory.createUniqueName(oldId + "_base", 16);
+                        var newId_1 = factory.createUniqueName("".concat(oldId, "_base"), 16);
                         getSymbolAccessibilityDiagnostic = function () { return ({
                             diagnosticMessage: ts.Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1,
                             errorNode: extendsClause_1,
                             typeName: input.name
                         }); };
                         var varDecl = factory.createVariableDeclaration(newId_1, undefined, resolver.createTypeOfExpression(extendsClause_1.expression, input, declarationEmitNodeBuilderFlags, symbolTracker), undefined);
-                        var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(133)] : [], factory.createVariableDeclarationList([varDecl], 2));
+                        var statement = factory.createVariableStatement(needsDeclare ? [factory.createModifier(135)] : [], factory.createVariableDeclarationList([varDecl], 2));
                         var heritageClauses = factory.createNodeArray(ts.map(input.heritageClauses, function (clause) {
-                            if (clause.token === 93) {
+                            if (clause.token === 94) {
                                 var oldDiag_2 = getSymbolAccessibilityDiagnostic;
                                 getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
                                 var newClause = factory.updateHeritageClause(clause, ts.map(clause.types, function (t) { return factory.updateExpressionWithTypeArguments(t, newId_1, ts.visitNodes(t.typeArguments, visitDeclarationSubtree)); }));
                                 getSymbolAccessibilityDiagnostic = oldDiag_2;
                                 return newClause;
                             }
-                            return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 103; })), visitDeclarationSubtree));
+                            return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 104; })), visitDeclarationSubtree));
                         }));
                         return [statement, cleanup(factory.updateClassDeclaration(input, undefined, modifiers, input.name, typeParameters, heritageClauses, members))];
                     }
@@ -81202,10 +87196,10 @@ var ts;
                         return cleanup(factory.updateClassDeclaration(input, undefined, modifiers, input.name, typeParameters, heritageClauses, members));
                     }
                 }
-                case 232: {
+                case 236: {
                     return cleanup(transformVariableStatement(input));
                 }
-                case 255: {
+                case 259: {
                     return cleanup(factory.updateEnumDeclaration(input, undefined, factory.createNodeArray(ensureModifiers(input)), input.name, factory.createNodeArray(ts.mapDefined(input.members, function (m) {
                         if (shouldStripInternal(m))
                             return;
@@ -81214,7 +87208,7 @@ var ts;
                     }))));
                 }
             }
-            return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: " + ts.SyntaxKind[input.kind]);
+            return ts.Debug.assertNever(input, "Unhandled top-level node in declaration emit: ".concat(ts.SyntaxKind[input.kind]));
             function cleanup(node) {
                 if (isEnclosingDeclaration(input)) {
                     enclosingDeclaration = previousEnclosingDeclaration;
@@ -81222,7 +87216,7 @@ var ts;
                 if (canProdiceDiagnostic) {
                     getSymbolAccessibilityDiagnostic = oldDiag;
                 }
-                if (input.kind === 256) {
+                if (input.kind === 260) {
                     needsDeclare = previousNeedsDeclare;
                 }
                 if (node === input) {
@@ -81245,7 +87239,7 @@ var ts;
             return ts.flatten(ts.mapDefined(d.elements, function (e) { return recreateBindingElement(e); }));
         }
         function recreateBindingElement(e) {
-            if (e.kind === 222) {
+            if (e.kind === 226) {
                 return;
             }
             if (e.name) {
@@ -81293,9 +87287,9 @@ var ts;
             return factory.createModifiersFromModifierFlags(newFlags);
         }
         function ensureModifierFlags(node) {
-            var mask = 11263 ^ (4 | 256);
+            var mask = 27647 ^ (4 | 256 | 16384);
             var additions = (needsDeclare && !isAlwaysType(node)) ? 2 : 0;
-            var parentIsFile = node.parent.kind === 297;
+            var parentIsFile = node.parent.kind === 303;
             if (!parentIsFile || (isBundledEmit && parentIsFile && ts.isExternalModule(node.parent))) {
                 mask ^= 2;
                 additions = 0;
@@ -81316,13 +87310,13 @@ var ts;
         }
         function transformHeritageClauses(nodes) {
             return factory.createNodeArray(ts.filter(ts.map(nodes, function (clause) { return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) {
-                return ts.isEntityNameExpression(t.expression) || (clause.token === 93 && t.expression.kind === 103);
+                return ts.isEntityNameExpression(t.expression) || (clause.token === 94 && t.expression.kind === 104);
             })), visitDeclarationSubtree)); }), function (clause) { return clause.types && !!clause.types.length; }));
         }
     }
     ts.transformDeclarations = transformDeclarations;
     function isAlwaysType(node) {
-        if (node.kind === 253) {
+        if (node.kind === 257) {
             return true;
         }
         return false;
@@ -81331,7 +87325,7 @@ var ts;
         return ts.factory.createModifiersFromModifierFlags(maskModifierFlags(node, modifierMask, modifierAdditions));
     }
     function maskModifierFlags(node, modifierMask, modifierAdditions) {
-        if (modifierMask === void 0) { modifierMask = 11263 ^ 4; }
+        if (modifierMask === void 0) { modifierMask = 27647 ^ 4; }
         if (modifierAdditions === void 0) { modifierAdditions = 0; }
         var flags = (ts.getEffectiveModifierFlags(node) & modifierMask) | modifierAdditions;
         if (flags & 512 && !(flags & 1)) {
@@ -81344,7 +87338,7 @@ var ts;
     }
     function getTypeAnnotationFromAccessor(accessor) {
         if (accessor) {
-            return accessor.kind === 167
+            return accessor.kind === 171
                 ? accessor.type
                 : accessor.parameters.length > 0
                     ? accessor.parameters[0].type
@@ -81353,52 +87347,52 @@ var ts;
     }
     function canHaveLiteralInitializer(node) {
         switch (node.kind) {
-            case 163:
-            case 162:
+            case 166:
+            case 165:
                 return !ts.hasEffectiveModifier(node, 8);
-            case 160:
-            case 249:
+            case 163:
+            case 253:
                 return true;
         }
         return false;
     }
     function isPreservedDeclarationStatement(node) {
         switch (node.kind) {
-            case 251:
-            case 256:
-            case 260:
-            case 253:
-            case 252:
-            case 254:
             case 255:
-            case 232:
-            case 261:
-            case 267:
-            case 266:
+            case 260:
+            case 264:
+            case 257:
+            case 256:
+            case 258:
+            case 259:
+            case 236:
+            case 265:
+            case 271:
+            case 270:
                 return true;
         }
         return false;
     }
     function isProcessedComponent(node) {
         switch (node.kind) {
+            case 174:
             case 170:
+            case 168:
+            case 171:
+            case 172:
             case 166:
             case 165:
             case 167:
-            case 168:
-            case 163:
-            case 162:
-            case 164:
-            case 169:
-            case 171:
-            case 249:
-            case 159:
-            case 223:
             case 173:
-            case 184:
-            case 174:
             case 175:
-            case 195:
+            case 253:
+            case 162:
+            case 227:
+            case 177:
+            case 188:
+            case 178:
+            case 179:
+            case 199:
                 return true;
         }
         return false;
@@ -81409,11 +87403,15 @@ var ts;
     function getModuleTransformer(moduleKind) {
         switch (moduleKind) {
             case ts.ModuleKind.ESNext:
+            case ts.ModuleKind.ES2022:
             case ts.ModuleKind.ES2020:
             case ts.ModuleKind.ES2015:
                 return ts.transformECMAScriptModule;
             case ts.ModuleKind.System:
                 return ts.transformSystemModule;
+            case ts.ModuleKind.Node12:
+            case ts.ModuleKind.NodeNext:
+                return ts.transformNodeModule;
             default:
                 return ts.transformModule;
         }
@@ -81441,6 +87439,9 @@ var ts;
         if (languageVersion < 99) {
             transformers.push(ts.transformESNext);
         }
+        if (languageVersion < 8) {
+            transformers.push(ts.transformES2021);
+        }
         if (languageVersion < 7) {
             transformers.push(ts.transformES2020);
         }
@@ -81499,7 +87500,7 @@ var ts;
     }
     ts.noEmitNotification = noEmitNotification;
     function transformNodes(resolver, host, factory, options, nodes, transformers, allowDtsFiles) {
-        var enabledSyntaxKindFeatures = new Array(341);
+        var enabledSyntaxKindFeatures = new Array(353);
         var lexicalEnvironmentVariableDeclarations;
         var lexicalEnvironmentFunctionDeclarations;
         var lexicalEnvironmentStatements;
@@ -81510,6 +87511,9 @@ var ts;
         var lexicalEnvironmentFlagsStack = [];
         var lexicalEnvironmentStackOffset = 0;
         var lexicalEnvironmentSuspended = false;
+        var blockScopedVariableDeclarationsStack = [];
+        var blockScopeStackOffset = 0;
+        var blockScopedVariableDeclarations;
         var emitHelpers;
         var onSubstituteNode = noEmitSubstitution;
         var onEmitNode = noEmitNotification;
@@ -81530,6 +87534,9 @@ var ts;
             hoistVariableDeclaration: hoistVariableDeclaration,
             hoistFunctionDeclaration: hoistFunctionDeclaration,
             addInitializationStatement: addInitializationStatement,
+            startBlockScope: startBlockScope,
+            endBlockScope: endBlockScope,
+            addBlockScopedVariable: addBlockScopedVariable,
             requestEmitHelper: requestEmitHelper,
             readEmitHelpers: readEmitHelpers,
             enableSubstitution: enableSubstitution,
@@ -81569,7 +87576,7 @@ var ts;
         var transformed = [];
         for (var _a = 0, nodes_3 = nodes; _a < nodes_3.length; _a++) {
             var node = nodes_3[_a];
-            ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "transformNodes", node.kind === 297 ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end });
+            ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("emit", "transformNodes", node.kind === 303 ? { path: node.path } : { kind: node.kind, pos: node.pos, end: node.end });
             transformed.push((allowDtsFiles ? transformation : transformRoot)(node));
             ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
         }
@@ -81689,7 +87696,7 @@ var ts;
                 lexicalEnvironmentFunctionDeclarations ||
                 lexicalEnvironmentStatements) {
                 if (lexicalEnvironmentFunctionDeclarations) {
-                    statements = __spreadArray([], lexicalEnvironmentFunctionDeclarations);
+                    statements = __spreadArray([], lexicalEnvironmentFunctionDeclarations, true);
                 }
                 if (lexicalEnvironmentVariableDeclarations) {
                     var statement = factory.createVariableStatement(undefined, factory.createVariableDeclarationList(lexicalEnvironmentVariableDeclarations));
@@ -81703,10 +87710,10 @@ var ts;
                 }
                 if (lexicalEnvironmentStatements) {
                     if (!statements) {
-                        statements = __spreadArray([], lexicalEnvironmentStatements);
+                        statements = __spreadArray([], lexicalEnvironmentStatements, true);
                     }
                     else {
-                        statements = __spreadArray(__spreadArray([], statements), lexicalEnvironmentStatements);
+                        statements = __spreadArray(__spreadArray([], statements, true), lexicalEnvironmentStatements, true);
                     }
                 }
             }
@@ -81731,6 +87738,31 @@ var ts;
         function getLexicalEnvironmentFlags() {
             return lexicalEnvironmentFlags;
         }
+        function startBlockScope() {
+            ts.Debug.assert(state > 0, "Cannot start a block scope during initialization.");
+            ts.Debug.assert(state < 2, "Cannot start a block scope after transformation has completed.");
+            blockScopedVariableDeclarationsStack[blockScopeStackOffset] = blockScopedVariableDeclarations;
+            blockScopeStackOffset++;
+            blockScopedVariableDeclarations = undefined;
+        }
+        function endBlockScope() {
+            ts.Debug.assert(state > 0, "Cannot end a block scope during initialization.");
+            ts.Debug.assert(state < 2, "Cannot end a block scope after transformation has completed.");
+            var statements = ts.some(blockScopedVariableDeclarations) ?
+                [
+                    factory.createVariableStatement(undefined, factory.createVariableDeclarationList(blockScopedVariableDeclarations.map(function (identifier) { return factory.createVariableDeclaration(identifier); }), 1))
+                ] : undefined;
+            blockScopeStackOffset--;
+            blockScopedVariableDeclarations = blockScopedVariableDeclarationsStack[blockScopeStackOffset];
+            if (blockScopeStackOffset === 0) {
+                blockScopedVariableDeclarationsStack = [];
+            }
+            return statements;
+        }
+        function addBlockScopedVariable(name) {
+            ts.Debug.assert(blockScopeStackOffset > 0, "Cannot add a block scoped variable outside of an iteration body.");
+            (blockScopedVariableDeclarations || (blockScopedVariableDeclarations = [])).push(name);
+        }
         function requestEmitHelper(helper) {
             ts.Debug.assert(state > 0, "Cannot modify the transformation context during initialization.");
             ts.Debug.assert(state < 2, "Cannot modify the transformation context after transformation has completed.");
@@ -81769,35 +87801,37 @@ var ts;
     }
     ts.transformNodes = transformNodes;
     ts.nullTransformationContext = {
-        get factory() { return ts.factory; },
-        enableEmitNotification: ts.noop,
-        enableSubstitution: ts.noop,
-        endLexicalEnvironment: ts.returnUndefined,
+        factory: ts.factory,
         getCompilerOptions: function () { return ({}); },
-        getEmitHost: ts.notImplemented,
         getEmitResolver: ts.notImplemented,
+        getEmitHost: ts.notImplemented,
         getEmitHelperFactory: ts.notImplemented,
+        startLexicalEnvironment: ts.noop,
+        resumeLexicalEnvironment: ts.noop,
+        suspendLexicalEnvironment: ts.noop,
+        endLexicalEnvironment: ts.returnUndefined,
         setLexicalEnvironmentFlags: ts.noop,
         getLexicalEnvironmentFlags: function () { return 0; },
-        hoistFunctionDeclaration: ts.noop,
         hoistVariableDeclaration: ts.noop,
+        hoistFunctionDeclaration: ts.noop,
         addInitializationStatement: ts.noop,
-        isEmitNotificationEnabled: ts.notImplemented,
-        isSubstitutionEnabled: ts.notImplemented,
-        onEmitNode: ts.noop,
-        onSubstituteNode: ts.notImplemented,
-        readEmitHelpers: ts.notImplemented,
+        startBlockScope: ts.noop,
+        endBlockScope: ts.returnUndefined,
+        addBlockScopedVariable: ts.noop,
         requestEmitHelper: ts.noop,
-        resumeLexicalEnvironment: ts.noop,
-        startLexicalEnvironment: ts.noop,
-        suspendLexicalEnvironment: ts.noop,
+        readEmitHelpers: ts.notImplemented,
+        enableSubstitution: ts.noop,
+        enableEmitNotification: ts.noop,
+        isSubstitutionEnabled: ts.notImplemented,
+        isEmitNotificationEnabled: ts.notImplemented,
+        onSubstituteNode: noEmitSubstitution,
+        onEmitNode: noEmitNotification,
         addDiagnostic: ts.noop,
     };
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
     var brackets = createBracketsMap();
-    var syntheticParent = { pos: -1, end: -1 };
     function isBuildInfoFile(file) {
         return ts.fileExtensionIs(file, ".tsbuildinfo");
     }
@@ -81870,11 +87904,11 @@ var ts;
     ts.getOutputPathsForBundle = getOutputPathsForBundle;
     function getOutputPathsFor(sourceFile, host, forceDtsPaths) {
         var options = host.getCompilerOptions();
-        if (sourceFile.kind === 298) {
+        if (sourceFile.kind === 304) {
             return getOutputPathsForBundle(options, forceDtsPaths);
         }
         else {
-            var ownOutputFilePath = ts.getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile, options));
+            var ownOutputFilePath = ts.getOwnEmitOutputFilePath(sourceFile.fileName, host, getOutputExtension(sourceFile.fileName, options));
             var isJsonFile = ts.isJsonSourceFile(sourceFile);
             var isJsonEmittedToSameLocation = isJsonFile &&
                 ts.comparePaths(sourceFile.fileName, ownOutputFilePath, host.getCurrentDirectory(), !host.useCaseSensitiveFileNames()) === 0;
@@ -81889,21 +87923,12 @@ var ts;
     function getSourceMapFilePath(jsFilePath, options) {
         return (options.sourceMap && !options.inlineSourceMap) ? jsFilePath + ".map" : undefined;
     }
-    function getOutputExtension(sourceFile, options) {
-        if (ts.isJsonSourceFile(sourceFile)) {
-            return ".json";
-        }
-        if (options.jsx === 1) {
-            if (ts.isSourceFileJS(sourceFile)) {
-                if (ts.fileExtensionIs(sourceFile.fileName, ".jsx")) {
-                    return ".jsx";
-                }
-            }
-            else if (sourceFile.languageVariant === 1) {
-                return ".jsx";
-            }
-        }
-        return ".js";
+    function getOutputExtension(fileName, options) {
+        return ts.fileExtensionIs(fileName, ".json") ? ".json" :
+            options.jsx === 1 && ts.fileExtensionIsOneOf(fileName, [".jsx", ".tsx"]) ? ".jsx" :
+                ts.fileExtensionIsOneOf(fileName, [".mts", ".mjs"]) ? ".mjs" :
+                    ts.fileExtensionIsOneOf(fileName, [".cts", ".cjs"]) ? ".cjs" :
+                        ".js";
     }
     ts.getOutputExtension = getOutputExtension;
     function getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, outputDir, getCommonSourceDirectory) {
@@ -81912,19 +87937,14 @@ var ts;
             inputFileName;
     }
     function getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory) {
-        ts.Debug.assert(!ts.fileExtensionIs(inputFileName, ".d.ts") && !ts.fileExtensionIs(inputFileName, ".json"));
-        return ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.declarationDir || configFile.options.outDir, getCommonSourceDirectory), ".d.ts");
+        return ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.declarationDir || configFile.options.outDir, getCommonSourceDirectory), ts.getDeclarationEmitExtensionForPath(inputFileName));
     }
     ts.getOutputDeclarationFileName = getOutputDeclarationFileName;
     function getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory) {
         if (configFile.options.emitDeclarationOnly)
             return undefined;
         var isJsonFile = ts.fileExtensionIs(inputFileName, ".json");
-        var outputFileName = ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir, getCommonSourceDirectory), isJsonFile ?
-            ".json" :
-            configFile.options.jsx === 1 && (ts.fileExtensionIs(inputFileName, ".tsx") || ts.fileExtensionIs(inputFileName, ".jsx")) ?
-                ".jsx" :
-                ".js");
+        var outputFileName = ts.changeExtension(getOutputPathWithoutChangingExt(inputFileName, configFile, ignoreCase, configFile.options.outDir, getCommonSourceDirectory), getOutputExtension(inputFileName, configFile.options));
         return !isJsonFile || ts.comparePaths(inputFileName, outputFileName, ts.Debug.checkDefined(configFile.options.configFilePath), ignoreCase) !== 0 ?
             outputFileName :
             undefined;
@@ -81957,13 +87977,13 @@ var ts;
         if (ts.fileExtensionIs(inputFileName, ".json"))
             return;
         if (js && configFile.options.sourceMap) {
-            addOutput(js + ".map");
+            addOutput("".concat(js, ".map"));
         }
         if (ts.getEmitDeclarations(configFile.options)) {
             var dts = getOutputDeclarationFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
             addOutput(dts);
             if (configFile.options.declarationMap) {
-                addOutput(dts + ".map");
+                addOutput("".concat(dts, ".map"));
             }
         }
     }
@@ -81988,7 +88008,7 @@ var ts;
     ts.getCommonSourceDirectory = getCommonSourceDirectory;
     function getCommonSourceDirectoryOfConfig(_a, ignoreCase) {
         var options = _a.options, fileNames = _a.fileNames;
-        return getCommonSourceDirectory(options, function () { return ts.filter(fileNames, function (file) { return !(options.noEmitForJsFiles && ts.fileExtensionIsOneOf(file, ts.supportedJSExtensions)) && !ts.fileExtensionIs(file, ".d.ts"); }); }, ts.getDirectoryPath(ts.normalizeSlashes(ts.Debug.checkDefined(options.configFilePath))), ts.createGetCanonicalFileName(!ignoreCase));
+        return getCommonSourceDirectory(options, function () { return ts.filter(fileNames, function (file) { return !(options.noEmitForJsFiles && ts.fileExtensionIsOneOf(file, ts.supportedJSExtensionsFlat)) && !ts.fileExtensionIs(file, ".d.ts"); }); }, ts.getDirectoryPath(ts.normalizeSlashes(ts.Debug.checkDefined(options.configFilePath))), ts.createGetCanonicalFileName(!ignoreCase));
     }
     ts.getCommonSourceDirectoryOfConfig = getCommonSourceDirectoryOfConfig;
     function getAllProjectOutputs(configFile, ignoreCase) {
@@ -82023,7 +88043,7 @@ var ts;
     function getFirstProjectOutput(configFile, ignoreCase) {
         if (ts.outFile(configFile.options)) {
             var jsFilePath = getOutputPathsForBundle(configFile.options, false).jsFilePath;
-            return ts.Debug.checkDefined(jsFilePath, "project " + configFile.options.configFilePath + " expected to have at least one output");
+            return ts.Debug.checkDefined(jsFilePath, "project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
         }
         var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
         for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
@@ -82042,7 +88062,7 @@ var ts;
         var buildInfoPath = getTsBuildInfoEmitOutputFilePath(configFile.options);
         if (buildInfoPath)
             return buildInfoPath;
-        return ts.Debug.fail("project " + configFile.options.configFilePath + " expected to have at least one output");
+        return ts.Debug.fail("project ".concat(configFile.options.configFilePath, " expected to have at least one output"));
     }
     ts.getFirstProjectOutput = getFirstProjectOutput;
     function emitFiles(resolver, host, targetSourceFile, _a, emitOnlyDtsFiles, onlyBuildInfo, forceDtsEmit) {
@@ -82200,12 +88220,12 @@ var ts;
             if (!declBlocked || forceDtsEmit) {
                 ts.Debug.assert(declarationTransform.transformed.length === 1, "Should only see one output from the decl transform");
                 printSourceFileOrBundle(declarationFilePath, declarationMapPath, declarationTransform.transformed[0], declarationPrinter, {
-                    sourceMap: compilerOptions.declarationMap,
+                    sourceMap: !forceDtsEmit && compilerOptions.declarationMap,
                     sourceRoot: compilerOptions.sourceRoot,
                     mapRoot: compilerOptions.mapRoot,
                     extendedDiagnostics: compilerOptions.extendedDiagnostics,
                 });
-                if (forceDtsEmit && declarationTransform.transformed[0].kind === 297) {
+                if (forceDtsEmit && declarationTransform.transformed[0].kind === 303) {
                     var sourceFile = declarationTransform.transformed[0];
                     exportedModulesFromDeclarationEmit = sourceFile.exportedModulesFromDeclarationEmit;
                 }
@@ -82216,7 +88236,7 @@ var ts;
         }
         function collectLinkedAliases(node) {
             if (ts.isExportAssignment(node)) {
-                if (node.expression.kind === 78) {
+                if (node.expression.kind === 79) {
                     resolver.collectLinkedAliases(node.expression, true);
                 }
                 return;
@@ -82228,8 +88248,8 @@ var ts;
             ts.forEachChild(node, collectLinkedAliases);
         }
         function printSourceFileOrBundle(jsFilePath, sourceMapFilePath, sourceFileOrBundle, printer, mapOptions) {
-            var bundle = sourceFileOrBundle.kind === 298 ? sourceFileOrBundle : undefined;
-            var sourceFile = sourceFileOrBundle.kind === 297 ? sourceFileOrBundle : undefined;
+            var bundle = sourceFileOrBundle.kind === 304 ? sourceFileOrBundle : undefined;
+            var sourceFile = sourceFileOrBundle.kind === 303 ? sourceFileOrBundle : undefined;
             var sourceFiles = bundle ? bundle.sourceFiles : [sourceFile];
             var sourceMapGenerator;
             if (shouldEmitSourceMaps(mapOptions, sourceFileOrBundle)) {
@@ -82252,7 +88272,7 @@ var ts;
                 if (sourceMappingURL) {
                     if (!writer.isAtStartOfLine())
                         writer.rawWrite(newLine);
-                    writer.writeComment("//# " + "sourceMappingURL" + "=" + sourceMappingURL);
+                    writer.writeComment("//# ".concat("sourceMappingURL", "=").concat(sourceMappingURL));
                 }
                 if (sourceMapFilePath) {
                     var sourceMap = sourceMapGenerator.toString();
@@ -82267,7 +88287,7 @@ var ts;
         }
         function shouldEmitSourceMaps(mapOptions, sourceFileOrBundle) {
             return (mapOptions.sourceMap || mapOptions.inlineSourceMap)
-                && (sourceFileOrBundle.kind !== 297 || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json"));
+                && (sourceFileOrBundle.kind !== 303 || !ts.fileExtensionIs(sourceFileOrBundle.fileName, ".json"));
         }
         function getSourceRoot(mapOptions) {
             var sourceRoot = ts.normalizeSlashes(mapOptions.sourceRoot || "");
@@ -82292,7 +88312,7 @@ var ts;
             if (mapOptions.inlineSourceMap) {
                 var sourceMapText = sourceMapGenerator.toString();
                 var base64SourceMapText = ts.base64encode(ts.sys, sourceMapText);
-                return "data:application/json;base64," + base64SourceMapText;
+                return "data:application/json;base64,".concat(base64SourceMapText);
             }
             var sourceMapFile = ts.getBaseFileName(ts.normalizeSlashes(ts.Debug.checkDefined(sourceMapFilePath)));
             if (mapOptions.mapRoot) {
@@ -82313,7 +88333,7 @@ var ts;
     }
     ts.emitFiles = emitFiles;
     function getBuildInfoText(buildInfo) {
-        return JSON.stringify(buildInfo, undefined, 2);
+        return JSON.stringify(buildInfo);
     }
     ts.getBuildInfoText = getBuildInfoText;
     function getBuildInfo(buildInfoText) {
@@ -82412,7 +88432,7 @@ var ts;
         var prependNodes = ts.createPrependNodes(config.projectReferences, getCommandLine, function (f) { return host.readFile(f); });
         var sourceFilesForJsEmit = createSourceFilesFromBundleBuildInfo(buildInfo.bundle, buildInfoDirectory, host);
         var emitHost = {
-            getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes), [ownPrependInput]); }),
+            getPrependNodes: ts.memoize(function () { return __spreadArray(__spreadArray([], prependNodes, true), [ownPrependInput], false); }),
             getCanonicalFileName: host.getCanonicalFileName,
             getCommonSourceDirectory: function () { return ts.getNormalizedAbsolutePath(buildInfo.bundle.commonSourceDirectory, buildInfoDirectory); },
             getCompilerOptions: function () { return config.options; },
@@ -82456,7 +88476,7 @@ var ts;
                             return;
                         break;
                     default:
-                        ts.Debug.fail("Unexpected path: " + name);
+                        ts.Debug.fail("Unexpected path: ".concat(name));
                 }
                 outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark });
             },
@@ -82476,7 +88496,7 @@ var ts;
     function createPrinter(printerOptions, handlers) {
         if (printerOptions === void 0) { printerOptions = {}; }
         if (handlers === void 0) { handlers = {}; }
-        var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
+        var hasGlobalName = handlers.hasGlobalName, _a = handlers.onEmitNode, onEmitNode = _a === void 0 ? ts.noEmitNotification : _a, isEmitNotificationEnabled = handlers.isEmitNotificationEnabled, _b = handlers.substituteNode, substituteNode = _b === void 0 ? ts.noEmitSubstitution : _b, onBeforeEmitNode = handlers.onBeforeEmitNode, onAfterEmitNode = handlers.onAfterEmitNode, onBeforeEmitNodeArray = handlers.onBeforeEmitNodeArray, onAfterEmitNodeArray = handlers.onAfterEmitNodeArray, onBeforeEmitToken = handlers.onBeforeEmitToken, onAfterEmitToken = handlers.onAfterEmitToken;
         var extendedDiagnostics = !!printerOptions.extendedDiagnostics;
         var newLine = ts.getNewLineCharacter(printerOptions);
         var moduleKind = ts.getEmitModuleKind(printerOptions);
@@ -82513,9 +88533,11 @@ var ts;
         var detachedCommentsInfo;
         var hasWrittenComment = false;
         var commentsDisabled = !!printerOptions.removeComments;
-        var lastNode;
         var lastSubstitution;
+        var currentParenthesizerRule;
         var _c = ts.performance.createTimerIf(extendedDiagnostics, "commentTime", "beforeComment", "afterComment"), enterComment = _c.enter, exitComment = _c.exit;
+        var parenthesizer = ts.factory.parenthesizer;
+        var emitBinaryExpression = createEmitBinaryExpression();
         reset();
         return {
             printNode: printNode,
@@ -82541,9 +88563,9 @@ var ts;
                     break;
             }
             switch (node.kind) {
-                case 297: return printFile(node);
-                case 298: return printBundle(node);
-                case 299: return printUnparsedSource(node);
+                case 303: return printFile(node);
+                case 304: return printBundle(node);
+                case 305: return printUnparsedSource(node);
             }
             writeNode(hint, node, sourceFile, beginPrint());
             return endPrint();
@@ -82577,7 +88599,7 @@ var ts;
             if (sourceFile) {
                 setSourceFile(sourceFile);
             }
-            emitList(syntheticParent, nodes, format);
+            emitList(undefined, nodes, format);
             reset();
             writer = previousWriter;
         }
@@ -82710,7 +88732,7 @@ var ts;
             if (sourceFile) {
                 setSourceFile(sourceFile);
             }
-            pipelineEmit(hint, node);
+            pipelineEmit(hint, node, undefined);
         }
         function setSourceFile(sourceFile) {
             currentSourceFile = sourceFile;
@@ -82738,51 +88760,54 @@ var ts;
             currentSourceFile = undefined;
             currentLineMap = undefined;
             detachedCommentsInfo = undefined;
-            lastNode = undefined;
-            lastSubstitution = undefined;
             setWriter(undefined, undefined);
         }
         function getCurrentLineMap() {
             return currentLineMap || (currentLineMap = ts.getLineStarts(currentSourceFile));
         }
-        function emit(node) {
+        function emit(node, parenthesizerRule) {
             if (node === undefined)
                 return;
             var prevSourceFileTextKind = recordBundleFileInternalSectionStart(node);
-            var substitute = pipelineEmit(4, node);
+            pipelineEmit(4, node, parenthesizerRule);
             recordBundleFileInternalSectionEnd(prevSourceFileTextKind);
-            return substitute;
         }
         function emitIdentifierName(node) {
             if (node === undefined)
                 return;
-            return pipelineEmit(2, node);
+            pipelineEmit(2, node, undefined);
         }
-        function emitExpression(node) {
+        function emitExpression(node, parenthesizerRule) {
             if (node === undefined)
                 return;
-            return pipelineEmit(1, node);
+            pipelineEmit(1, node, parenthesizerRule);
         }
         function emitJsxAttributeValue(node) {
-            return pipelineEmit(ts.isStringLiteral(node) ? 6 : 4, node);
+            pipelineEmit(ts.isStringLiteral(node) ? 6 : 4, node);
         }
-        function pipelineEmit(emitHint, node) {
-            var savedLastNode = lastNode;
-            var savedLastSubstitution = lastSubstitution;
-            var savedPreserveSourceNewlines = preserveSourceNewlines;
-            lastNode = node;
-            lastSubstitution = undefined;
-            if (preserveSourceNewlines && !!(ts.getEmitFlags(node) & 134217728)) {
+        function beforeEmitNode(node) {
+            if (preserveSourceNewlines && (ts.getEmitFlags(node) & 134217728)) {
                 preserveSourceNewlines = false;
             }
+        }
+        function afterEmitNode(savedPreserveSourceNewlines) {
+            preserveSourceNewlines = savedPreserveSourceNewlines;
+        }
+        function pipelineEmit(emitHint, node, parenthesizerRule) {
+            currentParenthesizerRule = parenthesizerRule;
             var pipelinePhase = getPipelinePhase(0, emitHint, node);
             pipelinePhase(emitHint, node);
-            ts.Debug.assert(lastNode === node);
-            var substitute = lastSubstitution;
-            lastNode = savedLastNode;
-            lastSubstitution = savedLastSubstitution;
-            preserveSourceNewlines = savedPreserveSourceNewlines;
-            return substitute || node;
+            currentParenthesizerRule = undefined;
+        }
+        function shouldEmitComments(node) {
+            return !commentsDisabled && !ts.isSourceFile(node);
+        }
+        function shouldEmitSourceMaps(node) {
+            return !sourceMapsDisabled &&
+                !ts.isSourceFile(node) &&
+                !ts.isInJsonFile(node) &&
+                !ts.isUnparsedSource(node) &&
+                !ts.isUnparsedPrepend(node);
         }
         function getPipelinePhase(phase, emitHint, node) {
             switch (phase) {
@@ -82791,16 +88816,19 @@ var ts;
                         return pipelineEmitWithNotification;
                     }
                 case 1:
-                    if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node)) !== node) {
+                    if (substituteNode !== ts.noEmitSubstitution && (lastSubstitution = substituteNode(emitHint, node) || node) !== node) {
+                        if (currentParenthesizerRule) {
+                            lastSubstitution = currentParenthesizerRule(lastSubstitution);
+                        }
                         return pipelineEmitWithSubstitution;
                     }
                 case 2:
-                    if (!commentsDisabled && node.kind !== 297) {
+                    if (shouldEmitComments(node)) {
                         return pipelineEmitWithComments;
                     }
                 case 3:
-                    if (!sourceMapsDisabled && node.kind !== 297 && !ts.isInJsonFile(node)) {
-                        return pipelineEmitWithSourceMap;
+                    if (shouldEmitSourceMaps(node)) {
+                        return pipelineEmitWithSourceMaps;
                     }
                 case 4:
                     return pipelineEmitWithHint;
@@ -82812,13 +88840,31 @@ var ts;
             return getPipelinePhase(currentPhase + 1, emitHint, node);
         }
         function pipelineEmitWithNotification(hint, node) {
-            ts.Debug.assert(lastNode === node);
             var pipelinePhase = getNextPipelinePhase(0, hint, node);
             onEmitNode(hint, node, pipelinePhase);
-            ts.Debug.assert(lastNode === node);
         }
         function pipelineEmitWithHint(hint, node) {
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
+            onBeforeEmitNode === null || onBeforeEmitNode === void 0 ? void 0 : onBeforeEmitNode(node);
+            if (preserveSourceNewlines) {
+                var savedPreserveSourceNewlines = preserveSourceNewlines;
+                beforeEmitNode(node);
+                pipelineEmitWithHintWorker(hint, node);
+                afterEmitNode(savedPreserveSourceNewlines);
+            }
+            else {
+                pipelineEmitWithHintWorker(hint, node);
+            }
+            onAfterEmitNode === null || onAfterEmitNode === void 0 ? void 0 : onAfterEmitNode(node);
+            currentParenthesizerRule = undefined;
+        }
+        function pipelineEmitWithHintWorker(hint, node, allowSnippets) {
+            if (allowSnippets === void 0) { allowSnippets = true; }
+            if (allowSnippets) {
+                var snippet = ts.getSnippetElement(node);
+                if (snippet) {
+                    return emitSnippetNode(hint, node, snippet);
+                }
+            }
             if (hint === 0)
                 return emitSourceFile(ts.cast(node, ts.isSourceFile));
             if (hint === 2)
@@ -82832,289 +88878,317 @@ var ts;
                 return emitEmptyStatement(true);
             }
             if (hint === 4) {
-                if (ts.isKeyword(node.kind))
-                    return writeTokenNode(node, writeKeyword);
                 switch (node.kind) {
                     case 15:
                     case 16:
                     case 17:
                         return emitLiteral(node, false);
-                    case 299:
-                    case 293:
-                        return emitUnparsedSourceOrPrepend(node);
-                    case 292:
-                        return writeUnparsedNode(node);
-                    case 294:
-                    case 295:
-                        return emitUnparsedTextLike(node);
-                    case 296:
-                        return emitUnparsedSyntheticReference(node);
-                    case 78:
-                        return emitIdentifier(node);
                     case 79:
+                        return emitIdentifier(node);
+                    case 80:
                         return emitPrivateIdentifier(node);
-                    case 157:
+                    case 160:
                         return emitQualifiedName(node);
-                    case 158:
+                    case 161:
                         return emitComputedPropertyName(node);
-                    case 159:
+                    case 162:
                         return emitTypeParameter(node);
-                    case 160:
+                    case 163:
                         return emitParameter(node);
-                    case 161:
+                    case 164:
                         return emitDecorator(node);
-                    case 162:
+                    case 165:
                         return emitPropertySignature(node);
-                    case 163:
+                    case 166:
                         return emitPropertyDeclaration(node);
-                    case 164:
+                    case 167:
                         return emitMethodSignature(node);
-                    case 165:
+                    case 168:
                         return emitMethodDeclaration(node);
-                    case 166:
+                    case 169:
+                        return emitClassStaticBlockDeclaration(node);
+                    case 170:
                         return emitConstructor(node);
-                    case 167:
-                    case 168:
+                    case 171:
+                    case 172:
                         return emitAccessorDeclaration(node);
-                    case 169:
+                    case 173:
                         return emitCallSignature(node);
-                    case 170:
+                    case 174:
                         return emitConstructSignature(node);
-                    case 171:
+                    case 175:
                         return emitIndexSignature(node);
-                    case 194:
-                        return emitTemplateTypeSpan(node);
-                    case 172:
+                    case 176:
                         return emitTypePredicate(node);
-                    case 173:
+                    case 177:
                         return emitTypeReference(node);
-                    case 174:
+                    case 178:
                         return emitFunctionType(node);
-                    case 308:
-                        return emitJSDocFunctionType(node);
-                    case 175:
+                    case 179:
                         return emitConstructorType(node);
-                    case 176:
+                    case 180:
                         return emitTypeQuery(node);
-                    case 177:
+                    case 181:
                         return emitTypeLiteral(node);
-                    case 178:
+                    case 182:
                         return emitArrayType(node);
-                    case 179:
+                    case 183:
                         return emitTupleType(node);
-                    case 180:
+                    case 184:
                         return emitOptionalType(node);
-                    case 182:
+                    case 186:
                         return emitUnionType(node);
-                    case 183:
+                    case 187:
                         return emitIntersectionType(node);
-                    case 184:
+                    case 188:
                         return emitConditionalType(node);
-                    case 185:
+                    case 189:
                         return emitInferType(node);
-                    case 186:
+                    case 190:
                         return emitParenthesizedType(node);
-                    case 223:
+                    case 227:
                         return emitExpressionWithTypeArguments(node);
-                    case 187:
+                    case 191:
                         return emitThisType();
-                    case 188:
+                    case 192:
                         return emitTypeOperator(node);
-                    case 189:
+                    case 193:
                         return emitIndexedAccessType(node);
-                    case 190:
+                    case 194:
                         return emitMappedType(node);
-                    case 191:
+                    case 195:
                         return emitLiteralType(node);
-                    case 193:
+                    case 196:
+                        return emitNamedTupleMember(node);
+                    case 197:
                         return emitTemplateType(node);
-                    case 195:
+                    case 198:
+                        return emitTemplateTypeSpan(node);
+                    case 199:
                         return emitImportTypeNode(node);
-                    case 303:
-                        writePunctuation("*");
-                        return;
-                    case 304:
-                        writePunctuation("?");
-                        return;
-                    case 305:
-                        return emitJSDocNullableType(node);
-                    case 306:
-                        return emitJSDocNonNullableType(node);
-                    case 307:
-                        return emitJSDocOptionalType(node);
-                    case 181:
-                    case 309:
-                        return emitRestOrJSDocVariadicType(node);
-                    case 192:
-                        return emitNamedTupleMember(node);
-                    case 196:
+                    case 200:
                         return emitObjectBindingPattern(node);
-                    case 197:
+                    case 201:
                         return emitArrayBindingPattern(node);
-                    case 198:
+                    case 202:
                         return emitBindingElement(node);
-                    case 228:
+                    case 232:
                         return emitTemplateSpan(node);
-                    case 229:
+                    case 233:
                         return emitSemicolonClassElement();
-                    case 230:
+                    case 234:
                         return emitBlock(node);
-                    case 232:
+                    case 236:
                         return emitVariableStatement(node);
-                    case 231:
+                    case 235:
                         return emitEmptyStatement(false);
-                    case 233:
+                    case 237:
                         return emitExpressionStatement(node);
-                    case 234:
+                    case 238:
                         return emitIfStatement(node);
-                    case 235:
+                    case 239:
                         return emitDoStatement(node);
-                    case 236:
+                    case 240:
                         return emitWhileStatement(node);
-                    case 237:
+                    case 241:
                         return emitForStatement(node);
-                    case 238:
+                    case 242:
                         return emitForInStatement(node);
-                    case 239:
+                    case 243:
                         return emitForOfStatement(node);
-                    case 240:
+                    case 244:
                         return emitContinueStatement(node);
-                    case 241:
+                    case 245:
                         return emitBreakStatement(node);
-                    case 242:
+                    case 246:
                         return emitReturnStatement(node);
-                    case 243:
+                    case 247:
                         return emitWithStatement(node);
-                    case 244:
+                    case 248:
                         return emitSwitchStatement(node);
-                    case 245:
+                    case 249:
                         return emitLabeledStatement(node);
-                    case 246:
+                    case 250:
                         return emitThrowStatement(node);
-                    case 247:
+                    case 251:
                         return emitTryStatement(node);
-                    case 248:
+                    case 252:
                         return emitDebuggerStatement(node);
-                    case 249:
+                    case 253:
                         return emitVariableDeclaration(node);
-                    case 250:
+                    case 254:
                         return emitVariableDeclarationList(node);
-                    case 251:
+                    case 255:
                         return emitFunctionDeclaration(node);
-                    case 252:
+                    case 256:
                         return emitClassDeclaration(node);
-                    case 253:
+                    case 257:
                         return emitInterfaceDeclaration(node);
-                    case 254:
+                    case 258:
                         return emitTypeAliasDeclaration(node);
-                    case 255:
+                    case 259:
                         return emitEnumDeclaration(node);
-                    case 256:
+                    case 260:
                         return emitModuleDeclaration(node);
-                    case 257:
+                    case 261:
                         return emitModuleBlock(node);
-                    case 258:
+                    case 262:
                         return emitCaseBlock(node);
-                    case 259:
+                    case 263:
                         return emitNamespaceExportDeclaration(node);
-                    case 260:
+                    case 264:
                         return emitImportEqualsDeclaration(node);
-                    case 261:
+                    case 265:
                         return emitImportDeclaration(node);
-                    case 262:
+                    case 266:
                         return emitImportClause(node);
-                    case 263:
+                    case 267:
                         return emitNamespaceImport(node);
-                    case 269:
+                    case 273:
                         return emitNamespaceExport(node);
-                    case 264:
+                    case 268:
                         return emitNamedImports(node);
-                    case 265:
+                    case 269:
                         return emitImportSpecifier(node);
-                    case 266:
+                    case 270:
                         return emitExportAssignment(node);
-                    case 267:
+                    case 271:
                         return emitExportDeclaration(node);
-                    case 268:
+                    case 272:
                         return emitNamedExports(node);
-                    case 270:
+                    case 274:
                         return emitExportSpecifier(node);
-                    case 271:
+                    case 292:
+                        return emitAssertClause(node);
+                    case 293:
+                        return emitAssertEntry(node);
+                    case 275:
                         return;
-                    case 272:
+                    case 276:
                         return emitExternalModuleReference(node);
                     case 11:
                         return emitJsxText(node);
-                    case 275:
-                    case 278:
-                        return emitJsxOpeningElementOrFragment(node);
-                    case 276:
                     case 279:
-                        return emitJsxClosingElementOrFragment(node);
+                    case 282:
+                        return emitJsxOpeningElementOrFragment(node);
                     case 280:
+                    case 283:
+                        return emitJsxClosingElementOrFragment(node);
+                    case 284:
                         return emitJsxAttribute(node);
-                    case 281:
+                    case 285:
                         return emitJsxAttributes(node);
-                    case 282:
+                    case 286:
                         return emitJsxSpreadAttribute(node);
-                    case 283:
+                    case 287:
                         return emitJsxExpression(node);
-                    case 284:
+                    case 288:
                         return emitCaseClause(node);
-                    case 285:
+                    case 289:
                         return emitDefaultClause(node);
-                    case 286:
+                    case 290:
                         return emitHeritageClause(node);
-                    case 287:
+                    case 291:
                         return emitCatchClause(node);
-                    case 288:
+                    case 294:
                         return emitPropertyAssignment(node);
-                    case 289:
+                    case 295:
                         return emitShorthandPropertyAssignment(node);
-                    case 290:
+                    case 296:
                         return emitSpreadAssignment(node);
-                    case 291:
+                    case 297:
                         return emitEnumMember(node);
+                    case 298:
+                        return writeUnparsedNode(node);
+                    case 305:
+                    case 299:
+                        return emitUnparsedSourceOrPrepend(node);
+                    case 300:
+                    case 301:
+                        return emitUnparsedTextLike(node);
+                    case 302:
+                        return emitUnparsedSyntheticReference(node);
+                    case 303:
+                        return emitSourceFile(node);
+                    case 304:
+                        return ts.Debug.fail("Bundles should be printed using printBundle");
+                    case 306:
+                        return ts.Debug.fail("InputFiles should not be printed");
+                    case 307:
+                        return emitJSDocTypeExpression(node);
+                    case 308:
+                        return emitJSDocNameReference(node);
+                    case 310:
+                        return writePunctuation("*");
+                    case 311:
+                        return writePunctuation("?");
+                    case 312:
+                        return emitJSDocNullableType(node);
+                    case 313:
+                        return emitJSDocNonNullableType(node);
+                    case 314:
+                        return emitJSDocOptionalType(node);
+                    case 315:
+                        return emitJSDocFunctionType(node);
+                    case 185:
+                    case 316:
+                        return emitRestOrJSDocVariadicType(node);
+                    case 317:
+                        return;
+                    case 318:
+                        return emitJSDoc(node);
+                    case 320:
+                        return emitJSDocTypeLiteral(node);
+                    case 321:
+                        return emitJSDocSignature(node);
+                    case 325:
+                    case 330:
+                        return emitJSDocSimpleTag(node);
                     case 326:
-                    case 333:
-                        return emitJSDocPropertyLikeTag(node);
                     case 327:
-                    case 329:
+                        return emitJSDocHeritageTag(node);
                     case 328:
-                    case 325:
+                    case 329:
+                        return;
+                    case 331:
+                    case 332:
+                    case 333:
+                    case 334:
+                    case 335:
+                        return;
+                    case 336:
+                        return emitJSDocCallbackTag(node);
+                    case 338:
+                    case 345:
+                        return emitJSDocPropertyLikeTag(node);
+                    case 337:
+                    case 339:
+                    case 340:
+                    case 341:
                         return emitJSDocSimpleTypedTag(node);
-                    case 316:
-                    case 315:
-                        return emitJSDocHeritageTag(node);
-                    case 330:
+                    case 342:
                         return emitJSDocTemplateTag(node);
-                    case 331:
+                    case 343:
                         return emitJSDocTypedefTag(node);
-                    case 324:
-                        return emitJSDocCallbackTag(node);
-                    case 313:
-                        return emitJSDocSignature(node);
-                    case 312:
-                        return emitJSDocTypeLiteral(node);
-                    case 319:
-                    case 314:
-                        return emitJSDocSimpleTag(node);
-                    case 332:
+                    case 344:
                         return emitJSDocSeeTag(node);
-                    case 302:
-                        return emitJSDocNameReference(node);
-                    case 311:
-                        return emitJSDoc(node);
+                    case 347:
+                    case 351:
+                    case 350:
+                        return;
                 }
                 if (ts.isExpression(node)) {
                     hint = 1;
                     if (substituteNode !== ts.noEmitSubstitution) {
-                        lastSubstitution = node = substituteNode(hint, node);
+                        var substitute = substituteNode(hint, node) || node;
+                        if (substitute !== node) {
+                            node = substitute;
+                            if (currentParenthesizerRule) {
+                                node = currentParenthesizerRule(node);
+                            }
+                        }
                     }
                 }
-                else if (ts.isToken(node)) {
-                    return writeTokenNode(node, writePunctuation);
-                }
             }
             if (hint === 1) {
                 switch (node.kind) {
@@ -83125,82 +89199,92 @@ var ts;
                     case 13:
                     case 14:
                         return emitLiteral(node, false);
-                    case 78:
+                    case 79:
                         return emitIdentifier(node);
-                    case 94:
-                    case 103:
-                    case 105:
-                    case 109:
-                    case 107:
-                    case 99:
-                        writeTokenNode(node, writeKeyword);
-                        return;
-                    case 199:
+                    case 80:
+                        return emitPrivateIdentifier(node);
+                    case 203:
                         return emitArrayLiteralExpression(node);
-                    case 200:
+                    case 204:
                         return emitObjectLiteralExpression(node);
-                    case 201:
+                    case 205:
                         return emitPropertyAccessExpression(node);
-                    case 202:
+                    case 206:
                         return emitElementAccessExpression(node);
-                    case 203:
+                    case 207:
                         return emitCallExpression(node);
-                    case 204:
+                    case 208:
                         return emitNewExpression(node);
-                    case 205:
+                    case 209:
                         return emitTaggedTemplateExpression(node);
-                    case 206:
+                    case 210:
                         return emitTypeAssertionExpression(node);
-                    case 207:
+                    case 211:
                         return emitParenthesizedExpression(node);
-                    case 208:
+                    case 212:
                         return emitFunctionExpression(node);
-                    case 209:
+                    case 213:
                         return emitArrowFunction(node);
-                    case 210:
+                    case 214:
                         return emitDeleteExpression(node);
-                    case 211:
+                    case 215:
                         return emitTypeOfExpression(node);
-                    case 212:
+                    case 216:
                         return emitVoidExpression(node);
-                    case 213:
+                    case 217:
                         return emitAwaitExpression(node);
-                    case 214:
+                    case 218:
                         return emitPrefixUnaryExpression(node);
-                    case 215:
+                    case 219:
                         return emitPostfixUnaryExpression(node);
-                    case 216:
+                    case 220:
                         return emitBinaryExpression(node);
-                    case 217:
+                    case 221:
                         return emitConditionalExpression(node);
-                    case 218:
+                    case 222:
                         return emitTemplateExpression(node);
-                    case 219:
+                    case 223:
                         return emitYieldExpression(node);
-                    case 220:
-                        return emitSpreadExpression(node);
-                    case 221:
+                    case 224:
+                        return emitSpreadElement(node);
+                    case 225:
                         return emitClassExpression(node);
-                    case 222:
+                    case 226:
                         return;
-                    case 224:
+                    case 228:
                         return emitAsExpression(node);
-                    case 225:
+                    case 229:
                         return emitNonNullExpression(node);
-                    case 226:
+                    case 230:
                         return emitMetaProperty(node);
-                    case 273:
+                    case 231:
+                        return ts.Debug.fail("SyntheticExpression should never be printed.");
+                    case 277:
                         return emitJsxElement(node);
-                    case 274:
+                    case 278:
                         return emitJsxSelfClosingElement(node);
-                    case 277:
+                    case 281:
                         return emitJsxFragment(node);
-                    case 336:
+                    case 346:
+                        return ts.Debug.fail("SyntaxList should not be printed");
+                    case 347:
+                        return;
+                    case 348:
                         return emitPartiallyEmittedExpression(node);
-                    case 337:
+                    case 349:
                         return emitCommaList(node);
+                    case 350:
+                    case 351:
+                        return;
+                    case 352:
+                        return ts.Debug.fail("SyntheticReferenceExpression should not be printed");
                 }
             }
+            if (ts.isKeyword(node.kind))
+                return writeTokenNode(node, writeKeyword);
+            if (ts.isTokenKind(node.kind))
+                return writeTokenNode(node, writePunctuation);
+            ts.Debug.fail("Unhandled SyntaxKind: ".concat(ts.Debug.formatSyntaxKind(node.kind), "."));
         }
         function emitMappedTypeParameter(node) {
             emit(node.name);
@@ -83210,10 +89294,11 @@ var ts;
             emit(node.constraint);
         }
         function pipelineEmitWithSubstitution(hint, node) {
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
             var pipelinePhase = getNextPipelinePhase(1, hint, node);
-            pipelinePhase(hint, lastSubstitution);
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
+            ts.Debug.assertIsDefined(lastSubstitution);
+            node = lastSubstitution;
+            lastSubstitution = undefined;
+            pipelinePhase(hint, node);
         }
         function getHelpersFromBundledSourceFiles(bundle) {
             var result;
@@ -83239,7 +89324,7 @@ var ts;
         }
         function emitHelpers(node) {
             var helpersEmitted = false;
-            var bundle = node.kind === 298 ? node : undefined;
+            var bundle = node.kind === 304 ? node : undefined;
             if (bundle && moduleKind === ts.ModuleKind.None) {
                 return;
             }
@@ -83313,7 +89398,7 @@ var ts;
             var pos = getTextPosWithWriteLine();
             writeUnparsedNode(unparsed);
             if (bundleFileInfo) {
-                updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 294 ?
+                updateOrPushBundleFileTextLike(pos, writer.getTextPos(), unparsed.kind === 300 ?
                     "text" :
                     "internal");
             }
@@ -83328,6 +89413,24 @@ var ts;
                 bundleFileInfo.sections.push(section);
             }
         }
+        function emitSnippetNode(hint, node, snippet) {
+            switch (snippet.kind) {
+                case 1:
+                    emitPlaceholder(hint, node, snippet);
+                    break;
+                case 0:
+                    emitTabStop(snippet);
+                    break;
+            }
+        }
+        function emitPlaceholder(hint, node, snippet) {
+            nonEscapingWrite("${".concat(snippet.order, ":"));
+            pipelineEmitWithHintWorker(hint, node, false);
+            nonEscapingWrite("}");
+        }
+        function emitTabStop(snippet) {
+            nonEscapingWrite("$".concat(snippet.order));
+        }
         function emitIdentifier(node) {
             var writeText = node.symbol ? writeSymbol : write;
             writeText(getTextOfNode(node, false), node.symbol);
@@ -83343,7 +89446,7 @@ var ts;
             emit(node.right);
         }
         function emitEntityName(node) {
-            if (node.kind === 78) {
+            if (node.kind === 79) {
                 emitExpression(node);
             }
             else {
@@ -83352,7 +89455,7 @@ var ts;
         }
         function emitComputedPropertyName(node) {
             writePunctuation("[");
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfComputedPropertyName);
             writePunctuation("]");
         }
         function emitTypeParameter(node) {
@@ -83376,17 +89479,17 @@ var ts;
             emit(node.dotDotDotToken);
             emitNodeWithWriter(node.name, writeParameter);
             emit(node.questionToken);
-            if (node.parent && node.parent.kind === 308 && !node.name) {
+            if (node.parent && node.parent.kind === 315 && !node.name) {
                 emit(node.type);
             }
             else {
                 emitTypeAnnotation(node.type);
             }
-            emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name ? node.name.end : node.modifiers ? node.modifiers.end : node.decorators ? node.decorators.end : node.pos, node);
+            emitInitializer(node.initializer, node.type ? node.type.end : node.questionToken ? node.questionToken.end : node.name ? node.name.end : node.modifiers ? node.modifiers.end : node.decorators ? node.decorators.end : node.pos, node, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitDecorator(decorator) {
             writePunctuation("@");
-            emitExpression(decorator.expression);
+            emitExpression(decorator.expression, parenthesizer.parenthesizeLeftSideOfAccess);
         }
         function emitPropertySignature(node) {
             emitDecorators(node, node.decorators);
@@ -83426,6 +89529,12 @@ var ts;
             emit(node.questionToken);
             emitSignatureAndBody(node, emitSignatureHead);
         }
+        function emitClassStaticBlockDeclaration(node) {
+            emitDecorators(node, node.decorators);
+            emitModifiers(node, node.modifiers);
+            writeKeyword("static");
+            emitBlockFunctionBody(node.body);
+        }
         function emitConstructor(node) {
             emitModifiers(node, node.modifiers);
             writeKeyword("constructor");
@@ -83434,7 +89543,7 @@ var ts;
         function emitAccessorDeclaration(node) {
             emitDecorators(node, node.decorators);
             emitModifiers(node, node.modifiers);
-            writeKeyword(node.kind === 167 ? "get" : "set");
+            writeKeyword(node.kind === 171 ? "get" : "set");
             writeSpace();
             emit(node.name);
             emitSignatureAndBody(node, emitSignatureHead);
@@ -83545,7 +89654,7 @@ var ts;
             writePunctuation("}");
         }
         function emitArrayType(node) {
-            emit(node.elementType);
+            emit(node.elementType, parenthesizer.parenthesizeElementTypeOfArrayType);
             writePunctuation("[");
             writePunctuation("]");
         }
@@ -83568,21 +89677,21 @@ var ts;
             emit(node.type);
         }
         function emitOptionalType(node) {
-            emit(node.type);
+            emit(node.type, parenthesizer.parenthesizeElementTypeOfArrayType);
             writePunctuation("?");
         }
         function emitUnionType(node) {
-            emitList(node, node.types, 516);
+            emitList(node, node.types, 516, parenthesizer.parenthesizeMemberOfElementType);
         }
         function emitIntersectionType(node) {
-            emitList(node, node.types, 520);
+            emitList(node, node.types, 520, parenthesizer.parenthesizeMemberOfElementType);
         }
         function emitConditionalType(node) {
-            emit(node.checkType);
+            emit(node.checkType, parenthesizer.parenthesizeMemberOfConditionalType);
             writeSpace();
             writeKeyword("extends");
             writeSpace();
-            emit(node.extendsType);
+            emit(node.extendsType, parenthesizer.parenthesizeMemberOfConditionalType);
             writeSpace();
             writePunctuation("?");
             writeSpace();
@@ -83608,10 +89717,10 @@ var ts;
         function emitTypeOperator(node) {
             writeTokenText(node.operator, writeKeyword);
             writeSpace();
-            emit(node.type);
+            emit(node.type, parenthesizer.parenthesizeMemberOfElementType);
         }
         function emitIndexedAccessType(node) {
-            emit(node.objectType);
+            emit(node.objectType, parenthesizer.parenthesizeMemberOfElementType);
             writePunctuation("[");
             emit(node.indexType);
             writePunctuation("]");
@@ -83628,7 +89737,7 @@ var ts;
             }
             if (node.readonlyToken) {
                 emit(node.readonlyToken);
-                if (node.readonlyToken.kind !== 142) {
+                if (node.readonlyToken.kind !== 144) {
                     writeKeyword("readonly");
                 }
                 writeSpace();
@@ -83701,12 +89810,12 @@ var ts;
                 writeSpace();
             }
             emit(node.name);
-            emitInitializer(node.initializer, node.name.end, node);
+            emitInitializer(node.initializer, node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitArrayLiteralExpression(node) {
             var elements = node.elements;
             var preferNewLine = node.multiLine ? 65536 : 0;
-            emitExpressionList(node, elements, 8914 | preferNewLine);
+            emitExpressionList(node, elements, 8914 | preferNewLine, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitObjectLiteralExpression(node) {
             ts.forEach(node.properties, generateMemberNames);
@@ -83722,13 +89831,13 @@ var ts;
             }
         }
         function emitPropertyAccessExpression(node) {
-            var expression = ts.cast(emitExpression(node.expression), ts.isExpression);
+            emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
             var token = node.questionDotToken || ts.setTextRangePosEnd(ts.factory.createToken(24), node.expression.end, node.name.pos);
             var linesBeforeDot = getLinesBetweenNodes(node, node.expression, token);
             var linesAfterDot = getLinesBetweenNodes(node, token, node.name);
             writeLinesAndIndent(linesBeforeDot, false);
             var shouldEmitDotDot = token.kind !== 28 &&
-                mayNeedDotDotForPropertyAccess(expression) &&
+                mayNeedDotDotForPropertyAccess(node.expression) &&
                 !writer.hasTrailingComment() &&
                 !writer.hasTrailingWhitespace();
             if (shouldEmitDotDot) {
@@ -83757,27 +89866,47 @@ var ts;
             }
         }
         function emitElementAccessExpression(node) {
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
             emit(node.questionDotToken);
             emitTokenWithComment(22, node.expression.end, writePunctuation, node);
             emitExpression(node.argumentExpression);
             emitTokenWithComment(23, node.argumentExpression.end, writePunctuation, node);
         }
         function emitCallExpression(node) {
-            emitExpression(node.expression);
+            var indirectCall = ts.getEmitFlags(node) & 536870912;
+            if (indirectCall) {
+                writePunctuation("(");
+                writeLiteral("0");
+                writePunctuation(",");
+                writeSpace();
+            }
+            emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
+            if (indirectCall) {
+                writePunctuation(")");
+            }
             emit(node.questionDotToken);
             emitTypeArguments(node, node.typeArguments);
-            emitExpressionList(node, node.arguments, 2576);
+            emitExpressionList(node, node.arguments, 2576, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitNewExpression(node) {
-            emitTokenWithComment(102, node.pos, writeKeyword, node);
+            emitTokenWithComment(103, node.pos, writeKeyword, node);
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfNew);
             emitTypeArguments(node, node.typeArguments);
-            emitExpressionList(node, node.arguments, 18960);
+            emitExpressionList(node, node.arguments, 18960, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitTaggedTemplateExpression(node) {
-            emitExpression(node.tag);
+            var indirectCall = ts.getEmitFlags(node) & 536870912;
+            if (indirectCall) {
+                writePunctuation("(");
+                writeLiteral("0");
+                writePunctuation(",");
+                writeSpace();
+            }
+            emitExpression(node.tag, parenthesizer.parenthesizeLeftSideOfAccess);
+            if (indirectCall) {
+                writePunctuation(")");
+            }
             emitTypeArguments(node, node.typeArguments);
             writeSpace();
             emitExpression(node.template);
@@ -83786,12 +89915,12 @@ var ts;
             writePunctuation("<");
             emit(node.type);
             writePunctuation(">");
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);
         }
         function emitParenthesizedExpression(node) {
             var openParenPos = emitTokenWithComment(20, node.pos, writePunctuation, node);
             var indented = writeLineSeparatorsAndIndentBefore(node.expression, node);
-            emitExpression(node.expression);
+            emitExpression(node.expression, undefined);
             writeLineSeparatorsAfter(node.expression, node);
             decreaseIndentIf(indented);
             emitTokenWithComment(21, node.expression ? node.expression.end : openParenPos, writePunctuation, node);
@@ -83813,93 +89942,129 @@ var ts;
             emit(node.equalsGreaterThanToken);
         }
         function emitDeleteExpression(node) {
-            emitTokenWithComment(88, node.pos, writeKeyword, node);
+            emitTokenWithComment(89, node.pos, writeKeyword, node);
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);
         }
         function emitTypeOfExpression(node) {
-            emitTokenWithComment(111, node.pos, writeKeyword, node);
+            emitTokenWithComment(112, node.pos, writeKeyword, node);
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);
         }
         function emitVoidExpression(node) {
-            emitTokenWithComment(113, node.pos, writeKeyword, node);
+            emitTokenWithComment(114, node.pos, writeKeyword, node);
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);
         }
         function emitAwaitExpression(node) {
-            emitTokenWithComment(130, node.pos, writeKeyword, node);
+            emitTokenWithComment(132, node.pos, writeKeyword, node);
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeOperandOfPrefixUnary);
         }
         function emitPrefixUnaryExpression(node) {
             writeTokenText(node.operator, writeOperator);
             if (shouldEmitWhitespaceBeforeOperand(node)) {
                 writeSpace();
             }
-            emitExpression(node.operand);
+            emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPrefixUnary);
         }
         function shouldEmitWhitespaceBeforeOperand(node) {
             var operand = node.operand;
-            return operand.kind === 214
+            return operand.kind === 218
                 && ((node.operator === 39 && (operand.operator === 39 || operand.operator === 45))
                     || (node.operator === 40 && (operand.operator === 40 || operand.operator === 46)));
         }
         function emitPostfixUnaryExpression(node) {
-            emitExpression(node.operand);
+            emitExpression(node.operand, parenthesizer.parenthesizeOperandOfPostfixUnary);
             writeTokenText(node.operator, writeOperator);
         }
-        function emitBinaryExpression(node) {
-            var nodeStack = [node];
-            var stateStack = [0];
-            var stackIndex = 0;
-            while (stackIndex >= 0) {
-                node = nodeStack[stackIndex];
-                switch (stateStack[stackIndex]) {
-                    case 0: {
-                        maybePipelineEmitExpression(node.left);
-                        break;
-                    }
-                    case 1: {
-                        var isCommaOperator = node.operatorToken.kind !== 27;
-                        var linesBeforeOperator = getLinesBetweenNodes(node, node.left, node.operatorToken);
-                        var linesAfterOperator = getLinesBetweenNodes(node, node.operatorToken, node.right);
-                        writeLinesAndIndent(linesBeforeOperator, isCommaOperator);
-                        emitLeadingCommentsOfPosition(node.operatorToken.pos);
-                        writeTokenNode(node.operatorToken, node.operatorToken.kind === 100 ? writeKeyword : writeOperator);
-                        emitTrailingCommentsOfPosition(node.operatorToken.end, true);
-                        writeLinesAndIndent(linesAfterOperator, true);
-                        maybePipelineEmitExpression(node.right);
-                        break;
-                    }
-                    case 2: {
-                        var linesBeforeOperator = getLinesBetweenNodes(node, node.left, node.operatorToken);
-                        var linesAfterOperator = getLinesBetweenNodes(node, node.operatorToken, node.right);
-                        decreaseIndentIf(linesBeforeOperator, linesAfterOperator);
-                        stackIndex--;
-                        break;
-                    }
-                    default: return ts.Debug.fail("Invalid state " + stateStack[stackIndex] + " for emitBinaryExpressionWorker");
+        function createEmitBinaryExpression() {
+            return ts.createBinaryExpressionTrampoline(onEnter, onLeft, onOperator, onRight, onExit, undefined);
+            function onEnter(node, state) {
+                if (state) {
+                    state.stackIndex++;
+                    state.preserveSourceNewlinesStack[state.stackIndex] = preserveSourceNewlines;
+                    state.containerPosStack[state.stackIndex] = containerPos;
+                    state.containerEndStack[state.stackIndex] = containerEnd;
+                    state.declarationListContainerEndStack[state.stackIndex] = declarationListContainerEnd;
+                    var emitComments_1 = state.shouldEmitCommentsStack[state.stackIndex] = shouldEmitComments(node);
+                    var emitSourceMaps = state.shouldEmitSourceMapsStack[state.stackIndex] = shouldEmitSourceMaps(node);
+                    onBeforeEmitNode === null || onBeforeEmitNode === void 0 ? void 0 : onBeforeEmitNode(node);
+                    if (emitComments_1)
+                        emitCommentsBeforeNode(node);
+                    if (emitSourceMaps)
+                        emitSourceMapsBeforeNode(node);
+                    beforeEmitNode(node);
                 }
-            }
-            function maybePipelineEmitExpression(next) {
-                stateStack[stackIndex]++;
-                var savedLastNode = lastNode;
-                var savedLastSubstitution = lastSubstitution;
-                lastNode = next;
-                lastSubstitution = undefined;
+                else {
+                    state = {
+                        stackIndex: 0,
+                        preserveSourceNewlinesStack: [undefined],
+                        containerPosStack: [-1],
+                        containerEndStack: [-1],
+                        declarationListContainerEndStack: [-1],
+                        shouldEmitCommentsStack: [false],
+                        shouldEmitSourceMapsStack: [false],
+                    };
+                }
+                return state;
+            }
+            function onLeft(next, _workArea, parent) {
+                return maybeEmitExpression(next, parent, "left");
+            }
+            function onOperator(operatorToken, _state, node) {
+                var isCommaOperator = operatorToken.kind !== 27;
+                var linesBeforeOperator = getLinesBetweenNodes(node, node.left, operatorToken);
+                var linesAfterOperator = getLinesBetweenNodes(node, operatorToken, node.right);
+                writeLinesAndIndent(linesBeforeOperator, isCommaOperator);
+                emitLeadingCommentsOfPosition(operatorToken.pos);
+                writeTokenNode(operatorToken, operatorToken.kind === 101 ? writeKeyword : writeOperator);
+                emitTrailingCommentsOfPosition(operatorToken.end, true);
+                writeLinesAndIndent(linesAfterOperator, true);
+            }
+            function onRight(next, _workArea, parent) {
+                return maybeEmitExpression(next, parent, "right");
+            }
+            function onExit(node, state) {
+                var linesBeforeOperator = getLinesBetweenNodes(node, node.left, node.operatorToken);
+                var linesAfterOperator = getLinesBetweenNodes(node, node.operatorToken, node.right);
+                decreaseIndentIf(linesBeforeOperator, linesAfterOperator);
+                if (state.stackIndex > 0) {
+                    var savedPreserveSourceNewlines = state.preserveSourceNewlinesStack[state.stackIndex];
+                    var savedContainerPos = state.containerPosStack[state.stackIndex];
+                    var savedContainerEnd = state.containerEndStack[state.stackIndex];
+                    var savedDeclarationListContainerEnd = state.declarationListContainerEndStack[state.stackIndex];
+                    var shouldEmitComments_1 = state.shouldEmitCommentsStack[state.stackIndex];
+                    var shouldEmitSourceMaps_1 = state.shouldEmitSourceMapsStack[state.stackIndex];
+                    afterEmitNode(savedPreserveSourceNewlines);
+                    if (shouldEmitSourceMaps_1)
+                        emitSourceMapsAfterNode(node);
+                    if (shouldEmitComments_1)
+                        emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);
+                    onAfterEmitNode === null || onAfterEmitNode === void 0 ? void 0 : onAfterEmitNode(node);
+                    state.stackIndex--;
+                }
+            }
+            function maybeEmitExpression(next, parent, side) {
+                var parenthesizerRule = side === "left" ?
+                    parenthesizer.getParenthesizeLeftSideOfBinaryForOperator(parent.operatorToken.kind) :
+                    parenthesizer.getParenthesizeRightSideOfBinaryForOperator(parent.operatorToken.kind);
                 var pipelinePhase = getPipelinePhase(0, 1, next);
-                if (pipelinePhase === pipelineEmitWithHint && ts.isBinaryExpression(next)) {
-                    stackIndex++;
-                    stateStack[stackIndex] = 0;
-                    nodeStack[stackIndex] = next;
+                if (pipelinePhase === pipelineEmitWithSubstitution) {
+                    ts.Debug.assertIsDefined(lastSubstitution);
+                    next = parenthesizerRule(ts.cast(lastSubstitution, ts.isExpression));
+                    pipelinePhase = getNextPipelinePhase(1, 1, next);
+                    lastSubstitution = undefined;
                 }
-                else {
-                    pipelinePhase(1, next);
+                if (pipelinePhase === pipelineEmitWithComments ||
+                    pipelinePhase === pipelineEmitWithSourceMaps ||
+                    pipelinePhase === pipelineEmitWithHint) {
+                    if (ts.isBinaryExpression(next)) {
+                        return next;
+                    }
                 }
-                ts.Debug.assert(lastNode === next);
-                lastNode = savedLastNode;
-                lastSubstitution = savedLastSubstitution;
+                currentParenthesizerRule = parenthesizerRule;
+                pipelinePhase(1, next);
             }
         }
         function emitConditionalExpression(node) {
@@ -83907,16 +90072,16 @@ var ts;
             var linesAfterQuestion = getLinesBetweenNodes(node, node.questionToken, node.whenTrue);
             var linesBeforeColon = getLinesBetweenNodes(node, node.whenTrue, node.colonToken);
             var linesAfterColon = getLinesBetweenNodes(node, node.colonToken, node.whenFalse);
-            emitExpression(node.condition);
+            emitExpression(node.condition, parenthesizer.parenthesizeConditionOfConditionalExpression);
             writeLinesAndIndent(linesBeforeQuestion, true);
             emit(node.questionToken);
             writeLinesAndIndent(linesAfterQuestion, true);
-            emitExpression(node.whenTrue);
+            emitExpression(node.whenTrue, parenthesizer.parenthesizeBranchOfConditionalExpression);
             decreaseIndentIf(linesBeforeQuestion, linesAfterQuestion);
             writeLinesAndIndent(linesBeforeColon, true);
             emit(node.colonToken);
             writeLinesAndIndent(linesAfterColon, true);
-            emitExpression(node.whenFalse);
+            emitExpression(node.whenFalse, parenthesizer.parenthesizeBranchOfConditionalExpression);
             decreaseIndentIf(linesBeforeColon, linesAfterColon);
         }
         function emitTemplateExpression(node) {
@@ -83924,24 +90089,24 @@ var ts;
             emitList(node, node.templateSpans, 262144);
         }
         function emitYieldExpression(node) {
-            emitTokenWithComment(124, node.pos, writeKeyword, node);
+            emitTokenWithComment(125, node.pos, writeKeyword, node);
             emit(node.asteriskToken);
-            emitExpressionWithLeadingSpace(node.expression);
+            emitExpressionWithLeadingSpace(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
-        function emitSpreadExpression(node) {
+        function emitSpreadElement(node) {
             emitTokenWithComment(25, node.pos, writePunctuation, node);
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitClassExpression(node) {
             generateNameIfNeeded(node.name);
             emitClassDeclarationOrExpression(node);
         }
         function emitExpressionWithTypeArguments(node) {
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
             emitTypeArguments(node, node.typeArguments);
         }
         function emitAsExpression(node) {
-            emitExpression(node.expression);
+            emitExpression(node.expression, undefined);
             if (node.type) {
                 writeSpace();
                 writeKeyword("as");
@@ -83950,7 +90115,7 @@ var ts;
             }
         }
         function emitNonNullExpression(node) {
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeLeftSideOfAccess);
             writeOperator("!");
         }
         function emitMetaProperty(node) {
@@ -83985,13 +90150,13 @@ var ts;
             }
         }
         function emitExpressionStatement(node) {
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeExpressionOfExpressionStatement);
             if (!ts.isJsonSourceFile(currentSourceFile) || ts.nodeIsSynthesized(node.expression)) {
                 writeTrailingSemicolon();
             }
         }
         function emitIfStatement(node) {
-            var openParenPos = emitTokenWithComment(98, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(99, node.pos, writeKeyword, node);
             writeSpace();
             emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitExpression(node.expression);
@@ -83999,8 +90164,8 @@ var ts;
             emitEmbeddedStatement(node, node.thenStatement);
             if (node.elseStatement) {
                 writeLineOrSpace(node, node.thenStatement, node.elseStatement);
-                emitTokenWithComment(90, node.thenStatement.end, writeKeyword, node);
-                if (node.elseStatement.kind === 234) {
+                emitTokenWithComment(91, node.thenStatement.end, writeKeyword, node);
+                if (node.elseStatement.kind === 238) {
                     writeSpace();
                     emit(node.elseStatement);
                 }
@@ -84010,14 +90175,14 @@ var ts;
             }
         }
         function emitWhileClause(node, startPos) {
-            var openParenPos = emitTokenWithComment(114, startPos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(115, startPos, writeKeyword, node);
             writeSpace();
             emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitExpression(node.expression);
             emitTokenWithComment(21, node.expression.end, writePunctuation, node);
         }
         function emitDoStatement(node) {
-            emitTokenWithComment(89, node.pos, writeKeyword, node);
+            emitTokenWithComment(90, node.pos, writeKeyword, node);
             emitEmbeddedStatement(node, node.statement);
             if (ts.isBlock(node.statement) && !preserveSourceNewlines) {
                 writeSpace();
@@ -84033,7 +90198,7 @@ var ts;
             emitEmbeddedStatement(node, node.statement);
         }
         function emitForStatement(node) {
-            var openParenPos = emitTokenWithComment(96, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(97, node.pos, writeKeyword, node);
             writeSpace();
             var pos = emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitForBinding(node.initializer);
@@ -84045,25 +90210,25 @@ var ts;
             emitEmbeddedStatement(node, node.statement);
         }
         function emitForInStatement(node) {
-            var openParenPos = emitTokenWithComment(96, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(97, node.pos, writeKeyword, node);
             writeSpace();
             emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitForBinding(node.initializer);
             writeSpace();
-            emitTokenWithComment(100, node.initializer.end, writeKeyword, node);
+            emitTokenWithComment(101, node.initializer.end, writeKeyword, node);
             writeSpace();
             emitExpression(node.expression);
             emitTokenWithComment(21, node.expression.end, writePunctuation, node);
             emitEmbeddedStatement(node, node.statement);
         }
         function emitForOfStatement(node) {
-            var openParenPos = emitTokenWithComment(96, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(97, node.pos, writeKeyword, node);
             writeSpace();
             emitWithTrailingSpace(node.awaitModifier);
             emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitForBinding(node.initializer);
             writeSpace();
-            emitTokenWithComment(156, node.initializer.end, writeKeyword, node);
+            emitTokenWithComment(159, node.initializer.end, writeKeyword, node);
             writeSpace();
             emitExpression(node.expression);
             emitTokenWithComment(21, node.expression.end, writePunctuation, node);
@@ -84071,7 +90236,7 @@ var ts;
         }
         function emitForBinding(node) {
             if (node !== undefined) {
-                if (node.kind === 250) {
+                if (node.kind === 254) {
                     emit(node);
                 }
                 else {
@@ -84080,12 +90245,12 @@ var ts;
             }
         }
         function emitContinueStatement(node) {
-            emitTokenWithComment(85, node.pos, writeKeyword, node);
+            emitTokenWithComment(86, node.pos, writeKeyword, node);
             emitWithLeadingSpace(node.label);
             writeTrailingSemicolon();
         }
         function emitBreakStatement(node) {
-            emitTokenWithComment(80, node.pos, writeKeyword, node);
+            emitTokenWithComment(81, node.pos, writeKeyword, node);
             emitWithLeadingSpace(node.label);
             writeTrailingSemicolon();
         }
@@ -84108,18 +90273,18 @@ var ts;
             }
             pos = writeTokenText(token, writer, pos);
             if (isSimilarNode && contextNode.end !== pos) {
-                var isJsxExprContext = contextNode.kind === 283;
+                var isJsxExprContext = contextNode.kind === 287;
                 emitTrailingCommentsOfPosition(pos, !isJsxExprContext, isJsxExprContext);
             }
             return pos;
         }
         function emitReturnStatement(node) {
-            emitTokenWithComment(104, node.pos, writeKeyword, node);
+            emitTokenWithComment(105, node.pos, writeKeyword, node);
             emitExpressionWithLeadingSpace(node.expression);
             writeTrailingSemicolon();
         }
         function emitWithStatement(node) {
-            var openParenPos = emitTokenWithComment(115, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(116, node.pos, writeKeyword, node);
             writeSpace();
             emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitExpression(node.expression);
@@ -84127,7 +90292,7 @@ var ts;
             emitEmbeddedStatement(node, node.statement);
         }
         function emitSwitchStatement(node) {
-            var openParenPos = emitTokenWithComment(106, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(107, node.pos, writeKeyword, node);
             writeSpace();
             emitTokenWithComment(20, openParenPos, writePunctuation, node);
             emitExpression(node.expression);
@@ -84142,12 +90307,12 @@ var ts;
             emit(node.statement);
         }
         function emitThrowStatement(node) {
-            emitTokenWithComment(108, node.pos, writeKeyword, node);
+            emitTokenWithComment(109, node.pos, writeKeyword, node);
             emitExpressionWithLeadingSpace(node.expression);
             writeTrailingSemicolon();
         }
         function emitTryStatement(node) {
-            emitTokenWithComment(110, node.pos, writeKeyword, node);
+            emitTokenWithComment(111, node.pos, writeKeyword, node);
             writeSpace();
             emit(node.tryBlock);
             if (node.catchClause) {
@@ -84156,20 +90321,20 @@ var ts;
             }
             if (node.finallyBlock) {
                 writeLineOrSpace(node, node.catchClause || node.tryBlock, node.finallyBlock);
-                emitTokenWithComment(95, (node.catchClause || node.tryBlock).end, writeKeyword, node);
+                emitTokenWithComment(96, (node.catchClause || node.tryBlock).end, writeKeyword, node);
                 writeSpace();
                 emit(node.finallyBlock);
             }
         }
         function emitDebuggerStatement(node) {
-            writeToken(86, node.pos, writeKeyword);
+            writeToken(87, node.pos, writeKeyword);
             writeTrailingSemicolon();
         }
         function emitVariableDeclaration(node) {
             emit(node.name);
             emit(node.exclamationToken);
             emitTypeAnnotation(node.type);
-            emitInitializer(node.initializer, node.type ? node.type.end : node.name.end, node);
+            emitInitializer(node.initializer, node.type ? node.type.end : node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitVariableDeclarationList(node) {
             writeKeyword(ts.isLet(node) ? "let" : ts.isVarConst(node) ? "const" : "var");
@@ -84188,9 +90353,6 @@ var ts;
             emitIdentifierName(node.name);
             emitSignatureAndBody(node, emitSignatureHead);
         }
-        function emitBlockCallback(_hint, body) {
-            emitBlockFunctionBody(body);
-        }
         function emitSignatureAndBody(node, emitSignatureHead) {
             var body = node.body;
             if (body) {
@@ -84203,12 +90365,7 @@ var ts;
                     ts.forEach(node.parameters, generateNames);
                     generateNames(node.body);
                     emitSignatureHead(node);
-                    if (onEmitNode) {
-                        onEmitNode(4, body, emitBlockCallback);
-                    }
-                    else {
-                        emitBlockFunctionBody(body);
-                    }
+                    emitBlockFunctionBody(body);
                     popNameGenerationScope(node);
                     if (indentedFlag) {
                         decreaseIndent();
@@ -84217,7 +90374,7 @@ var ts;
                 else {
                     emitSignatureHead(node);
                     writeSpace();
-                    emitExpression(body);
+                    emitExpression(body, parenthesizer.parenthesizeConciseBodyOfArrowFunction);
                 }
             }
             else {
@@ -84255,6 +90412,7 @@ var ts;
             return true;
         }
         function emitBlockFunctionBody(body) {
+            onBeforeEmitNode === null || onBeforeEmitNode === void 0 ? void 0 : onBeforeEmitNode(body);
             writeSpace();
             writePunctuation("{");
             increaseIndent();
@@ -84269,6 +90427,7 @@ var ts;
             }
             decreaseIndent();
             writeToken(19, body.statements.end, writePunctuation, body);
+            onAfterEmitNode === null || onAfterEmitNode === void 0 ? void 0 : onAfterEmitNode(body);
         }
         function emitBlockFunctionBodyOnSingleLine(body) {
             emitBlockFunctionBodyWorker(body, true);
@@ -84283,7 +90442,7 @@ var ts;
                 increaseIndent();
             }
             else {
-                emitList(body, body.statements, 1, statementOffset);
+                emitList(body, body.statements, 1, undefined, statementOffset);
             }
         }
         function emitClassDeclaration(node) {
@@ -84358,7 +90517,7 @@ var ts;
             var body = node.body;
             if (!body)
                 return writeTrailingSemicolon();
-            while (body.kind === 256) {
+            while (body && ts.isModuleDeclaration(body)) {
                 writePunctuation(".");
                 emit(body.name);
                 body = body.body;
@@ -84379,21 +90538,21 @@ var ts;
         }
         function emitImportEqualsDeclaration(node) {
             emitModifiers(node, node.modifiers);
-            emitTokenWithComment(99, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node);
+            emitTokenWithComment(100, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node);
             writeSpace();
             if (node.isTypeOnly) {
-                emitTokenWithComment(149, node.pos, writeKeyword, node);
+                emitTokenWithComment(151, node.pos, writeKeyword, node);
                 writeSpace();
             }
             emit(node.name);
             writeSpace();
-            emitTokenWithComment(62, node.name.end, writePunctuation, node);
+            emitTokenWithComment(63, node.name.end, writePunctuation, node);
             writeSpace();
             emitModuleReference(node.moduleReference);
             writeTrailingSemicolon();
         }
         function emitModuleReference(node) {
-            if (node.kind === 78) {
+            if (node.kind === 79) {
                 emitExpression(node);
             }
             else {
@@ -84402,20 +90561,23 @@ var ts;
         }
         function emitImportDeclaration(node) {
             emitModifiers(node, node.modifiers);
-            emitTokenWithComment(99, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node);
+            emitTokenWithComment(100, node.modifiers ? node.modifiers.end : node.pos, writeKeyword, node);
             writeSpace();
             if (node.importClause) {
                 emit(node.importClause);
                 writeSpace();
-                emitTokenWithComment(153, node.importClause.end, writeKeyword, node);
+                emitTokenWithComment(155, node.importClause.end, writeKeyword, node);
                 writeSpace();
             }
             emitExpression(node.moduleSpecifier);
+            if (node.assertClause) {
+                emitWithLeadingSpace(node.assertClause);
+            }
             writeTrailingSemicolon();
         }
         function emitImportClause(node) {
             if (node.isTypeOnly) {
-                emitTokenWithComment(149, node.pos, writeKeyword, node);
+                emitTokenWithComment(151, node.pos, writeKeyword, node);
                 writeSpace();
             }
             emit(node.name);
@@ -84428,7 +90590,7 @@ var ts;
         function emitNamespaceImport(node) {
             var asPos = emitTokenWithComment(41, node.pos, writePunctuation, node);
             writeSpace();
-            emitTokenWithComment(126, asPos, writeKeyword, node);
+            emitTokenWithComment(127, asPos, writeKeyword, node);
             writeSpace();
             emit(node.name);
         }
@@ -84439,23 +90601,25 @@ var ts;
             emitImportOrExportSpecifier(node);
         }
         function emitExportAssignment(node) {
-            var nextPos = emitTokenWithComment(92, node.pos, writeKeyword, node);
+            var nextPos = emitTokenWithComment(93, node.pos, writeKeyword, node);
             writeSpace();
             if (node.isExportEquals) {
-                emitTokenWithComment(62, nextPos, writeOperator, node);
+                emitTokenWithComment(63, nextPos, writeOperator, node);
             }
             else {
-                emitTokenWithComment(87, nextPos, writeKeyword, node);
+                emitTokenWithComment(88, nextPos, writeKeyword, node);
             }
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, node.isExportEquals ?
+                parenthesizer.getParenthesizeRightSideOfBinaryForOperator(63) :
+                parenthesizer.parenthesizeExpressionOfExportDefault);
             writeTrailingSemicolon();
         }
         function emitExportDeclaration(node) {
-            var nextPos = emitTokenWithComment(92, node.pos, writeKeyword, node);
+            var nextPos = emitTokenWithComment(93, node.pos, writeKeyword, node);
             writeSpace();
             if (node.isTypeOnly) {
-                nextPos = emitTokenWithComment(149, nextPos, writeKeyword, node);
+                nextPos = emitTokenWithComment(151, nextPos, writeKeyword, node);
                 writeSpace();
             }
             if (node.exportClause) {
@@ -84467,18 +90631,38 @@ var ts;
             if (node.moduleSpecifier) {
                 writeSpace();
                 var fromPos = node.exportClause ? node.exportClause.end : nextPos;
-                emitTokenWithComment(153, fromPos, writeKeyword, node);
+                emitTokenWithComment(155, fromPos, writeKeyword, node);
                 writeSpace();
                 emitExpression(node.moduleSpecifier);
             }
+            if (node.assertClause) {
+                emitWithLeadingSpace(node.assertClause);
+            }
             writeTrailingSemicolon();
         }
+        function emitAssertClause(node) {
+            emitTokenWithComment(129, node.pos, writeKeyword, node);
+            writeSpace();
+            var elements = node.elements;
+            emitList(node, elements, 526226);
+        }
+        function emitAssertEntry(node) {
+            emit(node.name);
+            writePunctuation(":");
+            writeSpace();
+            var value = node.value;
+            if ((ts.getEmitFlags(value) & 512) === 0) {
+                var commentRange = ts.getCommentRange(value);
+                emitTrailingCommentsOfPosition(commentRange.pos);
+            }
+            emit(value);
+        }
         function emitNamespaceExportDeclaration(node) {
-            var nextPos = emitTokenWithComment(92, node.pos, writeKeyword, node);
+            var nextPos = emitTokenWithComment(93, node.pos, writeKeyword, node);
             writeSpace();
-            nextPos = emitTokenWithComment(126, nextPos, writeKeyword, node);
+            nextPos = emitTokenWithComment(127, nextPos, writeKeyword, node);
             writeSpace();
-            nextPos = emitTokenWithComment(140, nextPos, writeKeyword, node);
+            nextPos = emitTokenWithComment(142, nextPos, writeKeyword, node);
             writeSpace();
             emit(node.name);
             writeTrailingSemicolon();
@@ -84486,7 +90670,7 @@ var ts;
         function emitNamespaceExport(node) {
             var asPos = emitTokenWithComment(41, node.pos, writePunctuation, node);
             writeSpace();
-            emitTokenWithComment(126, asPos, writeKeyword, node);
+            emitTokenWithComment(127, asPos, writeKeyword, node);
             writeSpace();
             emit(node.name);
         }
@@ -84502,10 +90686,14 @@ var ts;
             writePunctuation("}");
         }
         function emitImportOrExportSpecifier(node) {
+            if (node.isTypeOnly) {
+                writeKeyword("type");
+                writeSpace();
+            }
             if (node.propertyName) {
                 emit(node.propertyName);
                 writeSpace();
-                emitTokenWithComment(126, node.propertyName.end, writeKeyword, node);
+                emitTokenWithComment(127, node.propertyName.end, writeKeyword, node);
                 writeSpace();
             }
             emit(node.name);
@@ -84601,7 +90789,7 @@ var ts;
             }
         }
         function emitJsxTagName(node) {
-            if (node.kind === 78) {
+            if (node.kind === 79) {
                 emitExpression(node);
             }
             else {
@@ -84609,13 +90797,13 @@ var ts;
             }
         }
         function emitCaseClause(node) {
-            emitTokenWithComment(81, node.pos, writeKeyword, node);
+            emitTokenWithComment(82, node.pos, writeKeyword, node);
             writeSpace();
-            emitExpression(node.expression);
+            emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);
             emitCaseOrDefaultClauseRest(node, node.statements, node.expression.end);
         }
         function emitDefaultClause(node) {
-            var pos = emitTokenWithComment(87, node.pos, writeKeyword, node);
+            var pos = emitTokenWithComment(88, node.pos, writeKeyword, node);
             emitCaseOrDefaultClauseRest(node, node.statements, pos);
         }
         function emitCaseOrDefaultClauseRest(parentNode, statements, colonPos) {
@@ -84641,7 +90829,7 @@ var ts;
             emitList(node, node.types, 528);
         }
         function emitCatchClause(node) {
-            var openParenPos = emitTokenWithComment(82, node.pos, writeKeyword, node);
+            var openParenPos = emitTokenWithComment(83, node.pos, writeKeyword, node);
             writeSpace();
             if (node.variableDeclaration) {
                 emitTokenWithComment(20, openParenPos, writePunctuation, node);
@@ -84660,7 +90848,7 @@ var ts;
                 var commentRange = ts.getCommentRange(initializer);
                 emitTrailingCommentsOfPosition(commentRange.pos);
             }
-            emitExpression(initializer);
+            emitExpression(initializer, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitShorthandPropertyAssignment(node) {
             emit(node.name);
@@ -84668,34 +90856,37 @@ var ts;
                 writeSpace();
                 writePunctuation("=");
                 writeSpace();
-                emitExpression(node.objectAssignmentInitializer);
+                emitExpression(node.objectAssignmentInitializer, parenthesizer.parenthesizeExpressionForDisallowedComma);
             }
         }
         function emitSpreadAssignment(node) {
             if (node.expression) {
                 emitTokenWithComment(25, node.pos, writePunctuation, node);
-                emitExpression(node.expression);
+                emitExpression(node.expression, parenthesizer.parenthesizeExpressionForDisallowedComma);
             }
         }
         function emitEnumMember(node) {
             emit(node.name);
-            emitInitializer(node.initializer, node.name.end, node);
+            emitInitializer(node.initializer, node.name.end, node, parenthesizer.parenthesizeExpressionForDisallowedComma);
         }
         function emitJSDoc(node) {
             write("/**");
             if (node.comment) {
-                var lines = node.comment.split(/\r\n?|\n/g);
-                for (var _a = 0, lines_2 = lines; _a < lines_2.length; _a++) {
-                    var line = lines_2[_a];
-                    writeLine();
-                    writeSpace();
-                    writePunctuation("*");
-                    writeSpace();
-                    write(line);
+                var text = ts.getTextOfJSDocComment(node.comment);
+                if (text) {
+                    var lines = text.split(/\r\n?|\n/g);
+                    for (var _a = 0, lines_2 = lines; _a < lines_2.length; _a++) {
+                        var line = lines_2[_a];
+                        writeLine();
+                        writeSpace();
+                        writePunctuation("*");
+                        writeSpace();
+                        write(line);
+                    }
                 }
             }
             if (node.tags) {
-                if (node.tags.length === 1 && node.tags[0].kind === 329 && !node.comment) {
+                if (node.tags.length === 1 && node.tags[0].kind === 341 && !node.comment) {
                     writeSpace();
                     emit(node.tags[0]);
                 }
@@ -84740,7 +90931,7 @@ var ts;
         function emitJSDocTypedefTag(tag) {
             emitJSDocTagName(tag.tagName);
             if (tag.typeExpression) {
-                if (tag.typeExpression.kind === 301) {
+                if (tag.typeExpression.kind === 307) {
                     emitJSDocTypeExpression(tag.typeExpression);
                 }
                 else {
@@ -84759,7 +90950,7 @@ var ts;
                 emit(tag.fullName);
             }
             emitJSDocComment(tag.comment);
-            if (tag.typeExpression && tag.typeExpression.kind === 312) {
+            if (tag.typeExpression && tag.typeExpression.kind === 320) {
                 emitJSDocTypeLiteral(tag.typeExpression);
             }
         }
@@ -84812,9 +91003,10 @@ var ts;
             emit(tagName);
         }
         function emitJSDocComment(comment) {
-            if (comment) {
+            var text = ts.getTextOfJSDocComment(comment);
+            if (text) {
                 writeSpace();
-                write(comment);
+                write(text);
             }
         }
         function emitJSDocTypeExpression(typeExpression) {
@@ -84865,33 +91057,33 @@ var ts;
                 writeLine();
             }
             if (currentSourceFile && currentSourceFile.moduleName) {
-                writeComment("/// <amd-module name=\"" + currentSourceFile.moduleName + "\" />");
+                writeComment("/// <amd-module name=\"".concat(currentSourceFile.moduleName, "\" />"));
                 writeLine();
             }
             if (currentSourceFile && currentSourceFile.amdDependencies) {
                 for (var _a = 0, _b = currentSourceFile.amdDependencies; _a < _b.length; _a++) {
                     var dep = _b[_a];
                     if (dep.name) {
-                        writeComment("/// <amd-dependency name=\"" + dep.name + "\" path=\"" + dep.path + "\" />");
+                        writeComment("/// <amd-dependency name=\"".concat(dep.name, "\" path=\"").concat(dep.path, "\" />"));
                     }
                     else {
-                        writeComment("/// <amd-dependency path=\"" + dep.path + "\" />");
+                        writeComment("/// <amd-dependency path=\"".concat(dep.path, "\" />"));
                     }
                     writeLine();
                 }
             }
-            for (var _c = 0, files_1 = files; _c < files_1.length; _c++) {
-                var directive = files_1[_c];
+            for (var _c = 0, files_2 = files; _c < files_2.length; _c++) {
+                var directive = files_2[_c];
                 var pos = writer.getTextPos();
-                writeComment("/// <reference path=\"" + directive.fileName + "\" />");
+                writeComment("/// <reference path=\"".concat(directive.fileName, "\" />"));
                 if (bundleFileInfo)
                     bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "reference", data: directive.fileName });
                 writeLine();
             }
-            for (var _d = 0, types_25 = types; _d < types_25.length; _d++) {
-                var directive = types_25[_d];
+            for (var _d = 0, types_24 = types; _d < types_24.length; _d++) {
+                var directive = types_24[_d];
                 var pos = writer.getTextPos();
-                writeComment("/// <reference types=\"" + directive.fileName + "\" />");
+                writeComment("/// <reference types=\"".concat(directive.fileName, "\" />"));
                 if (bundleFileInfo)
                     bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "type", data: directive.fileName });
                 writeLine();
@@ -84899,7 +91091,7 @@ var ts;
             for (var _e = 0, libs_1 = libs; _e < libs_1.length; _e++) {
                 var directive = libs_1[_e];
                 var pos = writer.getTextPos();
-                writeComment("/// <reference lib=\"" + directive.fileName + "\" />");
+                writeComment("/// <reference lib=\"".concat(directive.fileName, "\" />"));
                 if (bundleFileInfo)
                     bundleFileInfo.sections.push({ pos: pos, end: writer.getTextPos(), kind: "lib", data: directive.fileName });
                 writeLine();
@@ -84912,14 +91104,14 @@ var ts;
             emitHelpers(node);
             var index = ts.findIndex(statements, function (statement) { return !ts.isPrologueDirective(statement); });
             emitTripleSlashDirectivesIfNeeded(node);
-            emitList(node, statements, 1, index === -1 ? statements.length : index);
+            emitList(node, statements, 1, undefined, index === -1 ? statements.length : index);
             popNameGenerationScope(node);
         }
         function emitPartiallyEmittedExpression(node) {
             emitExpression(node.expression);
         }
         function emitCommaList(node) {
-            emitExpressionList(node, node.elements, 528);
+            emitExpressionList(node, node.elements, 528, undefined);
         }
         function emitPrologueDirectives(statements, sourceFile, seenPrologueDirectives, recordBundleFileSection) {
             var needsToSetSourceFile = !!sourceFile;
@@ -85056,12 +91248,12 @@ var ts;
                 emit(node);
             }
         }
-        function emitInitializer(node, equalCommentStartPos, container) {
+        function emitInitializer(node, equalCommentStartPos, container, parenthesizerRule) {
             if (node) {
                 writeSpace();
-                emitTokenWithComment(62, equalCommentStartPos, writeOperator, container);
+                emitTokenWithComment(63, equalCommentStartPos, writeOperator, container);
                 writeSpace();
-                emitExpression(node);
+                emitExpression(node, parenthesizerRule);
             }
         }
         function emitNodeWithPrefix(prefix, prefixWriter, node, emit) {
@@ -85076,10 +91268,10 @@ var ts;
                 emit(node);
             }
         }
-        function emitExpressionWithLeadingSpace(node) {
+        function emitExpressionWithLeadingSpace(node, parenthesizerRule) {
             if (node) {
                 writeSpace();
-                emitExpression(node);
+                emitExpression(node, parenthesizerRule);
             }
         }
         function emitWithTrailingSpace(node) {
@@ -85109,7 +91301,7 @@ var ts;
             emitList(parentNode, decorators, 2146305);
         }
         function emitTypeArguments(parentNode, typeArguments) {
-            emitList(parentNode, typeArguments, 53776);
+            emitList(parentNode, typeArguments, 53776, parenthesizer.parenthesizeMemberOfElementType);
         }
         function emitTypeParameters(parentNode, typeParameters) {
             if (ts.isFunctionLike(parentNode) && parentNode.typeArguments) {
@@ -85148,12 +91340,6 @@ var ts;
         function emitParametersForIndexSignature(parentNode, parameters) {
             emitList(parentNode, parameters, 8848);
         }
-        function emitList(parentNode, children, format, start, count) {
-            emitNodeList(emit, parentNode, children, format, start, count);
-        }
-        function emitExpressionList(parentNode, children, format, start, count) {
-            emitNodeList(emitExpression, parentNode, children, format, start, count);
-        }
         function writeDelimiter(format) {
             switch (format & 60) {
                 case 0:
@@ -85176,7 +91362,13 @@ var ts;
                     break;
             }
         }
-        function emitNodeList(emit, parentNode, children, format, start, count) {
+        function emitList(parentNode, children, format, parenthesizerRule, start, count) {
+            emitNodeList(emit, parentNode, children, format, parenthesizerRule, start, count);
+        }
+        function emitExpressionList(parentNode, children, format, parenthesizerRule, start, count) {
+            emitNodeList(emitExpression, parentNode, children, format, parenthesizerRule, start, count);
+        }
+        function emitNodeList(emit, parentNode, children, format, parenthesizerRule, start, count) {
             if (start === void 0) { start = 0; }
             if (count === void 0) { count = children ? children.length - start : 0; }
             var isUndefined = children === undefined;
@@ -85195,7 +91387,7 @@ var ts;
             }
             if (format & 15360) {
                 writePunctuation(getOpeningBracket(format));
-                if (isEmpty && !isUndefined) {
+                if (isEmpty && children) {
                     emitTrailingCommentsOfPosition(children.pos, true);
                 }
             }
@@ -85203,7 +91395,7 @@ var ts;
                 onBeforeEmitNodeArray(children);
             }
             if (isEmpty) {
-                if (format & 1 && !(preserveSourceNewlines && ts.rangeIsOnSingleLine(parentNode, currentSourceFile))) {
+                if (format & 1 && !(preserveSourceNewlines && (!parentNode || ts.rangeIsOnSingleLine(parentNode, currentSourceFile)))) {
                     writeLine();
                 }
                 else if (format & 256 && !(format & 524288)) {
@@ -85211,6 +91403,7 @@ var ts;
                 }
             }
             else {
+                ts.Debug.type(children);
                 var mayEmitInterveningComments = (format & 262144) === 0;
                 var shouldEmitInterveningComments = mayEmitInterveningComments;
                 var leadingLineTerminatorCount = getLeadingLineTerminatorCount(parentNode, children, format);
@@ -85234,7 +91427,7 @@ var ts;
                         writeDelimiter(format);
                     }
                     else if (previousSibling) {
-                        if (format & 60 && previousSibling.end !== parentNode.end) {
+                        if (format & 60 && previousSibling.end !== (parentNode ? parentNode.end : -1)) {
                             emitLeadingCommentsOfPosition(previousSibling.end);
                         }
                         writeDelimiter(format);
@@ -85263,7 +91456,12 @@ var ts;
                         shouldEmitInterveningComments = mayEmitInterveningComments;
                     }
                     nextListElementPos = child.pos;
-                    emit(child);
+                    if (emit.length === 1) {
+                        emit(child);
+                    }
+                    else {
+                        emit(child, parenthesizerRule);
+                    }
                     if (shouldDecreaseIndentAfterEmit) {
                         decreaseIndent();
                         shouldDecreaseIndentAfterEmit = false;
@@ -85281,7 +91479,7 @@ var ts;
                         writePunctuation(",");
                     }
                 }
-                if (previousSibling && parentNode.end !== previousSibling.end && (format & 60) && !skipTrailingComments) {
+                if (previousSibling && (parentNode ? parentNode.end : -1) !== previousSibling.end && (format & 60) && !skipTrailingComments) {
                     emitLeadingCommentsOfPosition(hasTrailingComma && (children === null || children === void 0 ? void 0 : children.end) ? children.end : previousSibling.end);
                 }
                 if (format & 128) {
@@ -85300,7 +91498,7 @@ var ts;
                 onAfterEmitNodeArray(children);
             }
             if (format & 15360) {
-                if (isEmpty && !isUndefined) {
+                if (isEmpty && children) {
                     emitLeadingCommentsOfPosition(children.end);
                 }
                 writePunctuation(getClosingBracket(format));
@@ -85342,6 +91540,14 @@ var ts;
         function writeProperty(s) {
             writer.writeProperty(s);
         }
+        function nonEscapingWrite(s) {
+            if (writer.nonEscapingWrite) {
+                writer.nonEscapingWrite(s);
+            }
+            else {
+                writer.write(s);
+            }
+        }
         function writeLine(count) {
             if (count === void 0) { count = 1; }
             for (var i = 0; i < count; i++) {
@@ -85426,7 +91632,7 @@ var ts;
                 }
                 var firstChild_1 = children[0];
                 if (firstChild_1 === undefined) {
-                    return ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
+                    return !parentNode || ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
                 }
                 if (firstChild_1.pos === nextListElementPos) {
                     return 0;
@@ -85434,7 +91640,8 @@ var ts;
                 if (firstChild_1.kind === 11) {
                     return 0;
                 }
-                if (!ts.positionIsSynthesized(parentNode.pos) &&
+                if (parentNode &&
+                    !ts.positionIsSynthesized(parentNode.pos) &&
                     !ts.nodeIsSynthesized(firstChild_1) &&
                     (!firstChild_1.parent || ts.getOriginalNode(firstChild_1.parent) === ts.getOriginalNode(parentNode))) {
                     if (preserveSourceNewlines) {
@@ -85456,11 +91663,14 @@ var ts;
                 if (nextNode.kind === 11) {
                     return 0;
                 }
-                else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode) && previousNode.parent === nextNode.parent) {
-                    if (preserveSourceNewlines) {
+                else if (!ts.nodeIsSynthesized(previousNode) && !ts.nodeIsSynthesized(nextNode)) {
+                    if (preserveSourceNewlines && siblingNodePositionsAreComparable(previousNode, nextNode)) {
                         return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenRangeEndAndRangeStart(previousNode, nextNode, currentSourceFile, includeComments); });
                     }
-                    return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+                    else if (!preserveSourceNewlines && originalNodesHaveSameParent(previousNode, nextNode)) {
+                        return ts.rangeEndIsOnSameLineAsRangeStart(previousNode, nextNode, currentSourceFile) ? 0 : 1;
+                    }
+                    return format & 65536 ? 1 : 0;
                 }
                 else if (synthesizedNodeStartsOnNewLine(previousNode, format) || synthesizedNodeStartsOnNewLine(nextNode, format)) {
                     return 1;
@@ -85478,9 +91688,9 @@ var ts;
                 }
                 var lastChild = ts.lastOrUndefined(children);
                 if (lastChild === undefined) {
-                    return ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
+                    return !parentNode || ts.rangeIsOnSingleLine(parentNode, currentSourceFile) ? 0 : 1;
                 }
-                if (!ts.positionIsSynthesized(parentNode.pos) && !ts.nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {
+                if (parentNode && !ts.positionIsSynthesized(parentNode.pos) && !ts.nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) {
                     if (preserveSourceNewlines) {
                         var end_1 = ts.isNodeArray(children) && !ts.positionIsSynthesized(children.end) ? children.end : lastChild.end;
                         return getEffectiveLines(function (includeComments) { return ts.getLinesBetweenPositionAndNextNonWhitespaceCharacter(end_1, parentNode.end, currentSourceFile, includeComments); });
@@ -85550,7 +91760,7 @@ var ts;
                 && ts.rangeEndIsOnSameLineAsRangeStart(block, block, currentSourceFile);
         }
         function skipSynthesizedParentheses(node) {
-            while (node.kind === 207 && ts.nodeIsSynthesized(node)) {
+            while (node.kind === 211 && ts.nodeIsSynthesized(node)) {
                 node = node.expression;
             }
             return node;
@@ -85575,9 +91785,9 @@ var ts;
                 var textSourceNode = node.textSourceNode;
                 if (ts.isIdentifier(textSourceNode) || ts.isNumericLiteral(textSourceNode)) {
                     var text = ts.isNumericLiteral(textSourceNode) ? textSourceNode.text : getTextOfNode(textSourceNode);
-                    return jsxAttributeEscape ? "\"" + ts.escapeJsxAttributeString(text) + "\"" :
-                        neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"" + ts.escapeString(text) + "\"" :
-                            "\"" + ts.escapeNonAsciiString(text) + "\"";
+                    return jsxAttributeEscape ? "\"".concat(ts.escapeJsxAttributeString(text), "\"") :
+                        neverAsciiEscape || (ts.getEmitFlags(node) & 16777216) ? "\"".concat(ts.escapeString(text), "\"") :
+                            "\"".concat(ts.escapeNonAsciiString(text), "\"");
                 }
                 else {
                     return getLiteralTextOfNode(textSourceNode, neverAsciiEscape, jsxAttributeEscape);
@@ -85614,84 +91824,84 @@ var ts;
             if (!node)
                 return;
             switch (node.kind) {
-                case 230:
+                case 234:
                     ts.forEach(node.statements, generateNames);
                     break;
-                case 245:
-                case 243:
-                case 235:
-                case 236:
+                case 249:
+                case 247:
+                case 239:
+                case 240:
                     generateNames(node.statement);
                     break;
-                case 234:
+                case 238:
                     generateNames(node.thenStatement);
                     generateNames(node.elseStatement);
                     break;
-                case 237:
-                case 239:
-                case 238:
+                case 241:
+                case 243:
+                case 242:
                     generateNames(node.initializer);
                     generateNames(node.statement);
                     break;
-                case 244:
+                case 248:
                     generateNames(node.caseBlock);
                     break;
-                case 258:
+                case 262:
                     ts.forEach(node.clauses, generateNames);
                     break;
-                case 284:
-                case 285:
+                case 288:
+                case 289:
                     ts.forEach(node.statements, generateNames);
                     break;
-                case 247:
+                case 251:
                     generateNames(node.tryBlock);
                     generateNames(node.catchClause);
                     generateNames(node.finallyBlock);
                     break;
-                case 287:
+                case 291:
                     generateNames(node.variableDeclaration);
                     generateNames(node.block);
                     break;
-                case 232:
+                case 236:
                     generateNames(node.declarationList);
                     break;
-                case 250:
+                case 254:
                     ts.forEach(node.declarations, generateNames);
                     break;
-                case 249:
-                case 160:
-                case 198:
-                case 252:
+                case 253:
+                case 163:
+                case 202:
+                case 256:
                     generateNameIfNeeded(node.name);
                     break;
-                case 251:
+                case 255:
                     generateNameIfNeeded(node.name);
                     if (ts.getEmitFlags(node) & 524288) {
                         ts.forEach(node.parameters, generateNames);
                         generateNames(node.body);
                     }
                     break;
-                case 196:
-                case 197:
+                case 200:
+                case 201:
                     ts.forEach(node.elements, generateNames);
                     break;
-                case 261:
+                case 265:
                     generateNames(node.importClause);
                     break;
-                case 262:
+                case 266:
                     generateNameIfNeeded(node.name);
                     generateNames(node.namedBindings);
                     break;
-                case 263:
+                case 267:
                     generateNameIfNeeded(node.name);
                     break;
-                case 269:
+                case 273:
                     generateNameIfNeeded(node.name);
                     break;
-                case 264:
+                case 268:
                     ts.forEach(node.elements, generateNames);
                     break;
-                case 265:
+                case 269:
                     generateNameIfNeeded(node.propertyName || node.name);
                     break;
             }
@@ -85700,12 +91910,12 @@ var ts;
             if (!node)
                 return;
             switch (node.kind) {
-                case 288:
-                case 289:
-                case 163:
-                case 165:
-                case 167:
+                case 294:
+                case 295:
+                case 166:
                 case 168:
+                case 171:
+                case 172:
                     generateNameIfNeeded(node.name);
                     break;
             }
@@ -85837,25 +92047,25 @@ var ts;
         }
         function generateNameForNode(node, flags) {
             switch (node.kind) {
-                case 78:
+                case 79:
                     return makeUniqueName(getTextOfNode(node), isUniqueName, !!(flags & 16), !!(flags & 8));
-                case 256:
-                case 255:
+                case 260:
+                case 259:
                     return generateNameForModuleOrEnum(node);
-                case 261:
-                case 267:
+                case 265:
+                case 271:
                     return generateNameForImportOrExportDeclaration(node);
-                case 251:
-                case 252:
-                case 266:
+                case 255:
+                case 256:
+                case 270:
                     return generateNameForExportDefault();
-                case 221:
+                case 225:
                     return generateNameForClassExpression();
-                case 165:
-                case 167:
                 case 168:
+                case 171:
+                case 172:
                     return generateNameForMethodOrAccessor(node);
-                case 158:
+                case 161:
                     return makeTempVariableName(0, true);
                 default:
                     return makeTempVariableName(0);
@@ -85888,54 +92098,65 @@ var ts;
             return node;
         }
         function pipelineEmitWithComments(hint, node) {
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
+            var pipelinePhase = getNextPipelinePhase(2, hint, node);
+            var savedContainerPos = containerPos;
+            var savedContainerEnd = containerEnd;
+            var savedDeclarationListContainerEnd = declarationListContainerEnd;
+            emitCommentsBeforeNode(node);
+            pipelinePhase(hint, node);
+            emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);
+        }
+        function emitCommentsBeforeNode(node) {
+            var emitFlags = ts.getEmitFlags(node);
+            var commentRange = ts.getCommentRange(node);
+            emitLeadingCommentsOfNode(node, emitFlags, commentRange.pos, commentRange.end);
+            if (emitFlags & 2048) {
+                commentsDisabled = true;
+            }
+        }
+        function emitCommentsAfterNode(node, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) {
+            var emitFlags = ts.getEmitFlags(node);
+            var commentRange = ts.getCommentRange(node);
+            if (emitFlags & 2048) {
+                commentsDisabled = false;
+            }
+            emitTrailingCommentsOfNode(node, emitFlags, commentRange.pos, commentRange.end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd);
+        }
+        function emitLeadingCommentsOfNode(node, emitFlags, pos, end) {
             enterComment();
             hasWrittenComment = false;
-            var emitFlags = ts.getEmitFlags(node);
-            var _a = ts.getCommentRange(node), pos = _a.pos, end = _a.end;
-            var isEmittedNode = node.kind !== 335;
             var skipLeadingComments = pos < 0 || (emitFlags & 512) !== 0 || node.kind === 11;
             var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 11;
-            var savedContainerPos = containerPos;
-            var savedContainerEnd = containerEnd;
-            var savedDeclarationListContainerEnd = declarationListContainerEnd;
             if ((pos > 0 || end > 0) && pos !== end) {
                 if (!skipLeadingComments) {
-                    emitLeadingComments(pos, isEmittedNode);
+                    emitLeadingComments(pos, node.kind !== 347);
                 }
                 if (!skipLeadingComments || (pos >= 0 && (emitFlags & 512) !== 0)) {
                     containerPos = pos;
                 }
                 if (!skipTrailingComments || (end >= 0 && (emitFlags & 1024) !== 0)) {
                     containerEnd = end;
-                    if (node.kind === 250) {
+                    if (node.kind === 254) {
                         declarationListContainerEnd = end;
                     }
                 }
             }
             ts.forEach(ts.getSyntheticLeadingComments(node), emitLeadingSynthesizedComment);
             exitComment();
-            var pipelinePhase = getNextPipelinePhase(2, hint, node);
-            if (emitFlags & 2048) {
-                commentsDisabled = true;
-                pipelinePhase(hint, node);
-                commentsDisabled = false;
-            }
-            else {
-                pipelinePhase(hint, node);
-            }
+        }
+        function emitTrailingCommentsOfNode(node, emitFlags, pos, end, savedContainerPos, savedContainerEnd, savedDeclarationListContainerEnd) {
             enterComment();
+            var skipTrailingComments = end < 0 || (emitFlags & 1024) !== 0 || node.kind === 11;
             ts.forEach(ts.getSyntheticTrailingComments(node), emitTrailingSynthesizedComment);
             if ((pos > 0 || end > 0) && pos !== end) {
                 containerPos = savedContainerPos;
                 containerEnd = savedContainerEnd;
                 declarationListContainerEnd = savedDeclarationListContainerEnd;
-                if (!skipTrailingComments && isEmittedNode) {
+                if (!skipTrailingComments && node.kind !== 347) {
                     emitTrailingComments(end);
                 }
             }
             exitComment();
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
         }
         function emitLeadingSynthesizedComment(comment) {
             if (comment.hasLeadingNewline || comment.kind === 2) {
@@ -85965,8 +92186,8 @@ var ts;
         }
         function formatSynthesizedComment(comment) {
             return comment.kind === 3
-                ? "/*" + comment.text + "*/"
-                : "//" + comment.text;
+                ? "/*".concat(comment.text, "*/")
+                : "//".concat(comment.text);
         }
         function emitBodyWithDetachedComments(node, detachedRange, emitCallback) {
             enterComment();
@@ -85995,6 +92216,24 @@ var ts;
             }
             exitComment();
         }
+        function originalNodesHaveSameParent(nodeA, nodeB) {
+            nodeA = ts.getOriginalNode(nodeA);
+            return nodeA.parent && nodeA.parent === ts.getOriginalNode(nodeB).parent;
+        }
+        function siblingNodePositionsAreComparable(previousNode, nextNode) {
+            if (nextNode.pos < previousNode.end) {
+                return false;
+            }
+            previousNode = ts.getOriginalNode(previousNode);
+            nextNode = ts.getOriginalNode(nextNode);
+            var parent = previousNode.parent;
+            if (!parent || parent !== nextNode.parent) {
+                return false;
+            }
+            var parentNodeArray = ts.getContainingNodeArray(previousNode);
+            var prevNodeIndex = parentNodeArray === null || parentNodeArray === void 0 ? void 0 : parentNodeArray.indexOf(previousNode);
+            return prevNodeIndex !== undefined && prevNodeIndex > -1 && parentNodeArray.indexOf(nextNode) === prevNodeIndex + 1;
+        }
         function emitLeadingComments(pos, isEmittedNode) {
             hasWrittenComment = false;
             if (isEmittedNode) {
@@ -86146,42 +92385,47 @@ var ts;
             }
             return node.parsedSourceMap || undefined;
         }
-        function pipelineEmitWithSourceMap(hint, node) {
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
+        function pipelineEmitWithSourceMaps(hint, node) {
             var pipelinePhase = getNextPipelinePhase(3, hint, node);
-            if (ts.isUnparsedSource(node) || ts.isUnparsedPrepend(node)) {
-                pipelinePhase(hint, node);
-            }
-            else if (ts.isUnparsedNode(node)) {
+            emitSourceMapsBeforeNode(node);
+            pipelinePhase(hint, node);
+            emitSourceMapsAfterNode(node);
+        }
+        function emitSourceMapsBeforeNode(node) {
+            var emitFlags = ts.getEmitFlags(node);
+            var sourceMapRange = ts.getSourceMapRange(node);
+            if (ts.isUnparsedNode(node)) {
+                ts.Debug.assertIsDefined(node.parent, "UnparsedNodes must have parent pointers");
                 var parsed = getParsedSourceMap(node.parent);
                 if (parsed && sourceMapGenerator) {
                     sourceMapGenerator.appendSourceMap(writer.getLine(), writer.getColumn(), parsed, node.parent.sourceMapPath, node.parent.getLineAndCharacterOfPosition(node.pos), node.parent.getLineAndCharacterOfPosition(node.end));
                 }
-                pipelinePhase(hint, node);
             }
             else {
-                var _a = ts.getSourceMapRange(node), pos = _a.pos, end = _a.end, _b = _a.source, source = _b === void 0 ? sourceMapSource : _b;
-                var emitFlags = ts.getEmitFlags(node);
-                if (node.kind !== 335
+                var source = sourceMapRange.source || sourceMapSource;
+                if (node.kind !== 347
                     && (emitFlags & 16) === 0
-                    && pos >= 0) {
-                    emitSourcePos(source, skipSourceTrivia(source, pos));
+                    && sourceMapRange.pos >= 0) {
+                    emitSourcePos(sourceMapRange.source || sourceMapSource, skipSourceTrivia(source, sourceMapRange.pos));
                 }
                 if (emitFlags & 64) {
                     sourceMapsDisabled = true;
-                    pipelinePhase(hint, node);
-                    sourceMapsDisabled = false;
                 }
-                else {
-                    pipelinePhase(hint, node);
+            }
+        }
+        function emitSourceMapsAfterNode(node) {
+            var emitFlags = ts.getEmitFlags(node);
+            var sourceMapRange = ts.getSourceMapRange(node);
+            if (!ts.isUnparsedNode(node)) {
+                if (emitFlags & 64) {
+                    sourceMapsDisabled = false;
                 }
-                if (node.kind !== 335
+                if (node.kind !== 347
                     && (emitFlags & 32) === 0
-                    && end >= 0) {
-                    emitSourcePos(sourceend);
+                    && sourceMapRange.end >= 0) {
+                    emitSourcePos(sourceMapRange.source || sourceMapSource, sourceMapRange.end);
                 }
             }
-            ts.Debug.assert(lastNode === node || lastSubstitution === node);
         }
         function skipSourceTrivia(source, pos) {
             return source.skipTrivia ? source.skipTrivia(pos) : ts.skipTrivia(source.text, pos);
@@ -86303,12 +92547,20 @@ var ts;
             return ts.getBaseFileName(ts.normalizePath(fileName));
         }
         function createCachedFileSystemEntries(rootDir, rootDirPath) {
-            var resultFromHost = {
-                files: ts.map(host.readDirectory(rootDir, undefined, undefined, ["*.*"]), getBaseNameOfFileName) || [],
-                directories: host.getDirectories(rootDir) || []
-            };
-            cachedReadDirectoryResult.set(ts.ensureTrailingDirectorySeparator(rootDirPath), resultFromHost);
-            return resultFromHost;
+            var _a;
+            if (!host.realpath || ts.ensureTrailingDirectorySeparator(toPath(host.realpath(rootDir))) === rootDirPath) {
+                var resultFromHost = {
+                    files: ts.map(host.readDirectory(rootDir, undefined, undefined, ["*.*"]), getBaseNameOfFileName) || [],
+                    directories: host.getDirectories(rootDir) || []
+                };
+                cachedReadDirectoryResult.set(ts.ensureTrailingDirectorySeparator(rootDirPath), resultFromHost);
+                return resultFromHost;
+            }
+            if ((_a = host.directoryExists) === null || _a === void 0 ? void 0 : _a.call(host, rootDir)) {
+                cachedReadDirectoryResult.set(rootDirPath, false);
+                return false;
+            }
+            return undefined;
         }
         function tryReadDirectory(rootDir, rootDirPath) {
             rootDirPath = ts.ensureTrailingDirectorySeparator(rootDirPath);
@@ -86377,17 +92629,32 @@ var ts;
         }
         function readDirectory(rootDir, extensions, excludes, includes, depth) {
             var rootDirPath = toPath(rootDir);
-            var result = tryReadDirectory(rootDir, rootDirPath);
-            if (result) {
+            var rootResult = tryReadDirectory(rootDir, rootDirPath);
+            var rootSymLinkResult;
+            if (rootResult !== undefined) {
                 return ts.matchFiles(rootDir, extensions, excludes, includes, useCaseSensitiveFileNames, currentDirectory, depth, getFileSystemEntries, realpath);
             }
             return host.readDirectory(rootDir, extensions, excludes, includes, depth);
             function getFileSystemEntries(dir) {
                 var path = toPath(dir);
                 if (path === rootDirPath) {
-                    return result;
-                }
-                return tryReadDirectory(dir, path) || ts.emptyFileSystemEntries;
+                    return rootResult || getFileSystemEntriesFromHost(dir, path);
+                }
+                var result = tryReadDirectory(dir, path);
+                return result !== undefined ?
+                    result || getFileSystemEntriesFromHost(dir, path) :
+                    ts.emptyFileSystemEntries;
+            }
+            function getFileSystemEntriesFromHost(dir, path) {
+                if (rootSymLinkResult && path === rootDirPath)
+                    return rootSymLinkResult;
+                var result = {
+                    files: ts.map(host.readDirectory(dir, undefined, undefined, ["*.*"]), getBaseNameOfFileName) || ts.emptyArray,
+                    directories: host.getDirectories(dir) || ts.emptyArray
+                };
+                if (path === rootDirPath)
+                    rootSymLinkResult = result;
+                return result;
             }
         }
         function realpath(s) {
@@ -86395,7 +92662,7 @@ var ts;
         }
         function addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath) {
             var existingResult = getCachedFileSystemEntries(fileOrDirectoryPath);
-            if (existingResult) {
+            if (existingResult !== undefined) {
                 clearCache();
                 return undefined;
             }
@@ -86443,9 +92710,9 @@ var ts;
         ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Partial"] = 1] = "Partial";
         ConfigFileProgramReloadLevel[ConfigFileProgramReloadLevel["Full"] = 2] = "Full";
     })(ConfigFileProgramReloadLevel = ts.ConfigFileProgramReloadLevel || (ts.ConfigFileProgramReloadLevel = {}));
-    function updateSharedExtendedConfigFileWatcher(projectPath, parsed, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath) {
+    function updateSharedExtendedConfigFileWatcher(projectPath, options, extendedConfigFilesMap, createExtendedConfigFileWatch, toPath) {
         var _a;
-        var extendedConfigs = ts.arrayToMap(((_a = parsed === null || parsed === void 0 ? void 0 : parsed.options.configFile) === null || _a === void 0 ? void 0 : _a.extendedSourceFiles) || ts.emptyArray, toPath);
+        var extendedConfigs = ts.arrayToMap(((_a = options === null || options === void 0 ? void 0 : options.configFile) === null || _a === void 0 ? void 0 : _a.extendedSourceFiles) || ts.emptyArray, toPath);
         extendedConfigFilesMap.forEach(function (watcher, extendedConfigFilePath) {
             if (!extendedConfigs.has(extendedConfigFilePath)) {
                 watcher.projects.delete(projectPath);
@@ -86460,12 +92727,12 @@ var ts;
             else {
                 extendedConfigFilesMap.set(extendedConfigFilePath, {
                     projects: new ts.Set([projectPath]),
-                    fileWatcher: createExtendedConfigFileWatch(extendedConfigFileName, extendedConfigFilePath),
+                    watcher: createExtendedConfigFileWatch(extendedConfigFileName, extendedConfigFilePath),
                     close: function () {
                         var existing = extendedConfigFilesMap.get(extendedConfigFilePath);
                         if (!existing || existing.projects.size !== 0)
                             return;
-                        existing.fileWatcher.close();
+                        existing.watcher.close();
                         extendedConfigFilesMap.delete(extendedConfigFilePath);
                     },
                 });
@@ -86473,6 +92740,33 @@ var ts;
         });
     }
     ts.updateSharedExtendedConfigFileWatcher = updateSharedExtendedConfigFileWatcher;
+    function clearSharedExtendedConfigFileWatcher(projectPath, extendedConfigFilesMap) {
+        extendedConfigFilesMap.forEach(function (watcher) {
+            if (watcher.projects.delete(projectPath))
+                watcher.close();
+        });
+    }
+    ts.clearSharedExtendedConfigFileWatcher = clearSharedExtendedConfigFileWatcher;
+    function cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath) {
+        if (!extendedConfigCache.delete(extendedConfigFilePath))
+            return;
+        extendedConfigCache.forEach(function (_a, key) {
+            var _b;
+            var extendedResult = _a.extendedResult;
+            if ((_b = extendedResult.extendedSourceFiles) === null || _b === void 0 ? void 0 : _b.some(function (extendedFile) { return toPath(extendedFile) === extendedConfigFilePath; })) {
+                cleanExtendedConfigCache(extendedConfigCache, key, toPath);
+            }
+        });
+    }
+    ts.cleanExtendedConfigCache = cleanExtendedConfigCache;
+    function updatePackageJsonWatch(lookups, packageJsonWatches, createPackageJsonWatch) {
+        var newMap = new ts.Map(lookups);
+        ts.mutateMap(packageJsonWatches, newMap, {
+            createNewValue: createPackageJsonWatch,
+            onDeleteValue: ts.closeFileWatcher
+        });
+    }
+    ts.updatePackageJsonWatch = updatePackageJsonWatch;
     function updateMissingFilePathsWatch(program, missingFileWatches, createMissingFileWatch) {
         var missingFilePaths = program.getMissingFilePaths();
         var newMissingFilePathMap = ts.arrayToMap(missingFilePaths, ts.identity, ts.returnTrue);
@@ -86504,46 +92798,49 @@ var ts;
     }
     ts.updateWatchingWildcardDirectories = updateWatchingWildcardDirectories;
     function isIgnoredFileFromWildCardWatching(_a) {
-        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;
+        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;
         var newPath = ts.removeIgnoredPath(fileOrDirectoryPath);
         if (!newPath) {
-            writeLog("Project: " + configFileName + " Detected ignored path: " + fileOrDirectory);
+            writeLog("Project: ".concat(configFileName, " Detected ignored path: ").concat(fileOrDirectory));
             return true;
         }
         fileOrDirectoryPath = newPath;
         if (fileOrDirectoryPath === watchedDirPath)
             return false;
         if (ts.hasExtension(fileOrDirectoryPath) && !ts.isSupportedSourceFileName(fileOrDirectory, options, extraFileExtensions)) {
-            writeLog("Project: " + configFileName + " Detected file add/remove of non supported extension: " + fileOrDirectory);
+            writeLog("Project: ".concat(configFileName, " Detected file add/remove of non supported extension: ").concat(fileOrDirectory));
             return true;
         }
         if (ts.isExcludedFile(fileOrDirectory, options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), useCaseSensitiveFileNames, currentDirectory)) {
-            writeLog("Project: " + configFileName + " Detected excluded file: " + fileOrDirectory);
+            writeLog("Project: ".concat(configFileName, " Detected excluded file: ").concat(fileOrDirectory));
             return true;
         }
         if (!program)
             return false;
-        if (options.outFile || options.outDir)
+        if (ts.outFile(options) || options.outDir)
             return false;
         if (ts.fileExtensionIs(fileOrDirectoryPath, ".d.ts")) {
             if (options.declarationDir)
                 return false;
         }
-        else if (!ts.fileExtensionIsOneOf(fileOrDirectoryPath, ts.supportedJSExtensions)) {
+        else if (!ts.fileExtensionIsOneOf(fileOrDirectoryPath, ts.supportedJSExtensionsFlat)) {
             return false;
         }
         var filePathWithoutExtension = ts.removeFileExtension(fileOrDirectoryPath);
-        var realProgram = isBuilderProgram(program) ? program.getProgramOrUndefined() : program;
+        var realProgram = ts.isArray(program) ? undefined : isBuilderProgram(program) ? program.getProgramOrUndefined() : program;
+        var builderProgram = !realProgram && !ts.isArray(program) ? program : undefined;
         if (hasSourceFile((filePathWithoutExtension + ".ts")) ||
             hasSourceFile((filePathWithoutExtension + ".tsx"))) {
-            writeLog("Project: " + configFileName + " Detected output file: " + fileOrDirectory);
+            writeLog("Project: ".concat(configFileName, " Detected output file: ").concat(fileOrDirectory));
             return true;
         }
         return false;
         function hasSourceFile(file) {
             return realProgram ?
                 !!realProgram.getSourceFileByPath(file) :
-                program.getState().fileInfos.has(file);
+                builderProgram ?
+                    builderProgram.getState().fileInfos.has(file) :
+                    !!ts.find(program, function (rootFile) { return toPath(rootFile) === file; });
         }
     }
     ts.isIgnoredFileFromWildCardWatching = isIgnoredFileFromWildCardWatching;
@@ -86602,36 +92899,36 @@ var ts;
                 host.useCaseSensitiveFileNames();
         }
         function createExcludeWatcherWithLogging(file, flags, options, detailInfo1, detailInfo2) {
-            log("ExcludeWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
+            log("ExcludeWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
             return {
-                close: function () { return log("ExcludeWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)); }
+                close: function () { return log("ExcludeWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo))); }
             };
         }
         function createFileWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
-            log("FileWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
+            log("FileWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
             var watcher = triggerInvokingFactory.watchFile(file, cb, flags, options, detailInfo1, detailInfo2);
             return {
                 close: function () {
-                    log("FileWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
+                    log("FileWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo)));
                     watcher.close();
                 }
             };
         }
         function createDirectoryWatcherWithLogging(file, cb, flags, options, detailInfo1, detailInfo2) {
-            var watchInfo = "DirectoryWatcher:: Added:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
+            var watchInfo = "DirectoryWatcher:: Added:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
             log(watchInfo);
             var start = ts.timestamp();
             var watcher = triggerInvokingFactory.watchDirectory(file, cb, flags, options, detailInfo1, detailInfo2);
             var elapsed = ts.timestamp() - start;
-            log("Elapsed:: " + elapsed + "ms " + watchInfo);
+            log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
             return {
                 close: function () {
-                    var watchInfo = "DirectoryWatcher:: Close:: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
+                    var watchInfo = "DirectoryWatcher:: Close:: ".concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
                     log(watchInfo);
                     var start = ts.timestamp();
                     watcher.close();
                     var elapsed = ts.timestamp() - start;
-                    log("Elapsed:: " + elapsed + "ms " + watchInfo);
+                    log("Elapsed:: ".concat(elapsed, "ms ").concat(watchInfo));
                 }
             };
         }
@@ -86641,16 +92938,16 @@ var ts;
                 for (var _i = 0; _i < arguments.length; _i++) {
                     args[_i] = arguments[_i];
                 }
-                var triggerredInfo = (key === "watchFile" ? "FileWatcher" : "DirectoryWatcher") + ":: Triggered with " + args[0] + " " + (args[1] !== undefined ? args[1] : "") + ":: " + getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo);
+                var triggerredInfo = "".concat(key === "watchFile" ? "FileWatcher" : "DirectoryWatcher", ":: Triggered with ").concat(args[0], " ").concat(args[1] !== undefined ? args[1] : "", ":: ").concat(getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo));
                 log(triggerredInfo);
                 var start = ts.timestamp();
-                cb.call.apply(cb, __spreadArray([undefined], args));
+                cb.call.apply(cb, __spreadArray([undefined], args, false));
                 var elapsed = ts.timestamp() - start;
-                log("Elapsed:: " + elapsed + "ms " + triggerredInfo);
+                log("Elapsed:: ".concat(elapsed, "ms ").concat(triggerredInfo));
             }, flags, options, detailInfo1, detailInfo2); };
         }
         function getWatchInfo(file, flags, options, detailInfo1, detailInfo2, getDetailWatchInfo) {
-            return "WatchInfo: " + file + " " + flags + " " + JSON.stringify(options) + " " + (getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : detailInfo1 + " " + detailInfo2);
+            return "WatchInfo: ".concat(file, " ").concat(flags, " ").concat(JSON.stringify(options), " ").concat(getDetailWatchInfo ? getDetailWatchInfo(detailInfo1, detailInfo2) : detailInfo2 === undefined ? detailInfo1 : "".concat(detailInfo1, " ").concat(detailInfo2));
         }
     }
     ts.getWatchFactory = getWatchFactory;
@@ -86940,12 +93237,12 @@ var ts;
     }
     ts.formatDiagnostics = formatDiagnostics;
     function formatDiagnostic(diagnostic, host) {
-        var errorMessage = ts.diagnosticCategoryName(diagnostic) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) + host.getNewLine();
+        var errorMessage = "".concat(ts.diagnosticCategoryName(diagnostic), " TS").concat(diagnostic.code, ": ").concat(flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine())).concat(host.getNewLine());
         if (diagnostic.file) {
             var _a = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character;
             var fileName = diagnostic.file.fileName;
             var relativeFileName = ts.convertToRelativePath(fileName, host.getCurrentDirectory(), function (fileName) { return host.getCanonicalFileName(fileName); });
-            return relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): " + errorMessage;
+            return "".concat(relativeFileName, "(").concat(line + 1, ",").concat(character + 1, "): ") + errorMessage;
         }
         return errorMessage;
     }
@@ -86995,7 +93292,7 @@ var ts;
             var lineStart = ts.getPositionOfLineAndCharacter(file, i, 0);
             var lineEnd = i < lastLineInFile ? ts.getPositionOfLineAndCharacter(file, i + 1, 0) : file.text.length;
             var lineContent = file.text.slice(lineStart, lineEnd);
-            lineContent = lineContent.replace(/\s+$/g, "");
+            lineContent = ts.trimStringEnd(lineContent);
             lineContent = lineContent.replace(/\t/g, " ");
             context += indent + formatColorAndReset(ts.padLeft(i + 1 + "", gutterWidth), gutterStyleSequence) + gutterSeparator;
             context += lineContent + host.getNewLine();
@@ -87023,9 +93320,9 @@ var ts;
         var output = "";
         output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
         output += ":";
-        output += color("" + (firstLine + 1), ForegroundColorEscapeSequences.Yellow);
+        output += color("".concat(firstLine + 1), ForegroundColorEscapeSequences.Yellow);
         output += ":";
-        output += color("" + (firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
+        output += color("".concat(firstLineChar + 1), ForegroundColorEscapeSequences.Yellow);
         return output;
     }
     ts.formatLocation = formatLocation;
@@ -87039,7 +93336,7 @@ var ts;
                 output += " - ";
             }
             output += formatColorAndReset(ts.diagnosticCategoryName(diagnostic), getCategoryFormat(diagnostic.category));
-            output += formatColorAndReset(" TS" + diagnostic.code + ": ", ForegroundColorEscapeSequences.Grey);
+            output += formatColorAndReset(" TS".concat(diagnostic.code, ": "), ForegroundColorEscapeSequences.Grey);
             output += flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine());
             if (diagnostic.file) {
                 output += host.getNewLine();
@@ -87109,6 +93406,48 @@ var ts;
         return resolutions;
     }
     ts.loadWithLocalCache = loadWithLocalCache;
+    ;
+    function getModeForResolutionAtIndex(file, index) {
+        if (file.impliedNodeFormat === undefined)
+            return undefined;
+        return getModeForUsageLocation(file, getModuleNameStringLiteralAt(file, index));
+    }
+    ts.getModeForResolutionAtIndex = getModeForResolutionAtIndex;
+    function getModeForUsageLocation(file, usage) {
+        var _a;
+        if (file.impliedNodeFormat === undefined)
+            return undefined;
+        if (file.impliedNodeFormat !== ts.ModuleKind.ESNext) {
+            return ts.isImportCall(ts.walkUpParenthesizedExpressions(usage.parent)) ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
+        }
+        var exprParentParent = (_a = ts.walkUpParenthesizedExpressions(usage.parent)) === null || _a === void 0 ? void 0 : _a.parent;
+        return exprParentParent && ts.isImportEqualsDeclaration(exprParentParent) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext;
+    }
+    ts.getModeForUsageLocation = getModeForUsageLocation;
+    function loadWithModeAwareCache(names, containingFile, containingFileName, redirectedReference, loader) {
+        if (names.length === 0) {
+            return [];
+        }
+        var resolutions = [];
+        var cache = new ts.Map();
+        var i = 0;
+        for (var _i = 0, names_3 = names; _i < names_3.length; _i++) {
+            var name = names_3[_i];
+            var result = void 0;
+            var mode = getModeForResolutionAtIndex(containingFile, i);
+            i++;
+            var cacheKey = mode !== undefined ? "".concat(mode, "|").concat(name) : name;
+            if (cache.has(cacheKey)) {
+                result = cache.get(cacheKey);
+            }
+            else {
+                cache.set(cacheKey, result = loader(name, mode, containingFileName, redirectedReference));
+            }
+            resolutions.push(result);
+        }
+        return resolutions;
+    }
+    ts.loadWithModeAwareCache = loadWithModeAwareCache;
     function forEachResolvedProjectReference(resolvedProjectReferences, cb) {
         return forEachProjectReference(undefined, resolvedProjectReferences, function (resolvedRef, parent) { return resolvedRef && cb(resolvedRef, parent); });
     }
@@ -87119,9 +93458,8 @@ var ts;
         function worker(projectReferences, resolvedProjectReferences, parent) {
             if (cbRef) {
                 var result = cbRef(projectReferences, parent);
-                if (result) {
+                if (result)
                     return result;
-                }
             }
             return ts.forEach(resolvedProjectReferences, function (resolvedRef, index) {
                 if (resolvedRef && (seenResolvedRefs === null || seenResolvedRefs === void 0 ? void 0 : seenResolvedRefs.has(resolvedRef.sourceFile.path))) {
@@ -87161,7 +93499,7 @@ var ts;
         switch (kind) {
             case ts.FileIncludeKind.Import:
                 var importLiteral = getModuleNameStringLiteralAt(file, index);
-                packageId = (_e = (_d = file.resolvedModules) === null || _d === void 0 ? void 0 : _d.get(importLiteral.text)) === null || _e === void 0 ? void 0 : _e.packageId;
+                packageId = (_e = (_d = file.resolvedModules) === null || _d === void 0 ? void 0 : _d.get(importLiteral.text, getModeForResolutionAtIndex(file, index))) === null || _e === void 0 ? void 0 : _e.packageId;
                 if (importLiteral.pos === -1)
                     return { file: file, packageId: packageId, text: importLiteral.text };
                 pos = ts.skipTrivia(file.text, importLiteral.pos);
@@ -87172,7 +93510,7 @@ var ts;
                 break;
             case ts.FileIncludeKind.TypeReferenceDirective:
                 (_b = file.typeReferenceDirectives[index], pos = _b.pos, end = _b.end);
-                packageId = (_g = (_f = file.resolvedTypeReferenceDirectiveNames) === null || _f === void 0 ? void 0 : _f.get(ts.toFileNameLowerCase(file.typeReferenceDirectives[index].fileName))) === null || _g === void 0 ? void 0 : _g.packageId;
+                packageId = (_g = (_f = file.resolvedTypeReferenceDirectiveNames) === null || _f === void 0 ? void 0 : _f.get(ts.toFileNameLowerCase(file.typeReferenceDirectives[index].fileName), file.impliedNodeFormat)) === null || _g === void 0 ? void 0 : _g.packageId;
                 break;
             case ts.FileIncludeKind.LibReferenceDirective:
                 (_c = file.libReferenceDirectives[index], pos = _c.pos, end = _c.end);
@@ -87183,30 +93521,23 @@ var ts;
         return { file: file, pos: pos, end: end, packageId: packageId };
     }
     ts.getReferencedFileLocation = getReferencedFileLocation;
-    function isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences) {
-        if (!program || (hasChangedAutomaticTypeDirectiveNames === null || hasChangedAutomaticTypeDirectiveNames === void 0 ? void 0 : hasChangedAutomaticTypeDirectiveNames())) {
+    function isProgramUptoDate(program, rootFileNames, newOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences) {
+        if (!program || (hasChangedAutomaticTypeDirectiveNames === null || hasChangedAutomaticTypeDirectiveNames === void 0 ? void 0 : hasChangedAutomaticTypeDirectiveNames()))
             return false;
-        }
-        if (!ts.arrayIsEqualTo(program.getRootFileNames(), rootFileNames)) {
+        if (!ts.arrayIsEqualTo(program.getRootFileNames(), rootFileNames))
             return false;
-        }
         var seenResolvedRefs;
-        if (!ts.arrayIsEqualTo(program.getProjectReferences(), projectReferences, projectReferenceUptoDate)) {
+        if (!ts.arrayIsEqualTo(program.getProjectReferences(), projectReferences, projectReferenceUptoDate))
             return false;
-        }
-        if (program.getSourceFiles().some(sourceFileNotUptoDate)) {
+        if (program.getSourceFiles().some(sourceFileNotUptoDate))
             return false;
-        }
-        if (program.getMissingFilePaths().some(fileExists)) {
+        if (program.getMissingFilePaths().some(fileExists))
             return false;
-        }
         var currentOptions = program.getCompilerOptions();
-        if (!ts.compareDataObjects(currentOptions, newOptions)) {
+        if (!ts.compareDataObjects(currentOptions, newOptions))
             return false;
-        }
-        if (currentOptions.configFile && newOptions.configFile) {
+        if (currentOptions.configFile && newOptions.configFile)
             return currentOptions.configFile.text === newOptions.configFile.text;
-        }
         return true;
         function sourceFileNotUptoDate(sourceFile) {
             return !sourceFileVersionUptoDate(sourceFile) ||
@@ -87216,40 +93547,57 @@ var ts;
             return sourceFile.version === getSourceVersion(sourceFile.resolvedPath, sourceFile.fileName);
         }
         function projectReferenceUptoDate(oldRef, newRef, index) {
-            if (!ts.projectReferenceIsEqualTo(oldRef, newRef)) {
-                return false;
-            }
-            return resolvedProjectReferenceUptoDate(program.getResolvedProjectReferences()[index], oldRef);
+            return ts.projectReferenceIsEqualTo(oldRef, newRef) &&
+                resolvedProjectReferenceUptoDate(program.getResolvedProjectReferences()[index], oldRef);
         }
         function resolvedProjectReferenceUptoDate(oldResolvedRef, oldRef) {
             if (oldResolvedRef) {
-                if (ts.contains(seenResolvedRefs, oldResolvedRef)) {
+                if (ts.contains(seenResolvedRefs, oldResolvedRef))
                     return true;
-                }
-                if (!sourceFileVersionUptoDate(oldResolvedRef.sourceFile)) {
+                var refPath_1 = resolveProjectReferencePath(oldRef);
+                var newParsedCommandLine = getParsedCommandLine(refPath_1);
+                if (!newParsedCommandLine)
+                    return false;
+                if (oldResolvedRef.commandLine.options.configFile !== newParsedCommandLine.options.configFile)
+                    return false;
+                if (!ts.arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newParsedCommandLine.fileNames))
                     return false;
-                }
                 (seenResolvedRefs || (seenResolvedRefs = [])).push(oldResolvedRef);
                 return !ts.forEach(oldResolvedRef.references, function (childResolvedRef, index) {
                     return !resolvedProjectReferenceUptoDate(childResolvedRef, oldResolvedRef.commandLine.projectReferences[index]);
                 });
             }
-            return !fileExists(resolveProjectReferencePath(oldRef));
+            var refPath = resolveProjectReferencePath(oldRef);
+            return !getParsedCommandLine(refPath);
         }
     }
     ts.isProgramUptoDate = isProgramUptoDate;
     function getConfigFileParsingDiagnostics(configFileParseResult) {
-        return configFileParseResult.options.configFile ? __spreadArray(__spreadArray([], configFileParseResult.options.configFile.parseDiagnostics), configFileParseResult.errors) :
+        return configFileParseResult.options.configFile ? __spreadArray(__spreadArray([], configFileParseResult.options.configFile.parseDiagnostics, true), configFileParseResult.errors, true) :
             configFileParseResult.errors;
     }
     ts.getConfigFileParsingDiagnostics = getConfigFileParsingDiagnostics;
+    function getImpliedNodeFormatForFile(fileName, packageJsonInfoCache, host, options) {
+        switch (ts.getEmitModuleResolutionKind(options)) {
+            case ts.ModuleResolutionKind.Node12:
+            case ts.ModuleResolutionKind.NodeNext:
+                return ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".mjs"]) ? ts.ModuleKind.ESNext :
+                    ts.fileExtensionIsOneOf(fileName, [".d.cts", ".cts", ".cjs"]) ? ts.ModuleKind.CommonJS :
+                        ts.fileExtensionIsOneOf(fileName, [".d.ts", ".ts", ".tsx", ".js", ".jsx"]) ? lookupFromPackageJson() :
+                            undefined;
+            default:
+                return undefined;
+        }
+        function lookupFromPackageJson() {
+            var scope = ts.getPackageScopeForPath(fileName, packageJsonInfoCache, host, options);
+            return (scope === null || scope === void 0 ? void 0 : scope.packageJsonContent.type) === "module" ? ts.ModuleKind.ESNext : ts.ModuleKind.CommonJS;
+        }
+    }
+    ts.getImpliedNodeFormatForFile = getImpliedNodeFormatForFile;
     function shouldProgramCreateNewSourceFiles(program, newOptions) {
         if (!program)
             return false;
-        var oldOptions = program.getCompilerOptions();
-        return !!ts.sourceFileAffectingCompilerOptions.some(function (option) {
-            return !ts.isJsonEqual(ts.getCompilerOptionValue(oldOptions, option), ts.getCompilerOptionValue(newOptions, option));
-        });
+        return ts.optionsHaveChanges(program.getCompilerOptions(), newOptions, ts.sourceFileAffectingCompilerOptions);
     }
     function createCreateProgramOptions(rootNames, options, host, oldProgram, configFileParsingDiagnostics) {
         return {
@@ -87261,7 +93609,7 @@ var ts;
         };
     }
     function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) {
-        var _a, _b, _c;
+        var _a, _b, _c, _d;
         var createProgramOptions = ts.isArray(rootNamesOrOptions) ? createCreateProgramOptions(rootNamesOrOptions, _options, _host, _oldProgram, _configFileParsingDiagnostics) : rootNamesOrOptions;
         var rootNames = createProgramOptions.rootNames, options = createProgramOptions.options, configFileParsingDiagnostics = createProgramOptions.configFileParsingDiagnostics, projectReferences = createProgramOptions.projectReferences;
         var oldProgram = createProgramOptions.oldProgram;
@@ -87293,14 +93641,15 @@ var ts;
         var programDiagnostics = ts.createDiagnosticCollection();
         var currentDirectory = host.getCurrentDirectory();
         var supportedExtensions = ts.getSupportedExtensions(options);
-        var supportedExtensionsWithJsonIfResolveJsonModule = ts.getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
+        var supportedExtensionsWithJsonIfResolveJsonModule = ts.getSupportedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
         var hasEmitBlockingDiagnostics = new ts.Map();
         var _compilerOptionsObjectLiteralSyntax;
         var moduleResolutionCache;
+        var typeReferenceDirectiveResolutionCache;
         var actualResolveModuleNamesWorker;
         var hasInvalidatedResolution = host.hasInvalidatedResolution || ts.returnFalse;
         if (host.resolveModuleNames) {
-            actualResolveModuleNamesWorker = function (moduleNames, containingFile, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFile, reusedNames, redirectedReference, options).map(function (resolved) {
+            actualResolveModuleNamesWorker = function (moduleNames, containingFile, containingFileName, reusedNames, redirectedReference) { return host.resolveModuleNames(ts.Debug.checkEachDefined(moduleNames), containingFileName, reusedNames, redirectedReference, options, containingFile).map(function (resolved) {
                 if (!resolved || resolved.extension !== undefined) {
                     return resolved;
                 }
@@ -87308,23 +93657,26 @@ var ts;
                 withExtension.extension = ts.extensionFromPath(resolved.resolvedFileName);
                 return withExtension;
             }); };
+            moduleResolutionCache = (_a = host.getModuleResolutionCache) === null || _a === void 0 ? void 0 : _a.call(host);
         }
         else {
-            moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, function (x) { return host.getCanonicalFileName(x); }, options);
-            var loader_1 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, options, host, moduleResolutionCache, redirectedReference).resolvedModule; };
-            actualResolveModuleNamesWorker = function (moduleNames, containingFile, _reusedNames, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_1); };
+            moduleResolutionCache = ts.createModuleResolutionCache(currentDirectory, getCanonicalFileName, options);
+            var loader_1 = function (moduleName, resolverMode, containingFileName, redirectedReference) { return ts.resolveModuleName(moduleName, containingFileName, options, host, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule; };
+            actualResolveModuleNamesWorker = function (moduleNames, containingFile, containingFileName, _reusedNames, redirectedReference) { return loadWithModeAwareCache(ts.Debug.checkEachDefined(moduleNames), containingFile, containingFileName, redirectedReference, loader_1); };
         }
         var actualResolveTypeReferenceDirectiveNamesWorker;
         if (host.resolveTypeReferenceDirectives) {
             actualResolveTypeReferenceDirectiveNamesWorker = function (typeDirectiveNames, containingFile, redirectedReference) { return host.resolveTypeReferenceDirectives(ts.Debug.checkEachDefined(typeDirectiveNames), containingFile, redirectedReference, options); };
         }
         else {
-            var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference).resolvedTypeReferenceDirective; };
+            typeReferenceDirectiveResolutionCache = ts.createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, undefined, moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.getPackageJsonInfoCache());
+            var loader_2 = function (typesRef, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(typesRef, containingFile, options, host, redirectedReference, typeReferenceDirectiveResolutionCache).resolvedTypeReferenceDirective; };
             actualResolveTypeReferenceDirectiveNamesWorker = function (typeReferenceDirectiveNames, containingFile, redirectedReference) { return loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_2); };
         }
         var packageIdToSourceFile = new ts.Map();
         var sourceFileToPackageName = new ts.Map();
         var redirectTargetsMap = ts.createMultiMap();
+        var usesUriStyleNodeCoreModules = false;
         var filesByName = new ts.Map();
         var missingFilePaths;
         var filesByNameIgnoreCase = host.useCaseSensitiveFileNames() ? new ts.Map() : undefined;
@@ -87332,9 +93684,9 @@ var ts;
         var projectReferenceRedirects;
         var mapFromFileToProjectReferenceRedirects;
         var mapFromToProjectReferenceRedirectSource;
-        var useSourceOfProjectReferenceRedirect = !!((_a = host.useSourceOfProjectReferenceRedirect) === null || _a === void 0 ? void 0 : _a.call(host)) &&
+        var useSourceOfProjectReferenceRedirect = !!((_b = host.useSourceOfProjectReferenceRedirect) === null || _b === void 0 ? void 0 : _b.call(host)) &&
             !options.disableSourceOfProjectReferenceRedirect;
-        var _d = updateHostForUseSourceOfProjectReferenceRedirect({
+        var _e = updateHostForUseSourceOfProjectReferenceRedirect({
             compilerHost: host,
             getSymlinkCache: getSymlinkCache,
             useSourceOfProjectReferenceRedirect: useSourceOfProjectReferenceRedirect,
@@ -87342,7 +93694,8 @@ var ts;
             getResolvedProjectReferences: getResolvedProjectReferences,
             getSourceOfProjectReferenceRedirect: getSourceOfProjectReferenceRedirect,
             forEachResolvedProjectReference: forEachResolvedProjectReference
-        }), onProgramCreateComplete = _d.onProgramCreateComplete, fileExists = _d.fileExists, directoryExists = _d.directoryExists;
+        }), onProgramCreateComplete = _e.onProgramCreateComplete, fileExists = _e.fileExists, directoryExists = _e.directoryExists;
+        var readFile = host.readFile.bind(host);
         ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
         var shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
         ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
@@ -87397,7 +93750,7 @@ var ts;
                 var containingFilename = ts.combinePaths(containingDirectory, ts.inferredTypesContainingFile);
                 var resolutions = resolveTypeReferenceDirectiveNamesWorker(typeReferences, containingFilename);
                 for (var i = 0; i < typeReferences.length; i++) {
-                    processTypeReferenceDirective(typeReferences[i], resolutions[i], { kind: ts.FileIncludeKind.AutomaticTypeDirectiveFile, typeReference: typeReferences[i], packageId: (_b = resolutions[i]) === null || _b === void 0 ? void 0 : _b.packageId });
+                    processTypeReferenceDirective(typeReferences[i], resolutions[i], { kind: ts.FileIncludeKind.AutomaticTypeDirectiveFile, typeReference: typeReferences[i], packageId: (_c = resolutions[i]) === null || _c === void 0 ? void 0 : _c.packageId });
                 }
                 ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
             }
@@ -87408,7 +93761,7 @@ var ts;
                 }
                 else {
                     ts.forEach(options.lib, function (libFileName, index) {
-                        processRootFile(ts.combinePaths(defaultLibraryPath, libFileName), true, false, { kind: ts.FileIncludeKind.LibFile, index: index });
+                        processRootFile(pathForLibFile(libFileName), true, false, { kind: ts.FileIncludeKind.LibFile, index: index });
                     });
                 }
             }
@@ -87431,12 +93784,24 @@ var ts;
                     host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path));
                 }
             }
-            oldProgram.forEachResolvedProjectReference(function (resolvedProjectReference) {
-                if (!getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) {
-                    host.onReleaseOldSourceFile(resolvedProjectReference.sourceFile, oldProgram.getCompilerOptions(), false);
+            if (!host.getParsedCommandLine) {
+                oldProgram.forEachResolvedProjectReference(function (resolvedProjectReference) {
+                    if (!getResolvedProjectReferenceByPath(resolvedProjectReference.sourceFile.path)) {
+                        host.onReleaseOldSourceFile(resolvedProjectReference.sourceFile, oldProgram.getCompilerOptions(), false);
+                    }
+                });
+            }
+        }
+        if (oldProgram && host.onReleaseParsedCommandLine) {
+            forEachProjectReference(oldProgram.getProjectReferences(), oldProgram.getResolvedProjectReferences(), function (oldResolvedRef, parent, index) {
+                var oldReference = (parent === null || parent === void 0 ? void 0 : parent.commandLine.projectReferences[index]) || oldProgram.getProjectReferences()[index];
+                var oldRefPath = resolveProjectReferencePath(oldReference);
+                if (!(projectReferenceRedirects === null || projectReferenceRedirects === void 0 ? void 0 : projectReferenceRedirects.has(toPath(oldRefPath)))) {
+                    host.onReleaseParsedCommandLine(oldRefPath, oldResolvedRef, oldProgram.getCompilerOptions());
                 }
             });
         }
+        typeReferenceDirectiveResolutionCache = undefined;
         oldProgram = undefined;
         var program = {
             getRootFileNames: function () { return rootNames; },
@@ -87444,6 +93809,7 @@ var ts;
             getSourceFileByPath: getSourceFileByPath,
             getSourceFiles: function () { return files; },
             getMissingFilePaths: function () { return missingFilePaths; },
+            getModuleResolutionCache: function () { return moduleResolutionCache; },
             getFilesByNameMap: function () { return filesByName; },
             getCompilerOptions: function () { return options; },
             getSyntacticDiagnostics: getSyntacticDiagnostics,
@@ -87464,7 +93830,6 @@ var ts;
             getNodeCount: function () { return getDiagnosticsProducingTypeChecker().getNodeCount(); },
             getIdentifierCount: function () { return getDiagnosticsProducingTypeChecker().getIdentifierCount(); },
             getSymbolCount: function () { return getDiagnosticsProducingTypeChecker().getSymbolCount(); },
-            getTypeCatalog: function () { return getDiagnosticsProducingTypeChecker().getTypeCatalog(); },
             getTypeCount: function () { return getDiagnosticsProducingTypeChecker().getTypeCount(); },
             getInstantiationCount: function () { return getDiagnosticsProducingTypeChecker().getInstantiationCount(); },
             getRelationCacheSizes: function () { return getDiagnosticsProducingTypeChecker().getRelationCacheSizes(); },
@@ -87477,6 +93842,7 @@ var ts;
             getLibFileFromReference: getLibFileFromReference,
             sourceFileToPackageName: sourceFileToPackageName,
             redirectTargetsMap: redirectTargetsMap,
+            usesUriStyleNodeCoreModules: usesUriStyleNodeCoreModules,
             isEmittedFile: isEmittedFile,
             getConfigFileParsingDiagnostics: getConfigFileParsingDiagnostics,
             getResolvedModuleWithFailedLookupLocationsFromCache: getResolvedModuleWithFailedLookupLocationsFromCache,
@@ -87489,9 +93855,10 @@ var ts;
             isSourceOfProjectReferenceRedirect: isSourceOfProjectReferenceRedirect,
             emitBuildInfo: emitBuildInfo,
             fileExists: fileExists,
+            readFile: readFile,
             directoryExists: directoryExists,
             getSymlinkCache: getSymlinkCache,
-            realpath: (_c = host.realpath) === null || _c === void 0 ? void 0 : _c.bind(host),
+            realpath: (_d = host.realpath) === null || _d === void 0 ? void 0 : _d.bind(host),
             useCaseSensitiveFileNames: function () { return host.useCaseSensitiveFileNames(); },
             getFileIncludeReasons: function () { return fileReasons; },
             structureIsReused: structureIsReused,
@@ -87503,7 +93870,7 @@ var ts;
                     return programDiagnostics.add(createDiagnosticExplainingFile(diagnostic.file && getSourceFileByPath(diagnostic.file), diagnostic.fileProcessingReason, diagnostic.diagnostic, diagnostic.args || ts.emptyArray));
                 case 0:
                     var _a = getReferencedFileLocation(getSourceFileByPath, diagnostic.reason), file = _a.file, pos = _a.pos, end = _a.end;
-                    return programDiagnostics.add(ts.createFileDiagnostic.apply(void 0, __spreadArray([file, ts.Debug.checkDefined(pos), ts.Debug.checkDefined(end) - pos, diagnostic.diagnostic], diagnostic.args || ts.emptyArray)));
+                    return programDiagnostics.add(ts.createFileDiagnostic.apply(void 0, __spreadArray([file, ts.Debug.checkDefined(pos), ts.Debug.checkDefined(end) - pos, diagnostic.diagnostic], diagnostic.args || ts.emptyArray, false)));
                 default:
                     ts.Debug.assertNever(diagnostic);
             }
@@ -87520,7 +93887,7 @@ var ts;
             var redirectedReference = getRedirectReferenceForResolution(containingFile);
             ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "resolveModuleNamesWorker", { containingFileName: containingFileName });
             ts.performance.mark("beforeResolveModule");
-            var result = actualResolveModuleNamesWorker(moduleNames, containingFileName, reusedNames, redirectedReference);
+            var result = actualResolveModuleNamesWorker(moduleNames, containingFile, containingFileName, reusedNames, redirectedReference);
             ts.performance.mark("afterResolveModule");
             ts.performance.measure("ResolveModule", "beforeResolveModule", "afterResolveModule");
             ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
@@ -87541,19 +93908,18 @@ var ts;
         }
         function getRedirectReferenceForResolution(file) {
             var redirect = getResolvedProjectReferenceToRedirect(file.originalFileName);
-            if (redirect || !ts.fileExtensionIs(file.originalFileName, ".d.ts"))
+            if (redirect || !ts.fileExtensionIsOneOf(file.originalFileName, [".d.ts", ".d.cts", ".d.mts"]))
                 return redirect;
-            var resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.originalFileName, file.path);
+            var resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
             if (resultFromDts)
                 return resultFromDts;
             if (!host.realpath || !options.preserveSymlinks || !ts.stringContains(file.originalFileName, ts.nodeModulesPathPart))
                 return undefined;
-            var realDeclarationFileName = host.realpath(file.originalFileName);
-            var realDeclarationPath = toPath(realDeclarationFileName);
-            return realDeclarationPath === file.path ? undefined : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationFileName, realDeclarationPath);
+            var realDeclarationPath = toPath(host.realpath(file.originalFileName));
+            return realDeclarationPath === file.path ? undefined : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationPath);
         }
-        function getRedirectReferenceForResolutionFromSourceOfProject(fileName, filePath) {
-            var source = getSourceOfProjectReferenceRedirect(fileName);
+        function getRedirectReferenceForResolutionFromSourceOfProject(filePath) {
+            var source = getSourceOfProjectReferenceRedirect(filePath);
             if (ts.isString(source))
                 return getResolvedProjectReferenceToRedirect(source);
             if (!source)
@@ -87580,8 +93946,8 @@ var ts;
             }
             return ts.libs.length + 2;
         }
-        function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile) {
-            return moduleResolutionCache && ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache);
+        function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile, mode) {
+            return moduleResolutionCache && ts.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache, mode);
         }
         function toPath(fileName) {
             return ts.toPath(fileName, currentDirectory, getCanonicalFileName);
@@ -87598,8 +93964,8 @@ var ts;
             if (!classifiableNames) {
                 getTypeChecker();
                 classifiableNames = new ts.Set();
-                for (var _i = 0, files_2 = files; _i < files_2.length; _i++) {
-                    var sourceFile = files_2[_i];
+                for (var _i = 0, files_3 = files; _i < files_3.length; _i++) {
+                    var sourceFile = files_3[_i];
                     (_a = sourceFile.classifiableNames) === null || _a === void 0 ? void 0 : _a.forEach(function (value) { return classifiableNames.add(value); });
                 }
             }
@@ -87611,13 +93977,15 @@ var ts;
             }
             var oldSourceFile = oldProgram && oldProgram.getSourceFile(file.fileName);
             if (oldSourceFile !== file && file.resolvedModules) {
-                var result_14 = [];
+                var result_13 = [];
+                var i = 0;
                 for (var _i = 0, moduleNames_1 = moduleNames; _i < moduleNames_1.length; _i++) {
                     var moduleName = moduleNames_1[_i];
-                    var resolvedModule = file.resolvedModules.get(moduleName);
-                    result_14.push(resolvedModule);
+                    var resolvedModule = file.resolvedModules.get(moduleName, getModeForResolutionAtIndex(file, i));
+                    i++;
+                    result_13.push(resolvedModule);
                 }
-                return result_14;
+                return result_13;
             }
             var unknownModuleNames;
             var result;
@@ -87626,10 +93994,12 @@ var ts;
             for (var i = 0; i < moduleNames.length; i++) {
                 var moduleName = moduleNames[i];
                 if (file === oldSourceFile && !hasInvalidatedResolution(oldSourceFile.path)) {
-                    var oldResolvedModule = ts.getResolvedModule(oldSourceFile, moduleName);
+                    var oldResolvedModule = ts.getResolvedModule(oldSourceFile, moduleName, getModeForResolutionAtIndex(oldSourceFile, i));
                     if (oldResolvedModule) {
                         if (ts.isTraceEnabled(options, host)) {
-                            ts.trace(host, ts.Diagnostics.Reusing_resolution_of_module_0_to_file_1_from_old_program, moduleName, ts.getNormalizedAbsolutePath(file.originalFileName, currentDirectory));
+                            ts.trace(host, oldResolvedModule.packageId ?
+                                ts.Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 :
+                                ts.Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2, moduleName, ts.getNormalizedAbsolutePath(file.originalFileName, currentDirectory), oldResolvedModule.resolvedFileName, oldResolvedModule.packageId && ts.packageIdToString(oldResolvedModule.packageId));
                         }
                         (result || (result = new Array(moduleNames.length)))[i] = oldResolvedModule;
                         (reusedNames || (reusedNames = [])).push(moduleName);
@@ -87644,7 +94014,7 @@ var ts;
                     }
                 }
                 else {
-                    resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName);
+                    resolvesToAmbientModuleInNonModifiedFile = moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, i);
                 }
                 if (resolvesToAmbientModuleInNonModifiedFile) {
                     (result || (result = new Array(moduleNames.length)))[i] = predictedToResolveToAmbientModuleMarker;
@@ -87674,8 +94044,10 @@ var ts;
             }
             ts.Debug.assert(j === resolutions.length);
             return result;
-            function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName) {
-                var resolutionToFile = ts.getResolvedModule(oldSourceFile, moduleName);
+            function moduleNameResolvesToAmbientModuleInNonModifiedFile(moduleName, index) {
+                if (index >= ts.length(oldSourceFile === null || oldSourceFile === void 0 ? void 0 : oldSourceFile.imports) + ts.length(oldSourceFile === null || oldSourceFile === void 0 ? void 0 : oldSourceFile.moduleAugmentations))
+                    return false;
+                var resolutionToFile = ts.getResolvedModule(oldSourceFile, moduleName, oldSourceFile && getModeForResolutionAtIndex(oldSourceFile, index));
                 var resolvedFile = resolutionToFile && oldProgram.getSourceFile(resolutionToFile.resolvedFileName);
                 if (resolutionToFile && resolvedFile) {
                     return false;
@@ -87695,7 +94067,9 @@ var ts;
                 var newRef = (parent ? parent.commandLine.projectReferences : projectReferences)[index];
                 var newResolvedRef = parseProjectReferenceConfigFile(newRef);
                 if (oldResolvedRef) {
-                    return !newResolvedRef || newResolvedRef.sourceFile !== oldResolvedRef.sourceFile;
+                    return !newResolvedRef ||
+                        newResolvedRef.sourceFile !== oldResolvedRef.sourceFile ||
+                        !ts.arrayIsEqualTo(oldResolvedRef.commandLine.fileNames, newResolvedRef.commandLine.fileNames);
                 }
                 else {
                     return newResolvedRef !== undefined;
@@ -87718,9 +94092,6 @@ var ts;
             if (!ts.arrayIsEqualTo(oldRootNames, rootNames)) {
                 return 0;
             }
-            if (!ts.arrayIsEqualTo(options.types, oldOptions.types)) {
-                return 0;
-            }
             if (!canReuseProjectReferences()) {
                 return 0;
             }
@@ -87738,8 +94109,8 @@ var ts;
             for (var _i = 0, oldSourceFiles_2 = oldSourceFiles; _i < oldSourceFiles_2.length; _i++) {
                 var oldSourceFile = oldSourceFiles_2[_i];
                 var newSourceFile = host.getSourceFileByPath
-                    ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath, options.target, undefined, shouldCreateNewSourceFile)
-                    : host.getSourceFile(oldSourceFile.fileName, options.target, undefined, shouldCreateNewSourceFile);
+                    ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath, ts.getEmitScriptTarget(options), undefined, shouldCreateNewSourceFile)
+                    : host.getSourceFile(oldSourceFile.fileName, ts.getEmitScriptTarget(options), undefined, shouldCreateNewSourceFile);
                 if (!newSourceFile) {
                     return 0;
                 }
@@ -87776,7 +94147,7 @@ var ts;
                 }
                 if (fileChanged) {
                     if (!ts.arrayIsEqualTo(oldSourceFile.libReferenceDirectives, newSourceFile.libReferenceDirectives, fileReferenceIsEqualTo)) {
-                        return 0;
+                        structureIsReused = 1;
                     }
                     if (oldSourceFile.hasNoDefaultLib !== newSourceFile.hasNoDefaultLib) {
                         structureIsReused = 1;
@@ -87822,20 +94193,20 @@ var ts;
                 var _f = modifiedSourceFiles_1[_e], oldSourceFile = _f.oldFile, newSourceFile = _f.newFile;
                 var moduleNames = getModuleNames(newSourceFile);
                 var resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFile);
-                var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, ts.moduleResolutionIsEqualTo);
+                var resolutionsChanged = ts.hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, oldSourceFile, ts.moduleResolutionIsEqualTo);
                 if (resolutionsChanged) {
                     structureIsReused = 1;
-                    newSourceFile.resolvedModules = ts.zipToMap(moduleNames, resolutions);
+                    newSourceFile.resolvedModules = ts.zipToModeAwareCache(newSourceFile, moduleNames, resolutions);
                 }
                 else {
                     newSourceFile.resolvedModules = oldSourceFile.resolvedModules;
                 }
                 var typesReferenceDirectives = ts.map(newSourceFile.typeReferenceDirectives, function (ref) { return ts.toFileNameLowerCase(ref.fileName); });
                 var typeReferenceResolutions = resolveTypeReferenceDirectiveNamesWorker(typesReferenceDirectives, newSourceFile);
-                var typeReferenceEesolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, ts.typeDirectiveIsEqualTo);
-                if (typeReferenceEesolutionsChanged) {
+                var typeReferenceResolutionsChanged = ts.hasChangesInResolutions(typesReferenceDirectives, typeReferenceResolutions, oldSourceFile.resolvedTypeReferenceDirectiveNames, oldSourceFile, ts.typeDirectiveIsEqualTo);
+                if (typeReferenceResolutionsChanged) {
                     structureIsReused = 1;
-                    newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToMap(typesReferenceDirectives, typeReferenceResolutions);
+                    newSourceFile.resolvedTypeReferenceDirectiveNames = ts.zipToModeAwareCache(newSourceFile, typesReferenceDirectives, typeReferenceResolutions);
                 }
                 else {
                     newSourceFile.resolvedTypeReferenceDirectiveNames = oldSourceFile.resolvedTypeReferenceDirectiveNames;
@@ -87844,7 +94215,7 @@ var ts;
             if (structureIsReused !== 2) {
                 return structureIsReused;
             }
-            if ((_a = host.hasChangedAutomaticTypeDirectiveNames) === null || _a === void 0 ? void 0 : _a.call(host)) {
+            if (ts.changesAffectingProgramStructure(oldOptions, options) || ((_a = host.hasChangedAutomaticTypeDirectiveNames) === null || _a === void 0 ? void 0 : _a.call(host))) {
                 return 1;
             }
             missingFilePaths = oldProgram.getMissingFilePaths();
@@ -87873,6 +94244,7 @@ var ts;
             resolvedTypeReferenceDirectives = oldProgram.getResolvedTypeReferenceDirectives();
             sourceFileToPackageName = oldProgram.sourceFileToPackageName;
             redirectTargetsMap = oldProgram.redirectTargetsMap;
+            usesUriStyleNodeCoreModules = oldProgram.usesUriStyleNodeCoreModules;
             return 2;
         }
         function getEmitHost(writeFileCallback) {
@@ -87948,7 +94320,7 @@ var ts;
                 return equalityComparer(file.fileName, getDefaultLibraryFileName());
             }
             else {
-                return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName, ts.combinePaths(defaultLibraryPath, libFileName)); });
+                return ts.some(options.lib, function (libFileName) { return equalityComparer(file.fileName, pathForLibFile(libFileName)); });
             }
         }
         function getDiagnosticsProducingTypeChecker() {
@@ -88056,7 +94428,7 @@ var ts;
             }
         }
         function getSemanticDiagnosticsForFile(sourceFile, cancellationToken) {
-            return ts.concatenate(filterSemanticDiagnotics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken), options), getProgramDiagnostics(sourceFile));
+            return ts.concatenate(filterSemanticDiagnostics(getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken), options), getProgramDiagnostics(sourceFile));
         }
         function getBindAndCheckDiagnosticsForFile(sourceFile, cancellationToken) {
             return getAndCacheDiagnostics(sourceFile, cancellationToken, cachedBindAndCheckDiagnosticsForFile, getBindAndCheckDiagnosticsForFileNoCache);
@@ -88070,8 +94442,8 @@ var ts;
                 ts.Debug.assert(!!sourceFile.bindDiagnostics);
                 var isCheckJs = ts.isCheckJsEnabledForFile(sourceFile, options);
                 var isTsNoCheck = !!sourceFile.checkJsDirective && sourceFile.checkJsDirective.enabled === false;
-                var includeBindAndCheckDiagnostics = !isTsNoCheck && (sourceFile.scriptKind === 3 || sourceFile.scriptKind === 4 ||
-                    sourceFile.scriptKind === 5 || isCheckJs || sourceFile.scriptKind === 7);
+                var includeBindAndCheckDiagnostics = !isTsNoCheck && (sourceFile.scriptKind === 3 || sourceFile.scriptKind === 4
+                    || sourceFile.scriptKind === 5 || isCheckJs || sourceFile.scriptKind === 7);
                 var bindDiagnostics = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : ts.emptyArray;
                 var checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : ts.emptyArray;
                 return getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : undefined);
@@ -88131,79 +94503,79 @@ var ts;
                 return diagnostics;
                 function walk(node, parent) {
                     switch (parent.kind) {
-                        case 160:
                         case 163:
-                        case 165:
+                        case 166:
+                        case 168:
                             if (parent.questionToken === node) {
                                 diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, "?"));
                                 return "skip";
                             }
-                        case 164:
-                        case 166:
                         case 167:
-                        case 168:
-                        case 208:
-                        case 251:
-                        case 209:
-                        case 249:
+                        case 170:
+                        case 171:
+                        case 172:
+                        case 212:
+                        case 255:
+                        case 213:
+                        case 253:
                             if (parent.type === node) {
                                 diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_annotations_can_only_be_used_in_TypeScript_files));
                                 return "skip";
                             }
                     }
                     switch (node.kind) {
-                        case 262:
+                        case 266:
                             if (node.isTypeOnly) {
                                 diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type"));
                                 return "skip";
                             }
                             break;
-                        case 267:
+                        case 271:
                             if (node.isTypeOnly) {
                                 diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "export type"));
                                 return "skip";
                             }
                             break;
-                        case 260:
+                        case 264:
                             diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.import_can_only_be_used_in_TypeScript_files));
                             return "skip";
-                        case 266:
+                        case 270:
                             if (node.isExportEquals) {
                                 diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.export_can_only_be_used_in_TypeScript_files));
                                 return "skip";
                             }
                             break;
-                        case 286:
+                        case 290:
                             var heritageClause = node;
-                            if (heritageClause.token === 116) {
+                            if (heritageClause.token === 117) {
                                 diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.implements_clauses_can_only_be_used_in_TypeScript_files));
                                 return "skip";
                             }
                             break;
-                        case 253:
-                            var interfaceKeyword = ts.tokenToString(117);
+                        case 257:
+                            var interfaceKeyword = ts.tokenToString(118);
                             ts.Debug.assertIsDefined(interfaceKeyword);
                             diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, interfaceKeyword));
                             return "skip";
-                        case 256:
-                            var moduleKeyword = node.flags & 16 ? ts.tokenToString(140) : ts.tokenToString(139);
+                        case 260:
+                            var moduleKeyword = node.flags & 16 ? ts.tokenToString(142) : ts.tokenToString(141);
                             ts.Debug.assertIsDefined(moduleKeyword);
                             diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, moduleKeyword));
                             return "skip";
-                        case 254:
+                        case 258:
                             diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Type_aliases_can_only_be_used_in_TypeScript_files));
                             return "skip";
-                        case 255:
-                            var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(91));
+                        case 259:
+                            var enumKeyword = ts.Debug.checkDefined(ts.tokenToString(92));
                             diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, enumKeyword));
                             return "skip";
-                        case 225:
+                        case 229:
                             diagnostics.push(createDiagnosticForNode(node, ts.Diagnostics.Non_null_assertions_can_only_be_used_in_TypeScript_files));
                             return "skip";
-                        case 224:
+                        case 228:
                             diagnostics.push(createDiagnosticForNode(node.type, ts.Diagnostics.Type_assertion_expressions_can_only_be_used_in_TypeScript_files));
                             return "skip";
-                        case 206:
+                        case 210:
                             ts.Debug.fail();
                     }
                 }
@@ -88212,48 +94584,48 @@ var ts;
                         diagnostics.push(createDiagnosticForNode(parent, ts.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_in_your_tsconfig_or_jsconfig_to_remove_this_warning));
                     }
                     switch (parent.kind) {
-                        case 252:
-                        case 221:
-                        case 165:
-                        case 166:
-                        case 167:
+                        case 256:
+                        case 225:
                         case 168:
-                        case 208:
-                        case 251:
-                        case 209:
+                        case 170:
+                        case 171:
+                        case 172:
+                        case 212:
+                        case 255:
+                        case 213:
                             if (nodes === parent.typeParameters) {
                                 diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_parameter_declarations_can_only_be_used_in_TypeScript_files));
                                 return "skip";
                             }
-                        case 232:
+                        case 236:
                             if (nodes === parent.modifiers) {
-                                checkModifiers(parent.modifiers, parent.kind === 232);
+                                checkModifiers(parent.modifiers, parent.kind === 236);
                                 return "skip";
                             }
                             break;
-                        case 163:
+                        case 166:
                             if (nodes === parent.modifiers) {
                                 for (var _i = 0, _a = nodes; _i < _a.length; _i++) {
                                     var modifier = _a[_i];
-                                    if (modifier.kind !== 123) {
+                                    if (modifier.kind !== 124) {
                                         diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind)));
                                     }
                                 }
                                 return "skip";
                             }
                             break;
-                        case 160:
+                        case 163:
                             if (nodes === parent.modifiers) {
                                 diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Parameter_modifiers_can_only_be_used_in_TypeScript_files));
                                 return "skip";
                             }
                             break;
-                        case 203:
-                        case 204:
-                        case 223:
-                        case 274:
-                        case 275:
-                        case 205:
+                        case 207:
+                        case 208:
+                        case 227:
+                        case 278:
+                        case 279:
+                        case 209:
                             if (nodes === parent.typeArguments) {
                                 diagnostics.push(createDiagnosticForNodeArray(nodes, ts.Diagnostics.Type_arguments_can_only_be_used_in_TypeScript_files));
                                 return "skip";
@@ -88265,21 +94637,22 @@ var ts;
                     for (var _i = 0, modifiers_2 = modifiers; _i < modifiers_2.length; _i++) {
                         var modifier = modifiers_2[_i];
                         switch (modifier.kind) {
-                            case 84:
+                            case 85:
                                 if (isConstValid) {
                                     continue;
                                 }
-                            case 122:
-                            case 120:
+                            case 123:
                             case 121:
-                            case 142:
-                            case 133:
-                            case 125:
+                            case 122:
+                            case 144:
+                            case 135:
+                            case 126:
+                            case 158:
                                 diagnostics.push(createDiagnosticForNode(modifier, ts.Diagnostics.The_0_modifier_can_only_be_used_in_TypeScript_files, ts.tokenToString(modifier.kind)));
                                 break;
-                            case 123:
-                            case 92:
-                            case 87:
+                            case 124:
+                            case 93:
+                            case 88:
                         }
                     }
                 }
@@ -88325,9 +94698,8 @@ var ts;
             return ts.sortAndDeduplicateDiagnostics(ts.concatenate(programDiagnostics.getGlobalDiagnostics(), getOptionsDiagnosticsOfConfigFile()));
         }
         function getOptionsDiagnosticsOfConfigFile() {
-            if (!options.configFile) {
+            if (!options.configFile)
                 return ts.emptyArray;
-            }
             var diagnostics = programDiagnostics.getDiagnostics(options.configFile.fileName);
             forEachResolvedProjectReference(function (resolvedRef) {
                 diagnostics = ts.concatenate(diagnostics, programDiagnostics.getDiagnostics(resolvedRef.sourceFile.fileName));
@@ -88347,13 +94719,13 @@ var ts;
             return a.fileName === b.fileName;
         }
         function moduleNameIsEqualTo(a, b) {
-            return a.kind === 78
-                ? b.kind === 78 && a.escapedText === b.escapedText
+            return a.kind === 79
+                ? b.kind === 79 && a.escapedText === b.escapedText
                 : b.kind === 10 && a.text === b.text;
         }
         function createSyntheticImport(text, file) {
             var externalHelpersModuleReference = ts.factory.createStringLiteral(text);
-            var importDecl = ts.factory.createImportDeclaration(undefined, undefined, undefined, externalHelpersModuleReference);
+            var importDecl = ts.factory.createImportDeclaration(undefined, undefined, undefined, externalHelpersModuleReference, undefined);
             ts.addEmitFlags(importDecl, 67108864);
             ts.setParent(externalHelpersModuleReference, importDecl);
             ts.setParent(importDecl, file);
@@ -88395,11 +94767,16 @@ var ts;
                 if (ts.isAnyImportOrReExport(node)) {
                     var moduleNameExpr = ts.getExternalModuleName(node);
                     if (moduleNameExpr && ts.isStringLiteral(moduleNameExpr) && moduleNameExpr.text && (!inAmbientModule || !ts.isExternalModuleNameRelative(moduleNameExpr.text))) {
+                        ts.setParentRecursive(node, false);
                         imports = ts.append(imports, moduleNameExpr);
+                        if (!usesUriStyleNodeCoreModules && currentNodeModulesDepth === 0 && !file.isDeclarationFile) {
+                            usesUriStyleNodeCoreModules = ts.startsWith(moduleNameExpr.text, "node:");
+                        }
                     }
                 }
                 else if (ts.isModuleDeclaration(node)) {
                     if (ts.isAmbientModule(node) && (inAmbientModule || ts.hasSyntacticModifier(node, 2) || file.isDeclarationFile)) {
+                        node.name.parent = node;
                         var nameText = ts.getTextOfIdentifierOrLiteral(node.name);
                         if (isExternalModuleFile || (inAmbientModule && !ts.isExternalModuleNameRelative(nameText))) {
                             (moduleAugmentations || (moduleAugmentations = [])).push(node.name);
@@ -88424,12 +94801,15 @@ var ts;
                 while (r.exec(file.text) !== null) {
                     var node = getNodeAtPosition(file, r.lastIndex);
                     if (isJavaScriptFile && ts.isRequireCall(node, true)) {
+                        ts.setParentRecursive(node, false);
                         imports = ts.append(imports, node.arguments[0]);
                     }
-                    else if (ts.isImportCall(node) && node.arguments.length === 1 && ts.isStringLiteralLike(node.arguments[0])) {
+                    else if (ts.isImportCall(node) && node.arguments.length >= 1 && ts.isStringLiteralLike(node.arguments[0])) {
+                        ts.setParentRecursive(node, false);
                         imports = ts.append(imports, node.arguments[0]);
                     }
                     else if (ts.isLiteralImportTypeNode(node)) {
+                        ts.setParentRecursive(node, false);
                         imports = ts.append(imports, node.argument.literal);
                     }
                 }
@@ -88454,7 +94834,7 @@ var ts;
             var libName = ts.toFileNameLowerCase(ref.fileName);
             var libFileName = ts.libMap.get(libName);
             if (libFileName) {
-                return getSourceFile(ts.combinePaths(defaultLibraryPath, libFileName));
+                return getSourceFile(pathForLibFile(libFileName));
             }
         }
         function getSourceFileFromReference(referencingFile, ref) {
@@ -88463,13 +94843,13 @@ var ts;
         function getSourceFileFromReferenceWorker(fileName, getSourceFile, fail, reason) {
             if (ts.hasExtension(fileName)) {
                 var canonicalFileName_1 = host.getCanonicalFileName(fileName);
-                if (!options.allowNonTsExtensions && !ts.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) {
+                if (!options.allowNonTsExtensions && !ts.forEach(ts.flatten(supportedExtensionsWithJsonIfResolveJsonModule), function (extension) { return ts.fileExtensionIs(canonicalFileName_1, extension); })) {
                     if (fail) {
                         if (ts.hasJSFileExtension(canonicalFileName_1)) {
                             fail(ts.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName);
                         }
                         else {
-                            fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+                            fail(ts.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName, "'" + ts.flatten(supportedExtensions).join("', '") + "'");
                         }
                     }
                     return undefined;
@@ -88499,14 +94879,14 @@ var ts;
                     fail(ts.Diagnostics.File_0_not_found, fileName);
                     return undefined;
                 }
-                var sourceFileWithAddedExtension = ts.forEach(supportedExtensions, function (extension) { return getSourceFile(fileName + extension); });
+                var sourceFileWithAddedExtension = ts.forEach(supportedExtensions[0], function (extension) { return getSourceFile(fileName + extension); });
                 if (fail && !sourceFileWithAddedExtension)
-                    fail(ts.Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" + supportedExtensions.join("', '") + "'");
+                    fail(ts.Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName, "'" + ts.flatten(supportedExtensions).join("', '") + "'");
                 return sourceFileWithAddedExtension;
             }
         }
         function processSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, packageId, reason) {
-            getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, toPath(fileName), isDefaultLib, ignoreNoDefaultLib, reason, packageId); }, function (diagnostic) {
+            getSourceFileFromReferenceWorker(fileName, function (fileName) { return findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId); }, function (diagnostic) {
                 var args = [];
                 for (var _i = 1; _i < arguments.length; _i++) {
                     args[_i - 1] = arguments[_i];
@@ -88546,31 +94926,32 @@ var ts;
             });
             return redirect;
         }
-        function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
+        function findSourceFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
             ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("program", "findSourceFile", {
                 fileName: fileName,
                 isDefaultLib: isDefaultLib || undefined,
                 fileIncludeKind: ts.FileIncludeKind[reason.kind],
             });
-            var result = findSourceFileWorker(fileName, path, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
+            var result = findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
             ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop();
             return result;
         }
-        function findSourceFileWorker(fileName, path, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
+        function findSourceFileWorker(fileName, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
+            var path = toPath(fileName);
             if (useSourceOfProjectReferenceRedirect) {
-                var source = getSourceOfProjectReferenceRedirect(fileName);
+                var source = getSourceOfProjectReferenceRedirect(path);
                 if (!source &&
                     host.realpath &&
                     options.preserveSymlinks &&
                     ts.isDeclarationFileName(fileName) &&
                     ts.stringContains(fileName, ts.nodeModulesPathPart)) {
-                    var realPath = host.realpath(fileName);
-                    if (realPath !== fileName)
+                    var realPath = toPath(host.realpath(fileName));
+                    if (realPath !== path)
                         source = getSourceOfProjectReferenceRedirect(realPath);
                 }
                 if (source) {
                     var file_1 = ts.isString(source) ?
-                        findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, reason, packageId) :
+                        findSourceFile(source, isDefaultLib, ignoreNoDefaultLib, reason, packageId) :
                         undefined;
                     if (file_1)
                         addFileToFilesByName(file_1, path, undefined);
@@ -88625,7 +95006,7 @@ var ts;
                     redirectedPath = toPath(redirect);
                 }
             }
-            var file = host.getSourceFile(fileName, options.target, function (hostErrorMessage) { return addFilePreprocessingFileExplainingDiagnostic(undefined, reason, ts.Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage]); }, shouldCreateNewSourceFile);
+            var file = host.getSourceFile(fileName, ts.getEmitScriptTarget(options), function (hostErrorMessage) { return addFilePreprocessingFileExplainingDiagnostic(undefined, reason, ts.Diagnostics.Cannot_read_file_0_Colon_1, [fileName, hostErrorMessage]); }, shouldCreateNewSourceFile);
             if (packageId) {
                 var packageIdKey = ts.packageIdToString(packageId);
                 var fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
@@ -88650,6 +95031,7 @@ var ts;
                 file.path = path;
                 file.resolvedPath = toPath(fileName);
                 file.originalFileName = originalFileName;
+                file.impliedNodeFormat = getImpliedNodeFormatForFile(file.resolvedPath, moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.getPackageJsonInfoCache(), host, options);
                 addFileIncludeReason(file, reason);
                 if (host.useCaseSensitiveFileNames()) {
                     var pathLowerCase = ts.toFileNameLowerCase(path);
@@ -88725,8 +95107,8 @@ var ts;
         function forEachResolvedProjectReference(cb) {
             return ts.forEachResolvedProjectReference(resolvedProjectReferences, cb);
         }
-        function getSourceOfProjectReferenceRedirect(file) {
-            if (!ts.isDeclarationFileName(file))
+        function getSourceOfProjectReferenceRedirect(path) {
+            if (!ts.isDeclarationFileName(path))
                 return undefined;
             if (mapFromToProjectReferenceRedirectSource === undefined) {
                 mapFromToProjectReferenceRedirectSource = new ts.Map();
@@ -88747,7 +95129,7 @@ var ts;
                     }
                 });
             }
-            return mapFromToProjectReferenceRedirectSource.get(toPath(file));
+            return mapFromToProjectReferenceRedirectSource.get(path);
         }
         function isSourceOfProjectReferenceRedirect(fileName) {
             return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName);
@@ -88819,12 +95201,27 @@ var ts;
                 resolvedTypeReferenceDirectives.set(typeReferenceDirective, resolvedTypeReferenceDirective);
             }
         }
+        function pathForLibFile(libFileName) {
+            var components = libFileName.split(".");
+            var path = components[1];
+            var i = 2;
+            while (components[i] && components[i] !== "d") {
+                path += (i === 2 ? "/" : "-") + components[i];
+                i++;
+            }
+            var resolveFrom = ts.combinePaths(currentDirectory, "__lib_node_modules_lookup_".concat(libFileName, "__.ts"));
+            var localOverrideModuleResult = ts.resolveModuleName("@typescript/lib-" + path, resolveFrom, { moduleResolution: ts.ModuleResolutionKind.NodeJs }, host, moduleResolutionCache);
+            if (localOverrideModuleResult === null || localOverrideModuleResult === void 0 ? void 0 : localOverrideModuleResult.resolvedModule) {
+                return localOverrideModuleResult.resolvedModule.resolvedFileName;
+            }
+            return ts.combinePaths(defaultLibraryPath, libFileName);
+        }
         function processLibReferenceDirectives(file) {
             ts.forEach(file.libReferenceDirectives, function (libReference, index) {
                 var libName = ts.toFileNameLowerCase(libReference.fileName);
                 var libFileName = ts.libMap.get(libName);
                 if (libFileName) {
-                    processRootFile(ts.combinePaths(defaultLibraryPath, libFileName), true, true, { kind: ts.FileIncludeKind.LibReferenceDirective, file: file.path, index: index, });
+                    processRootFile(pathForLibFile(libFileName), true, true, { kind: ts.FileIncludeKind.LibReferenceDirective, file: file.path, index: index, });
                 }
                 else {
                     var unqualifiedLibName = ts.removeSuffix(ts.removePrefix(libName, "lib."), ".d.ts");
@@ -88843,14 +95240,16 @@ var ts;
             return host.getCanonicalFileName(fileName);
         }
         function processImportedModules(file) {
+            var _a;
             collectExternalModuleReferences(file);
             if (file.imports.length || file.moduleAugmentations.length) {
                 var moduleNames = getModuleNames(file);
                 var resolutions = resolveModuleNamesReusingOldState(moduleNames, file);
                 ts.Debug.assert(resolutions.length === moduleNames.length);
+                var optionsForFile = (useSourceOfProjectReferenceRedirect ? (_a = getRedirectReferenceForResolution(file)) === null || _a === void 0 ? void 0 : _a.commandLine.options : undefined) || options;
                 for (var index = 0; index < moduleNames.length; index++) {
                     var resolution = resolutions[index];
-                    ts.setResolvedModule(file, moduleNames[index], resolution);
+                    ts.setResolvedModule(file, moduleNames[index], resolution, getModeForResolutionAtIndex(file, index));
                     if (!resolution) {
                         continue;
                     }
@@ -88863,18 +95262,17 @@ var ts;
                     }
                     var elideImport = isJsFileFromNodeModules && currentNodeModulesDepth > maxNodeModuleJsDepth;
                     var shouldAddFile = resolvedFileName
-                        && !getResolutionDiagnostic(options, resolution)
-                        && !options.noResolve
+                        && !getResolutionDiagnostic(optionsForFile, resolution)
+                        && !optionsForFile.noResolve
                         && index < file.imports.length
                         && !elideImport
-                        && !(isJsFile && !ts.getAllowJSCompilerOption(options))
+                        && !(isJsFile && !ts.getAllowJSCompilerOption(optionsForFile))
                         && (ts.isInJSFile(file.imports[index]) || !(file.imports[index].flags & 4194304));
                     if (elideImport) {
                         modulesWithElidedImports.set(file.path, true);
                     }
                     else if (shouldAddFile) {
-                        var path = toPath(resolvedFileName);
-                        findSourceFile(resolvedFileName, path, false, false, { kind: ts.FileIncludeKind.Import, file: file.path, index: index, }, resolution.packageId);
+                        findSourceFile(resolvedFileName, false, false, { kind: ts.FileIncludeKind.Import, file: file.path, index: index, }, resolution.packageId);
                     }
                     if (isFromNodeModulesSearch) {
                         currentNodeModulesDepth--;
@@ -88945,9 +95343,27 @@ var ts;
             return resolvedRef;
         }
         function verifyCompilerOptions() {
+            var isNightly = ts.stringContains(ts.version, "-dev");
+            if (!isNightly) {
+                if (ts.getEmitModuleKind(options) === ts.ModuleKind.Node12) {
+                    createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "node12");
+                }
+                else if (ts.getEmitModuleKind(options) === ts.ModuleKind.NodeNext) {
+                    createOptionValueDiagnostic("module", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "module", "nodenext");
+                }
+                else if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12) {
+                    createOptionValueDiagnostic("moduleResolution", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "moduleResolution", "node12");
+                }
+                else if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
+                    createOptionValueDiagnostic("moduleResolution", ts.Diagnostics.Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next, "moduleResolution", "nodenext");
+                }
+            }
             if (options.strictPropertyInitialization && !ts.getStrictOptionValue(options, "strictNullChecks")) {
                 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "strictPropertyInitialization", "strictNullChecks");
             }
+            if (options.exactOptionalPropertyTypes && !ts.getStrictOptionValue(options, "strictNullChecks")) {
+                createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "exactOptionalPropertyTypes", "strictNullChecks");
+            }
             if (options.isolatedModules) {
                 if (options.out) {
                     createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "out", "isolatedModules");
@@ -88984,8 +95400,8 @@ var ts;
             verifyProjectReferences();
             if (options.composite) {
                 var rootPaths = new ts.Set(rootNames.map(toPath));
-                for (var _i = 0, files_3 = files; _i < files_3.length; _i++) {
-                    var file = files_3[_i];
+                for (var _i = 0, files_4 = files; _i < files_4.length; _i++) {
+                    var file = files_4[_i];
                     if (ts.sourceFileMayBeEmitted(file, program) && !rootPaths.has(file.path)) {
                         addProgramDiagnosticExplainingFile(file, ts.Diagnostics.File_0_is_not_listed_within_the_file_list_of_project_1_Projects_must_list_all_files_or_use_an_include_pattern, [file.fileName, options.configFilePath || ""]);
                     }
@@ -89056,7 +95472,7 @@ var ts;
             if (options.noImplicitUseStrict && ts.getStrictOptionValue(options, "alwaysStrict")) {
                 createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_with_option_1, "noImplicitUseStrict", "alwaysStrict");
             }
-            var languageVersion = options.target || 0;
+            var languageVersion = ts.getEmitScriptTarget(options);
             var firstNonAmbientExternalModuleSourceFile = ts.find(files, function (f) { return ts.isExternalModule(f) && !f.isDeclarationFile; });
             if (options.isolatedModules) {
                 if (options.module === ts.ModuleKind.None && languageVersion < 2) {
@@ -89085,7 +95501,9 @@ var ts;
                 }
             }
             if (options.resolveJsonModule) {
-                if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs) {
+                if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs &&
+                    ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Node12 &&
+                    ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeNext) {
                     createDiagnosticForOptionName(ts.Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
                 }
                 else if (!ts.hasJsonModuleEmitEnabled(options)) {
@@ -89093,6 +95511,7 @@ var ts;
                 }
             }
             if (options.outDir ||
+                options.rootDir ||
                 options.sourceRoot ||
                 options.mapRoot) {
                 var dir = getCommonSourceDirectory();
@@ -89153,6 +95572,9 @@ var ts;
                     createDiagnosticForOptionName(ts.Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxImportSource", ts.inverseJsxOptionMap.get("" + options.jsx));
                 }
             }
+            if (options.preserveValueImports && ts.getEmitModuleKind(options) < ts.ModuleKind.ES2015) {
+                createOptionValueDiagnostic("importsNotUsedAsValues", ts.Diagnostics.Option_preserveValueImports_can_only_be_used_when_module_is_set_to_es2015_or_later);
+            }
             if (!options.noEmit && !options.suppressOutputPathCheck) {
                 var emitHost = getEmitHost();
                 var emitFilesSeen_1 = new ts.Set();
@@ -89198,7 +95620,7 @@ var ts;
             var location = locationReason && getReferencedFileLocation(getSourceFileByPath, locationReason);
             var fileIncludeReasonDetails = fileIncludeReasons && ts.chainDiagnosticMessages(fileIncludeReasons, ts.Diagnostics.The_file_is_in_the_program_because_Colon);
             var redirectInfo = file && ts.explainIfFileIsRedirect(file);
-            var chain = ts.chainDiagnosticMessages.apply(void 0, __spreadArray([redirectInfo ? fileIncludeReasonDetails ? __spreadArray([fileIncludeReasonDetails], redirectInfo) : redirectInfo : fileIncludeReasonDetails, diagnostic], args || ts.emptyArray));
+            var chain = ts.chainDiagnosticMessages.apply(void 0, __spreadArray([redirectInfo ? fileIncludeReasonDetails ? __spreadArray([fileIncludeReasonDetails], redirectInfo, true) : redirectInfo : fileIncludeReasonDetails, diagnostic], args || ts.emptyArray, false));
             return location && isReferenceFileLocation(location) ?
                 ts.createFileDiagnosticFromMessageChain(location.file, location.pos, location.end - location.pos, chain, relatedInfo) :
                 ts.createCompilerDiagnosticFromMessageChain(chain, relatedInfo);
@@ -89296,7 +95718,7 @@ var ts;
                         message = ts.Diagnostics.File_is_library_specified_here;
                         break;
                     }
-                    var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === options.target ? key : undefined; });
+                    var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === ts.getEmitScriptTarget(options) ? key : undefined; });
                     configFileNode = target ? getOptionsSyntaxByValue("target", target) : undefined;
                     message = ts.Diagnostics.File_is_default_library_for_target_specified_here;
                     break;
@@ -89393,8 +95815,8 @@ var ts;
         function createDiagnosticForOptionName(message, option1, option2, option3) {
             createDiagnosticForOption(true, option1, option2, message, option1, option2, option3);
         }
-        function createOptionValueDiagnostic(option1, message, arg0) {
-            createDiagnosticForOption(false, option1, undefined, message, arg0);
+        function createOptionValueDiagnostic(option1, message, arg0, arg1) {
+            createDiagnosticForOption(false, option1, undefined, message, arg0, arg1);
         }
         function createDiagnosticForReference(sourceFile, index, message, arg0, arg1) {
             var referencesSyntax = ts.firstDefined(ts.getTsConfigPropArray(sourceFile || options.configFile, "references"), function (property) { return ts.isArrayLiteralExpression(property.initializer) ? property.initializer : undefined; });
@@ -89459,7 +95881,7 @@ var ts;
             if (options.outDir) {
                 return ts.containsPath(options.outDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames());
             }
-            if (ts.fileExtensionIsOneOf(filePath, ts.supportedJSExtensions) || ts.fileExtensionIs(filePath, ".d.ts")) {
+            if (ts.fileExtensionIsOneOf(filePath, ts.supportedJSExtensionsFlat) || ts.fileExtensionIs(filePath, ".d.ts")) {
                 var filePathWithoutExtension = ts.removeFileExtension(filePath);
                 return !!getSourceFileByPath((filePathWithoutExtension + ".ts")) ||
                     !!getSourceFileByPath((filePathWithoutExtension + ".tsx"));
@@ -89473,7 +95895,13 @@ var ts;
             if (host.getSymlinkCache) {
                 return host.getSymlinkCache();
             }
-            return symlinks || (symlinks = ts.discoverProbableSymlinks(files, getCanonicalFileName, host.getCurrentDirectory()));
+            if (!symlinks) {
+                symlinks = ts.createSymlinkCache(currentDirectory, getCanonicalFileName);
+            }
+            if (files && resolvedTypeReferenceDirectives && !symlinks.hasProcessedResolutions()) {
+                symlinks.setSymlinksFromResolutions(files, resolvedTypeReferenceDirectives);
+            }
+            return symlinks;
         }
     }
     ts.createProgram = createProgram;
@@ -89543,17 +95971,17 @@ var ts;
             return fileOrDirectoryExistsUsingSource(file, true);
         }
         function fileExistsIfProjectReferenceDts(file) {
-            var source = host.getSourceOfProjectReferenceRedirect(file);
+            var source = host.getSourceOfProjectReferenceRedirect(host.toPath(file));
             return source !== undefined ?
                 ts.isString(source) ? originalFileExists.call(host.compilerHost, source) : true :
                 undefined;
         }
         function directoryExistsIfProjectReferenceDeclDir(dir) {
             var dirPath = host.toPath(dir);
-            var dirPathWithTrailingDirectorySeparator = "" + dirPath + ts.directorySeparator;
+            var dirPathWithTrailingDirectorySeparator = "".concat(dirPath).concat(ts.directorySeparator);
             return ts.forEachKey(setOfDeclarationDirectories, function (declDirPath) { return dirPath === declDirPath ||
                 ts.startsWith(declDirPath, dirPathWithTrailingDirectorySeparator) ||
-                ts.startsWith(dirPath, declDirPath + "/"); });
+                ts.startsWith(dirPath, "".concat(declDirPath, "/")); });
         }
         function handleDirectoryCouldBeSymlink(directory) {
             var _a;
@@ -89601,7 +96029,7 @@ var ts;
                 var result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath));
                 if (isFile && result) {
                     var absolutePath = ts.getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory());
-                    symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "" + symlinkedDirectory.real + absolutePath.replace(new RegExp(directoryPath, "i"), ""));
+                    symlinkCache.setSymlinkedFile(fileOrDirectoryPath, "".concat(symlinkedDirectory.real).concat(absolutePath.replace(new RegExp(directoryPath, "i"), "")));
                 }
                 return result;
             }) || false;
@@ -89618,7 +96046,7 @@ var ts;
         }
         if (!options.noEmitOnError)
             return undefined;
-        var diagnostics = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], program.getOptionsDiagnostics(cancellationToken)), program.getSyntacticDiagnostics(sourceFile, cancellationToken)), program.getGlobalDiagnostics(cancellationToken)), program.getSemanticDiagnostics(sourceFile, cancellationToken));
+        var diagnostics = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], program.getOptionsDiagnostics(cancellationToken), true), program.getSyntacticDiagnostics(sourceFile, cancellationToken), true), program.getGlobalDiagnostics(cancellationToken), true), program.getSemanticDiagnostics(sourceFile, cancellationToken), true);
         if (diagnostics.length === 0 && ts.getEmitDeclarations(program.getCompilerOptions())) {
             diagnostics = program.getDeclarationDiagnostics(undefined, cancellationToken);
         }
@@ -89628,16 +96056,16 @@ var ts;
         if (!sourceFile && !ts.outFile(options)) {
             var emitResult = program.emitBuildInfo(writeFile, cancellationToken);
             if (emitResult.diagnostics)
-                diagnostics = __spreadArray(__spreadArray([], diagnostics), emitResult.diagnostics);
+                diagnostics = __spreadArray(__spreadArray([], diagnostics, true), emitResult.diagnostics, true);
             emittedFiles = emitResult.emittedFiles;
         }
         return { diagnostics: diagnostics, sourceMaps: undefined, emittedFiles: emittedFiles, emitSkipped: true };
     }
     ts.handleNoEmitOptions = handleNoEmitOptions;
-    function filterSemanticDiagnotics(diagnostic, option) {
+    function filterSemanticDiagnostics(diagnostic, option) {
         return ts.filter(diagnostic, function (d) { return !d.skippedOn || !option[d.skippedOn]; });
     }
-    ts.filterSemanticDiagnotics = filterSemanticDiagnotics;
+    ts.filterSemanticDiagnostics = filterSemanticDiagnostics;
     function parseConfigHostFromCompilerHostLike(host, directoryStructureHost) {
         if (directoryStructureHost === void 0) { directoryStructureHost = host; }
         return {
@@ -89745,15 +96173,83 @@ var ts;
     ts.getFileEmitOutput = getFileEmitOutput;
     var BuilderState;
     (function (BuilderState) {
-        function getReferencedFileFromImportedModuleSymbol(symbol) {
-            if (symbol.declarations && symbol.declarations[0]) {
-                var declarationSourceFile = ts.getSourceFileOfNode(symbol.declarations[0]);
-                return declarationSourceFile && declarationSourceFile.resolvedPath;
+        var manyToManyPathMapCount = 0;
+        function createManyToManyPathMap() {
+            function create(forward, reverse, deleted) {
+                var version = 0;
+                var map = {
+                    id: manyToManyPathMapCount++,
+                    version: function () { return version; },
+                    clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
+                    forEach: function (fn) { return forward.forEach(fn); },
+                    getKeys: function (v) { return reverse.get(v); },
+                    getValues: function (k) { return forward.get(k); },
+                    hasKey: function (k) { return forward.has(k); },
+                    keys: function () { return forward.keys(); },
+                    deletedKeys: function () { return deleted; },
+                    deleteKey: function (k) {
+                        (deleted || (deleted = new ts.Set())).add(k);
+                        var set = forward.get(k);
+                        if (!set) {
+                            return false;
+                        }
+                        set.forEach(function (v) { return deleteFromMultimap(reverse, v, k); });
+                        forward.delete(k);
+                        version++;
+                        return true;
+                    },
+                    set: function (k, vSet) {
+                        var changed = !!(deleted === null || deleted === void 0 ? void 0 : deleted.delete(k));
+                        var existingVSet = forward.get(k);
+                        forward.set(k, vSet);
+                        existingVSet === null || existingVSet === void 0 ? void 0 : existingVSet.forEach(function (v) {
+                            if (!vSet.has(v)) {
+                                changed = true;
+                                deleteFromMultimap(reverse, v, k);
+                            }
+                        });
+                        vSet.forEach(function (v) {
+                            if (!(existingVSet === null || existingVSet === void 0 ? void 0 : existingVSet.has(v))) {
+                                changed = true;
+                                addToMultimap(reverse, v, k);
+                            }
+                        });
+                        if (changed) {
+                            version++;
+                        }
+                        return map;
+                    },
+                };
+                return map;
+            }
+            return create(new ts.Map(), new ts.Map(), undefined);
+        }
+        BuilderState.createManyToManyPathMap = createManyToManyPathMap;
+        function addToMultimap(map, k, v) {
+            var set = map.get(k);
+            if (!set) {
+                set = new ts.Set();
+                map.set(k, set);
+            }
+            set.add(v);
+        }
+        function deleteFromMultimap(map, k, v, removeEmpty) {
+            if (removeEmpty === void 0) { removeEmpty = true; }
+            var set = map.get(k);
+            if (set === null || set === void 0 ? void 0 : set.delete(v)) {
+                if (removeEmpty && !set.size) {
+                    map.delete(k);
+                }
+                return true;
             }
+            return false;
+        }
+        function getReferencedFilesFromImportedModuleSymbol(symbol) {
+            return ts.mapDefined(symbol.declarations, function (declaration) { var _a; return (_a = ts.getSourceFileOfNode(declaration)) === null || _a === void 0 ? void 0 : _a.resolvedPath; });
         }
-        function getReferencedFileFromImportLiteral(checker, importName) {
+        function getReferencedFilesFromImportLiteral(checker, importName) {
             var symbol = checker.getSymbolAtLocation(importName);
-            return symbol && getReferencedFileFromImportedModuleSymbol(symbol);
+            return symbol && getReferencedFilesFromImportedModuleSymbol(symbol);
         }
         function getReferencedFileFromFileName(program, fileName, sourceFileDirectory, getCanonicalFileName) {
             return ts.toPath(program.getProjectReferenceRedirect(fileName) || fileName, sourceFileDirectory, getCanonicalFileName);
@@ -89764,10 +96260,8 @@ var ts;
                 var checker = program.getTypeChecker();
                 for (var _i = 0, _a = sourceFile.imports; _i < _a.length; _i++) {
                     var importName = _a[_i];
-                    var declarationSourceFilePath = getReferencedFileFromImportLiteral(checker, importName);
-                    if (declarationSourceFilePath) {
-                        addReferencedFile(declarationSourceFilePath);
-                    }
+                    var declarationSourceFilePaths = getReferencedFilesFromImportLiteral(checker, importName);
+                    declarationSourceFilePaths === null || declarationSourceFilePaths === void 0 ? void 0 : declarationSourceFilePaths.forEach(addReferencedFile);
                 }
             }
             var sourceFileDirectory = ts.getDirectoryPath(sourceFile.resolvedPath);
@@ -89792,24 +96286,25 @@ var ts;
                 var checker = program.getTypeChecker();
                 for (var _d = 0, _e = sourceFile.moduleAugmentations; _d < _e.length; _d++) {
                     var moduleName = _e[_d];
-                    if (!ts.isStringLiteral(moduleName)) {
+                    if (!ts.isStringLiteral(moduleName))
                         continue;
-                    }
                     var symbol = checker.getSymbolAtLocation(moduleName);
-                    if (!symbol) {
+                    if (!symbol)
                         continue;
-                    }
                     addReferenceFromAmbientModule(symbol);
                 }
             }
             for (var _f = 0, _g = program.getTypeChecker().getAmbientModules(); _f < _g.length; _f++) {
                 var ambientModule = _g[_f];
-                if (ambientModule.declarations.length > 1) {
+                if (ambientModule.declarations && ambientModule.declarations.length > 1) {
                     addReferenceFromAmbientModule(ambientModule);
                 }
             }
             return referencedFiles;
             function addReferenceFromAmbientModule(symbol) {
+                if (!symbol.declarations) {
+                    return;
+                }
                 for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {
                     var declaration = _a[_i];
                     var declarationSourceFile = ts.getSourceFileOfNode(declaration);
@@ -89827,10 +96322,10 @@ var ts;
             return oldState && !oldState.referencedMap === !newReferencedMap;
         }
         BuilderState.canReuseOldState = canReuseOldState;
-        function create(newProgram, getCanonicalFileName, oldState) {
+        function create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
             var fileInfos = new ts.Map();
-            var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? new ts.Map() : undefined;
-            var exportedModulesMap = referencedMap ? new ts.Map() : undefined;
+            var referencedMap = newProgram.getCompilerOptions().module !== ts.ModuleKind.None ? createManyToManyPathMap() : undefined;
+            var exportedModulesMap = referencedMap ? createManyToManyPathMap() : undefined;
             var hasCalledUpdateShapeSignature = new ts.Set();
             var useOldState = canReuseOldState(referencedMap, oldState);
             newProgram.getTypeChecker();
@@ -89844,19 +96339,20 @@ var ts;
                         referencedMap.set(sourceFile.resolvedPath, newReferences);
                     }
                     if (useOldState) {
-                        var exportedModules = oldState.exportedModulesMap.get(sourceFile.resolvedPath);
+                        var exportedModules = oldState.exportedModulesMap.getValues(sourceFile.resolvedPath);
                         if (exportedModules) {
                             exportedModulesMap.set(sourceFile.resolvedPath, exportedModules);
                         }
                     }
                 }
-                fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) });
+                fileInfos.set(sourceFile.resolvedPath, { version: version_2, signature: oldInfo && oldInfo.signature, affectsGlobalScope: isFileAffectingGlobalScope(sourceFile) || undefined, impliedFormat: sourceFile.impliedNodeFormat });
             }
             return {
                 fileInfos: fileInfos,
                 referencedMap: referencedMap,
                 exportedModulesMap: exportedModulesMap,
-                hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature
+                hasCalledUpdateShapeSignature: hasCalledUpdateShapeSignature,
+                useFileVersionAsSignature: !disableUseFileVersionAsSignature && !useOldState
             };
         }
         BuilderState.create = create;
@@ -89866,11 +96362,13 @@ var ts;
         }
         BuilderState.releaseCache = releaseCache;
         function clone(state) {
+            var _a, _b;
             return {
                 fileInfos: new ts.Map(state.fileInfos),
-                referencedMap: state.referencedMap && new ts.Map(state.referencedMap),
-                exportedModulesMap: state.exportedModulesMap && new ts.Map(state.exportedModulesMap),
+                referencedMap: (_a = state.referencedMap) === null || _a === void 0 ? void 0 : _a.clone(),
+                exportedModulesMap: (_b = state.exportedModulesMap) === null || _b === void 0 ? void 0 : _b.clone(),
                 hasCalledUpdateShapeSignature: new ts.Set(state.hasCalledUpdateShapeSignature),
+                useFileVersionAsSignature: state.useFileVersionAsSignature,
             };
         }
         BuilderState.clone = clone;
@@ -89899,7 +96397,8 @@ var ts;
             state.hasCalledUpdateShapeSignature.add(path);
         }
         BuilderState.updateSignatureOfFile = updateSignatureOfFile;
-        function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache) {
+        function updateShapeSignature(state, programOfThisState, sourceFile, cacheToUpdateSignature, cancellationToken, computeHash, exportedModulesMapCache, useFileVersionAsSignature) {
+            if (useFileVersionAsSignature === void 0) { useFileVersionAsSignature = state.useFileVersionAsSignature; }
             ts.Debug.assert(!!sourceFile);
             ts.Debug.assert(!exportedModulesMapCache || !!state.exportedModulesMap, "Compute visible to outside map only if visibleToOutsideReferencedMap present in the state");
             if (state.hasCalledUpdateShapeSignature.has(sourceFile.resolvedPath) || cacheToUpdateSignature.has(sourceFile.resolvedPath)) {
@@ -89910,62 +96409,73 @@ var ts;
                 return ts.Debug.fail();
             var prevSignature = info.signature;
             var latestSignature;
-            if (sourceFile.isDeclarationFile) {
-                latestSignature = sourceFile.version;
-                if (exportedModulesMapCache && latestSignature !== prevSignature) {
-                    var references = state.referencedMap ? state.referencedMap.get(sourceFile.resolvedPath) : undefined;
-                    exportedModulesMapCache.set(sourceFile.resolvedPath, references || false);
-                }
-            }
-            else {
+            if (!sourceFile.isDeclarationFile && !useFileVersionAsSignature) {
                 var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
-                var firstDts_1 = emitOutput_1.outputFiles &&
-                    programOfThisState.getCompilerOptions().declarationMap ?
-                    emitOutput_1.outputFiles.length > 1 ? emitOutput_1.outputFiles[1] : undefined :
-                    emitOutput_1.outputFiles.length > 0 ? emitOutput_1.outputFiles[0] : undefined;
+                var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
                 if (firstDts_1) {
-                    ts.Debug.assert(ts.fileExtensionIs(firstDts_1.name, ".d.ts"), "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; })); });
+                    ts.Debug.assert(ts.fileExtensionIsOneOf(firstDts_1.name, [".d.ts", ".d.mts", ".d.cts"]), "File extension for signature expected to be dts", function () { return "Found: ".concat(ts.getAnyExtensionFromPath(firstDts_1.name), " for ").concat(firstDts_1.name, ":: All output files: ").concat(JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; }))); });
                     latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
                     if (exportedModulesMapCache && latestSignature !== prevSignature) {
                         updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
                     }
                 }
-                else {
-                    latestSignature = prevSignature;
+            }
+            if (latestSignature === undefined) {
+                latestSignature = sourceFile.version;
+                if (exportedModulesMapCache && latestSignature !== prevSignature) {
+                    var references = state.referencedMap ? state.referencedMap.getValues(sourceFile.resolvedPath) : undefined;
+                    if (references) {
+                        exportedModulesMapCache.set(sourceFile.resolvedPath, references);
+                    }
+                    else {
+                        exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
+                    }
                 }
             }
             cacheToUpdateSignature.set(sourceFile.resolvedPath, latestSignature);
-            return !prevSignature || latestSignature !== prevSignature;
+            return latestSignature !== prevSignature;
         }
         BuilderState.updateShapeSignature = updateShapeSignature;
         function updateExportedModules(sourceFile, exportedModulesFromDeclarationEmit, exportedModulesMapCache) {
             if (!exportedModulesFromDeclarationEmit) {
-                exportedModulesMapCache.set(sourceFile.resolvedPath, false);
+                exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
                 return;
             }
             var exportedModules;
-            exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFileFromImportedModuleSymbol(symbol)); });
-            exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules || false);
-            function addExportedModule(exportedModulePath) {
-                if (exportedModulePath) {
+            exportedModulesFromDeclarationEmit.forEach(function (symbol) { return addExportedModule(getReferencedFilesFromImportedModuleSymbol(symbol)); });
+            if (exportedModules) {
+                exportedModulesMapCache.set(sourceFile.resolvedPath, exportedModules);
+            }
+            else {
+                exportedModulesMapCache.deleteKey(sourceFile.resolvedPath);
+            }
+            function addExportedModule(exportedModulePaths) {
+                if (exportedModulePaths === null || exportedModulePaths === void 0 ? void 0 : exportedModulePaths.length) {
                     if (!exportedModules) {
                         exportedModules = new ts.Set();
                     }
-                    exportedModules.add(exportedModulePath);
+                    exportedModulePaths.forEach(function (path) { return exportedModules.add(path); });
                 }
             }
         }
         function updateExportedFilesMapFromCache(state, exportedModulesMapCache) {
+            var _a;
             if (exportedModulesMapCache) {
                 ts.Debug.assert(!!state.exportedModulesMap);
-                exportedModulesMapCache.forEach(function (exportedModules, path) {
-                    if (exportedModules) {
-                        state.exportedModulesMap.set(path, exportedModules);
-                    }
-                    else {
-                        state.exportedModulesMap.delete(path);
+                var cacheId = exportedModulesMapCache.id;
+                var cacheVersion = exportedModulesMapCache.version();
+                if (state.previousCache) {
+                    if (state.previousCache.id === cacheId && state.previousCache.version === cacheVersion) {
+                        return;
                     }
-                });
+                    state.previousCache.id = cacheId;
+                    state.previousCache.version = cacheVersion;
+                }
+                else {
+                    state.previousCache = { id: cacheId, version: cacheVersion };
+                }
+                (_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
+                exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
             }
         }
         BuilderState.updateExportedFilesMapFromCache = updateExportedFilesMapFromCache;
@@ -89983,7 +96493,7 @@ var ts;
                 var path = queue.pop();
                 if (!seenMap.has(path)) {
                     seenMap.add(path);
-                    var references = state.referencedMap.get(path);
+                    var references = state.referencedMap.getValues(path);
                     if (references) {
                         var iterator = references.keys();
                         for (var iterResult = iterator.next(); !iterResult.done; iterResult = iterator.next()) {
@@ -90003,10 +96513,8 @@ var ts;
             return state.allFileNames;
         }
         function getReferencedByPaths(state, referencedFilePath) {
-            return ts.arrayFrom(ts.mapDefinedIterator(state.referencedMap.entries(), function (_a) {
-                var filePath = _a[0], referencesInFile = _a[1];
-                return referencesInFile.has(referencedFilePath) ? filePath : undefined;
-            }));
+            var keys = state.referencedMap.getKeys(referencedFilePath);
+            return keys ? ts.arrayFrom(keys.keys()) : [];
         }
         BuilderState.getReferencedByPaths = getReferencedByPaths;
         function containsOnlyAmbientModules(sourceFile) {
@@ -90023,7 +96531,7 @@ var ts;
         }
         function isFileAffectingGlobalScope(sourceFile) {
             return containsGlobalScopeAugmentation(sourceFile) ||
-                !ts.isExternalModule(sourceFile) && !containsOnlyAmbientModules(sourceFile);
+                !ts.isExternalOrCommonJsModule(sourceFile) && !ts.isJsonSourceFile(sourceFile) && !containsOnlyAmbientModules(sourceFile);
         }
         function getAllFilesExcludingDefaultLibraryFile(state, programOfThisState, firstSourceFile) {
             if (state.allFilesExcludingDefaultLibraryFile) {
@@ -90084,8 +96592,8 @@ var ts;
     function hasSameKeys(map1, map2) {
         return map1 === map2 || map1 !== undefined && map2 !== undefined && map1.size === map2.size && !ts.forEachKey(map1, function (key) { return !map2.has(key); });
     }
-    function createBuilderProgramState(newProgram, getCanonicalFileName, oldState) {
-        var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState);
+    function createBuilderProgramState(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature) {
+        var state = ts.BuilderState.create(newProgram, getCanonicalFileName, oldState, disableUseFileVersionAsSignature);
         state.program = newProgram;
         var compilerOptions = newProgram.getCompilerOptions();
         state.compilerOptions = compilerOptions;
@@ -90124,18 +96632,16 @@ var ts;
             if (!useOldState ||
                 !(oldInfo = oldState.fileInfos.get(sourceFilePath)) ||
                 oldInfo.version !== info.version ||
-                !hasSameKeys(newReferences = referencedMap && referencedMap.get(sourceFilePath), oldReferencedMap && oldReferencedMap.get(sourceFilePath)) ||
+                !hasSameKeys(newReferences = referencedMap && referencedMap.getValues(sourceFilePath), oldReferencedMap && oldReferencedMap.getValues(sourceFilePath)) ||
                 newReferences && ts.forEachKey(newReferences, function (path) { return !state.fileInfos.has(path) && oldState.fileInfos.has(path); })) {
                 state.changedFilesSet.add(sourceFilePath);
             }
             else if (canCopySemanticDiagnostics) {
                 var sourceFile = newProgram.getSourceFileByPath(sourceFilePath);
-                if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics) {
+                if (sourceFile.isDeclarationFile && !copyDeclarationFileDiagnostics)
                     return;
-                }
-                if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics) {
+                if (sourceFile.hasNoDefaultLib && !copyLibFileDiagnostics)
                     return;
-                }
                 var diagnostics = oldState.semanticDiagnosticsPerFile.get(sourceFilePath);
                 if (diagnostics) {
                     state.semanticDiagnosticsPerFile.set(sourceFilePath, oldState.hasReusableDiagnostic ? convertToDiagnostics(diagnostics, newProgram, getCanonicalFileName) : diagnostics);
@@ -90155,6 +96661,13 @@ var ts;
             ts.Debug.assert(!state.seenAffectedFiles || !state.seenAffectedFiles.size);
             state.seenAffectedFiles = state.seenAffectedFiles || new ts.Set();
         }
+        if (useOldState) {
+            ts.forEachEntry(oldState.fileInfos, function (info, sourceFilePath) {
+                if (state.fileInfos.has(sourceFilePath) && state.fileInfos.get(sourceFilePath).impliedFormat !== info.impliedFormat) {
+                    state.changedFilesSet.add(sourceFilePath);
+                }
+            });
+        }
         state.buildInfoEmitPending = !!state.changedFilesSet.size;
         return state;
     }
@@ -90189,6 +96702,7 @@ var ts;
         state.program = undefined;
     }
     function cloneBuilderProgramState(state) {
+        var _a;
         var newState = ts.BuilderState.clone(state);
         newState.semanticDiagnosticsPerFile = state.semanticDiagnosticsPerFile && new ts.Map(state.semanticDiagnosticsPerFile);
         newState.changedFilesSet = new ts.Set(state.changedFilesSet);
@@ -90196,7 +96710,7 @@ var ts;
         newState.affectedFilesIndex = state.affectedFilesIndex;
         newState.currentChangedFilePath = state.currentChangedFilePath;
         newState.currentAffectedFilesSignatures = state.currentAffectedFilesSignatures && new ts.Map(state.currentAffectedFilesSignatures);
-        newState.currentAffectedFilesExportedModulesMap = state.currentAffectedFilesExportedModulesMap && new ts.Map(state.currentAffectedFilesExportedModulesMap);
+        newState.currentAffectedFilesExportedModulesMap = (_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clone();
         newState.seenAffectedFiles = state.seenAffectedFiles && new ts.Set(state.seenAffectedFiles);
         newState.cleanedDiagnosticsOfLibFiles = state.cleanedDiagnosticsOfLibFiles;
         newState.semanticDiagnosticsFromOldState = state.semanticDiagnosticsFromOldState && new ts.Set(state.semanticDiagnosticsFromOldState);
@@ -90247,8 +96761,7 @@ var ts;
             if (!state.currentAffectedFilesSignatures)
                 state.currentAffectedFilesSignatures = new ts.Map();
             if (state.exportedModulesMap) {
-                if (!state.currentAffectedFilesExportedModulesMap)
-                    state.currentAffectedFilesExportedModulesMap = new ts.Map();
+                state.currentAffectedFilesExportedModulesMap || (state.currentAffectedFilesExportedModulesMap = ts.BuilderState.createManyToManyPathMap());
             }
             state.affectedFiles = ts.BuilderState.getFilesAffectedBy(state, program, nextKey.value, cancellationToken, computeHash, state.currentAffectedFilesSignatures, state.currentAffectedFilesExportedModulesMap);
             state.currentChangedFilePath = nextKey.value;
@@ -90279,6 +96792,7 @@ var ts;
         return undefined;
     }
     function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash) {
+        var _a;
         removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
         if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
             if (!state.cleanedDiagnosticsOfLibFiles) {
@@ -90291,8 +96805,12 @@ var ts;
                         removeSemanticDiagnosticsOf(state, f.resolvedPath);
                 });
             }
+            ts.BuilderState.updateShapeSignature(state, ts.Debug.checkDefined(state.program), affectedFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
             return;
         }
+        else {
+            ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: ".concat(affectedFile.fileName));
+        }
         if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
             forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
         }
@@ -90303,13 +96821,12 @@ var ts;
             var program = ts.Debug.checkDefined(state.program);
             var sourceFile = program.getSourceFileByPath(path);
             if (sourceFile) {
-                ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap);
+                ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, true);
                 if (ts.getEmitDeclarations(state.compilerOptions)) {
                     addToAffectedFilesPendingEmit(state, path, 0);
                 }
             }
         }
-        return false;
     }
     function removeSemanticDiagnosticsOf(state, path) {
         if (!state.semanticDiagnosticsFromOldState) {
@@ -90325,6 +96842,7 @@ var ts;
         return newSignature !== oldSignature;
     }
     function forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, fn) {
+        var _a, _b;
         if (!state.exportedModulesMap || !state.changedFilesSet.has(affectedFile.resolvedPath)) {
             return;
         }
@@ -90338,8 +96856,8 @@ var ts;
                 var currentPath = queue.pop();
                 if (!seenFileNamesMap.has(currentPath)) {
                     seenFileNamesMap.set(currentPath, true);
-                    var result = fn(state, currentPath);
-                    if (result && isChangedSignature(state, currentPath)) {
+                    fn(state, currentPath);
+                    if (isChangedSignature(state, currentPath)) {
                         var currentSourceFile = ts.Debug.checkDefined(state.program).getSourceFileByPath(currentPath);
                         queue.push.apply(queue, ts.BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath));
                     }
@@ -90348,49 +96866,40 @@ var ts;
         }
         ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
         var seenFileAndExportsOfFile = new ts.Set();
-        if (ts.forEachEntry(state.currentAffectedFilesExportedModulesMap, function (exportedModules, exportedFromPath) {
-            return exportedModules &&
-                exportedModules.has(affectedFile.resolvedPath) &&
-                forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
-        })) {
-            return;
-        }
-        ts.forEachEntry(state.exportedModulesMap, function (exportedModules, exportedFromPath) {
-            return !state.currentAffectedFilesExportedModulesMap.has(exportedFromPath) &&
-                exportedModules.has(affectedFile.resolvedPath) &&
+        (_a = state.currentAffectedFilesExportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
+            return forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
+        });
+        (_b = state.exportedModulesMap.getKeys(affectedFile.resolvedPath)) === null || _b === void 0 ? void 0 : _b.forEach(function (exportedFromPath) {
+            var _a;
+            return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
+                !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) &&
                 forEachFilesReferencingPath(state, exportedFromPath, seenFileAndExportsOfFile, fn);
         });
     }
     function forEachFilesReferencingPath(state, referencedPath, seenFileAndExportsOfFile, fn) {
-        return ts.forEachEntry(state.referencedMap, function (referencesInFile, filePath) {
-            return referencesInFile.has(referencedPath) && forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn);
+        var _a;
+        (_a = state.referencedMap.getKeys(referencedPath)) === null || _a === void 0 ? void 0 : _a.forEach(function (filePath) {
+            return forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn);
         });
     }
     function forEachFileAndExportsOfFile(state, filePath, seenFileAndExportsOfFile, fn) {
+        var _a, _b, _c;
         if (!ts.tryAddToSet(seenFileAndExportsOfFile, filePath)) {
-            return false;
-        }
-        if (fn(state, filePath)) {
-            return true;
+            return;
         }
+        fn(state, filePath);
         ts.Debug.assert(!!state.currentAffectedFilesExportedModulesMap);
-        if (ts.forEachEntry(state.currentAffectedFilesExportedModulesMap, function (exportedModules, exportedFromPath) {
-            return exportedModules &&
-                exportedModules.has(filePath) &&
-                forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
-        })) {
-            return true;
-        }
-        if (ts.forEachEntry(state.exportedModulesMap, function (exportedModules, exportedFromPath) {
-            return !state.currentAffectedFilesExportedModulesMap.has(exportedFromPath) &&
-                exportedModules.has(filePath) &&
+        (_a = state.currentAffectedFilesExportedModulesMap.getKeys(filePath)) === null || _a === void 0 ? void 0 : _a.forEach(function (exportedFromPath) {
+            return forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
+        });
+        (_b = state.exportedModulesMap.getKeys(filePath)) === null || _b === void 0 ? void 0 : _b.forEach(function (exportedFromPath) {
+            var _a;
+            return !state.currentAffectedFilesExportedModulesMap.hasKey(exportedFromPath) &&
+                !((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(exportedFromPath)) &&
                 forEachFileAndExportsOfFile(state, exportedFromPath, seenFileAndExportsOfFile, fn);
-        })) {
-            return true;
-        }
-        return !!ts.forEachEntry(state.referencedMap, function (referencesInFile, referencingFilePath) {
-            return referencesInFile.has(filePath) &&
-                !seenFileAndExportsOfFile.has(referencingFilePath) &&
+        });
+        (_c = state.referencedMap.getKeys(filePath)) === null || _c === void 0 ? void 0 : _c.forEach(function (referencingFilePath) {
+            return !seenFileAndExportsOfFile.has(referencingFilePath) &&
                 fn(state, referencingFilePath);
         });
     }
@@ -90432,95 +96941,136 @@ var ts;
         if (state.semanticDiagnosticsPerFile) {
             var cachedDiagnostics = state.semanticDiagnosticsPerFile.get(path);
             if (cachedDiagnostics) {
-                return ts.filterSemanticDiagnotics(cachedDiagnostics, state.compilerOptions);
+                return ts.filterSemanticDiagnostics(cachedDiagnostics, state.compilerOptions);
             }
         }
         var diagnostics = ts.Debug.checkDefined(state.program).getBindAndCheckDiagnostics(sourceFile, cancellationToken);
         if (state.semanticDiagnosticsPerFile) {
             state.semanticDiagnosticsPerFile.set(path, diagnostics);
         }
-        return ts.filterSemanticDiagnotics(diagnostics, state.compilerOptions);
+        return ts.filterSemanticDiagnostics(diagnostics, state.compilerOptions);
     }
     function getProgramBuildInfo(state, getCanonicalFileName) {
         if (ts.outFile(state.compilerOptions))
             return undefined;
         var currentDirectory = ts.Debug.checkDefined(state.program).getCurrentDirectory();
         var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(ts.getTsBuildInfoEmitOutputFilePath(state.compilerOptions), currentDirectory));
-        var fileInfos = {};
-        state.fileInfos.forEach(function (value, key) {
+        var fileNames = [];
+        var fileNameToFileId = new ts.Map();
+        var fileIdsList;
+        var fileNamesToFileIdListId;
+        var fileInfos = ts.arrayFrom(state.fileInfos.entries(), function (_a) {
+            var key = _a[0], value = _a[1];
+            var fileId = toFileId(key);
+            ts.Debug.assert(fileNames[fileId - 1] === relativeToBuildInfo(key));
             var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
-            fileInfos[relativeToBuildInfo(key)] = signature === undefined ? value : { version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope };
+            var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
+            return value.version === actualSignature ?
+                value.affectsGlobalScope ?
+                    { version: value.version, signature: undefined, affectsGlobalScope: true, impliedFormat: value.impliedFormat } :
+                    value.version :
+                actualSignature !== undefined ?
+                    signature === undefined ?
+                        value :
+                        { version: value.version, signature: signature, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
+                    { version: value.version, signature: false, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat };
         });
-        var result = {
-            fileInfos: fileInfos,
-            options: convertToReusableCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath)
-        };
+        var referencedMap;
         if (state.referencedMap) {
-            var referencedMap = {};
-            for (var _i = 0, _a = ts.arrayFrom(state.referencedMap.keys()).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
-                var key = _a[_i];
-                referencedMap[relativeToBuildInfo(key)] = ts.arrayFrom(state.referencedMap.get(key).keys(), relativeToBuildInfo).sort(ts.compareStringsCaseSensitive);
-            }
-            result.referencedMap = referencedMap;
+            referencedMap = ts.arrayFrom(state.referencedMap.keys()).sort(ts.compareStringsCaseSensitive).map(function (key) { return [
+                toFileId(key),
+                toFileIdListId(state.referencedMap.getValues(key))
+            ]; });
         }
+        var exportedModulesMap;
         if (state.exportedModulesMap) {
-            var exportedModulesMap = {};
-            for (var _b = 0, _c = ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
-                var key = _c[_b];
-                var newValue = state.currentAffectedFilesExportedModulesMap && state.currentAffectedFilesExportedModulesMap.get(key);
-                if (newValue === undefined)
-                    exportedModulesMap[relativeToBuildInfo(key)] = ts.arrayFrom(state.exportedModulesMap.get(key).keys(), relativeToBuildInfo).sort(ts.compareStringsCaseSensitive);
-                else if (newValue)
-                    exportedModulesMap[relativeToBuildInfo(key)] = ts.arrayFrom(newValue.keys(), relativeToBuildInfo).sort(ts.compareStringsCaseSensitive);
-            }
-            result.exportedModulesMap = exportedModulesMap;
+            exportedModulesMap = ts.mapDefined(ts.arrayFrom(state.exportedModulesMap.keys()).sort(ts.compareStringsCaseSensitive), function (key) {
+                var _a;
+                if (state.currentAffectedFilesExportedModulesMap) {
+                    if ((_a = state.currentAffectedFilesExportedModulesMap.deletedKeys()) === null || _a === void 0 ? void 0 : _a.has(key)) {
+                        return undefined;
+                    }
+                    var newValue = state.currentAffectedFilesExportedModulesMap.getValues(key);
+                    if (newValue) {
+                        return [toFileId(key), toFileIdListId(newValue)];
+                    }
+                }
+                return [toFileId(key), toFileIdListId(state.exportedModulesMap.getValues(key))];
+            });
         }
+        var semanticDiagnosticsPerFile;
         if (state.semanticDiagnosticsPerFile) {
-            var semanticDiagnosticsPerFile = [];
-            for (var _d = 0, _e = ts.arrayFrom(state.semanticDiagnosticsPerFile.keys()).sort(ts.compareStringsCaseSensitive); _d < _e.length; _d++) {
-                var key = _e[_d];
+            for (var _i = 0, _a = ts.arrayFrom(state.semanticDiagnosticsPerFile.keys()).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
+                var key = _a[_i];
                 var value = state.semanticDiagnosticsPerFile.get(key);
-                semanticDiagnosticsPerFile.push(value.length ?
+                (semanticDiagnosticsPerFile || (semanticDiagnosticsPerFile = [])).push(value.length ?
                     [
-                        relativeToBuildInfo(key),
+                        toFileId(key),
                         state.hasReusableDiagnostic ?
                             value :
                             convertToReusableDiagnostics(value, relativeToBuildInfo)
                     ] :
-                    relativeToBuildInfo(key));
+                    toFileId(key));
             }
-            result.semanticDiagnosticsPerFile = semanticDiagnosticsPerFile;
         }
+        var affectedFilesPendingEmit;
         if (state.affectedFilesPendingEmit) {
-            var affectedFilesPendingEmit = [];
             var seenFiles = new ts.Set();
-            for (var _f = 0, _g = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _f < _g.length; _f++) {
-                var path = _g[_f];
+            for (var _b = 0, _c = state.affectedFilesPendingEmit.slice(state.affectedFilesPendingEmitIndex).sort(ts.compareStringsCaseSensitive); _b < _c.length; _b++) {
+                var path = _c[_b];
                 if (ts.tryAddToSet(seenFiles, path)) {
-                    affectedFilesPendingEmit.push([relativeToBuildInfo(path), state.affectedFilesPendingEmitKind.get(path)]);
+                    (affectedFilesPendingEmit || (affectedFilesPendingEmit = [])).push([toFileId(path), state.affectedFilesPendingEmitKind.get(path)]);
                 }
             }
-            result.affectedFilesPendingEmit = affectedFilesPendingEmit;
         }
-        return result;
+        return {
+            fileNames: fileNames,
+            fileInfos: fileInfos,
+            options: convertToProgramBuildInfoCompilerOptions(state.compilerOptions, relativeToBuildInfoEnsuringAbsolutePath),
+            fileIdsList: fileIdsList,
+            referencedMap: referencedMap,
+            exportedModulesMap: exportedModulesMap,
+            semanticDiagnosticsPerFile: semanticDiagnosticsPerFile,
+            affectedFilesPendingEmit: affectedFilesPendingEmit,
+        };
         function relativeToBuildInfoEnsuringAbsolutePath(path) {
             return relativeToBuildInfo(ts.getNormalizedAbsolutePath(path, currentDirectory));
         }
         function relativeToBuildInfo(path) {
             return ts.ensurePathIsNonModuleName(ts.getRelativePathFromDirectory(buildInfoDirectory, path, getCanonicalFileName));
         }
+        function toFileId(path) {
+            var fileId = fileNameToFileId.get(path);
+            if (fileId === undefined) {
+                fileNames.push(relativeToBuildInfo(path));
+                fileNameToFileId.set(path, fileId = fileNames.length);
+            }
+            return fileId;
+        }
+        function toFileIdListId(set) {
+            var fileIds = ts.arrayFrom(set.keys(), toFileId).sort(ts.compareValues);
+            var key = fileIds.join();
+            var fileIdListId = fileNamesToFileIdListId === null || fileNamesToFileIdListId === void 0 ? void 0 : fileNamesToFileIdListId.get(key);
+            if (fileIdListId === undefined) {
+                (fileIdsList || (fileIdsList = [])).push(fileIds);
+                (fileNamesToFileIdListId || (fileNamesToFileIdListId = new ts.Map())).set(key, fileIdListId = fileIdsList.length);
+            }
+            return fileIdListId;
+        }
     }
-    function convertToReusableCompilerOptions(options, relativeToBuildInfo) {
-        var result = {};
+    function convertToProgramBuildInfoCompilerOptions(options, relativeToBuildInfo) {
+        var result;
         var optionsNameMap = ts.getOptionsNameMap().optionsNameMap;
-        for (var name in options) {
-            if (ts.hasProperty(options, name)) {
-                result[name] = convertToReusableCompilerOptionValue(optionsNameMap.get(name.toLowerCase()), options[name], relativeToBuildInfo);
+        for (var _i = 0, _a = ts.getOwnKeys(options).sort(ts.compareStringsCaseSensitive); _i < _a.length; _i++) {
+            var name = _a[_i];
+            var optionKey = name.toLowerCase();
+            var optionInfo = optionsNameMap.get(optionKey);
+            if ((optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsEmit) || (optionInfo === null || optionInfo === void 0 ? void 0 : optionInfo.affectsSemanticDiagnostics) ||
+                optionKey === "strict" ||
+                optionKey === "skiplibcheck" || optionKey === "skipdefaultlibcheck") {
+                (result || (result = {}))[name] = convertToReusableCompilerOptionValue(optionInfo, options[name], relativeToBuildInfo);
             }
         }
-        if (result.configFilePath) {
-            result.configFilePath = relativeToBuildInfo(result.configFilePath);
-        }
         return result;
     }
     function convertToReusableCompilerOptionValue(option, value, relativeToBuildInfo) {
@@ -90605,14 +97155,15 @@ var ts;
         }
         var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
         var computeHash = ts.maybeBind(host, host.createHash);
-        var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState);
+        var state = createBuilderProgramState(newProgram, getCanonicalFileName, oldState, host.disableUseFileVersionAsSignature);
         var backupState;
         newProgram.getProgramBuildInfo = function () { return getProgramBuildInfo(state, getCanonicalFileName); };
         newProgram = undefined;
         oldProgram = undefined;
         oldState = undefined;
-        var builderProgram = createRedirectedBuilderProgram(state, configFileParsingDiagnostics);
-        builderProgram.getState = function () { return state; };
+        var getState = function () { return state; };
+        var builderProgram = createRedirectedBuilderProgram(getState, configFileParsingDiagnostics);
+        builderProgram.getState = getState;
         builderProgram.backupState = function () {
             ts.Debug.assert(backupState === undefined);
             backupState = cloneBuilderProgramState(state);
@@ -90773,35 +97324,31 @@ var ts;
             state.affectedFilesPendingEmitIndex = 0;
         }
     }
-    function getMapOfReferencedSet(mapLike, toPath) {
-        if (!mapLike)
-            return undefined;
-        var map = new ts.Map();
-        for (var key in mapLike) {
-            if (ts.hasProperty(mapLike, key)) {
-                map.set(toPath(key), new ts.Set(mapLike[key].map(toPath)));
-            }
-        }
-        return map;
+    function toBuilderStateFileInfo(fileInfo) {
+        return ts.isString(fileInfo) ?
+            { version: fileInfo, signature: fileInfo, affectsGlobalScope: undefined, impliedFormat: undefined } :
+            ts.isString(fileInfo.signature) ?
+                fileInfo :
+                { version: fileInfo.version, signature: fileInfo.signature === false ? undefined : fileInfo.version, affectsGlobalScope: fileInfo.affectsGlobalScope, impliedFormat: fileInfo.impliedFormat };
     }
+    ts.toBuilderStateFileInfo = toBuilderStateFileInfo;
     function createBuildProgramUsingProgramBuildInfo(program, buildInfoPath, host) {
+        var _a;
         var buildInfoDirectory = ts.getDirectoryPath(ts.getNormalizedAbsolutePath(buildInfoPath, host.getCurrentDirectory()));
         var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames());
+        var filePaths = program.fileNames.map(toPath);
+        var filePathsSetList = (_a = program.fileIdsList) === null || _a === void 0 ? void 0 : _a.map(function (fileIds) { return new ts.Set(fileIds.map(toFilePath)); });
         var fileInfos = new ts.Map();
-        for (var key in program.fileInfos) {
-            if (ts.hasProperty(program.fileInfos, key)) {
-                fileInfos.set(toPath(key), program.fileInfos[key]);
-            }
-        }
+        program.fileInfos.forEach(function (fileInfo, index) { return fileInfos.set(toFilePath(index + 1), toBuilderStateFileInfo(fileInfo)); });
         var state = {
             fileInfos: fileInfos,
-            compilerOptions: ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath),
-            referencedMap: getMapOfReferencedSet(program.referencedMap, toPath),
-            exportedModulesMap: getMapOfReferencedSet(program.exportedModulesMap, toPath),
-            semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toPath(ts.isString(value) ? value : value[0]); }, function (value) { return ts.isString(value) ? ts.emptyArray : value[1]; }),
+            compilerOptions: program.options ? ts.convertToOptionsWithAbsolutePaths(program.options, toAbsolutePath) : {},
+            referencedMap: toManyToManyPathMap(program.referencedMap),
+            exportedModulesMap: toManyToManyPathMap(program.exportedModulesMap),
+            semanticDiagnosticsPerFile: program.semanticDiagnosticsPerFile && ts.arrayToMap(program.semanticDiagnosticsPerFile, function (value) { return toFilePath(ts.isNumber(value) ? value : value[0]); }, function (value) { return ts.isNumber(value) ? ts.emptyArray : value[1]; }),
             hasReusableDiagnostic: true,
-            affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toPath(value[0]); }),
-            affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toPath(value[0]); }, function (value) { return value[1]; }),
+            affectedFilesPendingEmit: ts.map(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }),
+            affectedFilesPendingEmitKind: program.affectedFilesPendingEmit && ts.arrayToMap(program.affectedFilesPendingEmit, function (value) { return toFilePath(value[0]); }, function (value) { return value[1]; }),
             affectedFilesPendingEmitIndex: program.affectedFilesPendingEmit && 0,
         };
         return {
@@ -90834,17 +97381,34 @@ var ts;
         function toAbsolutePath(path) {
             return ts.getNormalizedAbsolutePath(path, buildInfoDirectory);
         }
+        function toFilePath(fileId) {
+            return filePaths[fileId - 1];
+        }
+        function toFilePathsSet(fileIdsListId) {
+            return filePathsSetList[fileIdsListId - 1];
+        }
+        function toManyToManyPathMap(referenceMap) {
+            if (!referenceMap) {
+                return undefined;
+            }
+            var map = ts.BuilderState.createManyToManyPathMap();
+            referenceMap.forEach(function (_a) {
+                var fileId = _a[0], fileIdListId = _a[1];
+                return map.set(toFilePath(fileId), toFilePathsSet(fileIdListId));
+            });
+            return map;
+        }
     }
     ts.createBuildProgramUsingProgramBuildInfo = createBuildProgramUsingProgramBuildInfo;
-    function createRedirectedBuilderProgram(state, configFileParsingDiagnostics) {
+    function createRedirectedBuilderProgram(getState, configFileParsingDiagnostics) {
         return {
             getState: ts.notImplemented,
             backupState: ts.noop,
             restoreState: ts.noop,
             getProgram: getProgram,
-            getProgramOrUndefined: function () { return state.program; },
-            releaseProgram: function () { return state.program = undefined; },
-            getCompilerOptions: function () { return state.compilerOptions; },
+            getProgramOrUndefined: function () { return getState().program; },
+            releaseProgram: function () { return getState().program = undefined; },
+            getCompilerOptions: function () { return getState().compilerOptions; },
             getSourceFile: function (fileName) { return getProgram().getSourceFile(fileName); },
             getSourceFiles: function () { return getProgram().getSourceFiles(); },
             getOptionsDiagnostics: function (cancellationToken) { return getProgram().getOptionsDiagnostics(cancellationToken); },
@@ -90860,7 +97424,7 @@ var ts;
             close: ts.noop,
         };
         function getProgram() {
-            return ts.Debug.checkDefined(state.program);
+            return ts.Debug.checkDefined(getState().program);
         }
     }
     ts.createRedirectedBuilderProgram = createRedirectedBuilderProgram;
@@ -90877,7 +97441,7 @@ var ts;
     ts.createEmitAndSemanticDiagnosticsBuilderProgram = createEmitAndSemanticDiagnosticsBuilderProgram;
     function createAbstractBuilder(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences) {
         var _a = ts.getBuilderCreationParameters(newProgramOrRootNames, hostOrOptions, oldProgramOrHost, configFileParsingDiagnosticsOrOldProgram, configFileParsingDiagnostics, projectReferences), newProgram = _a.newProgram, newConfigFileParsingDiagnostics = _a.configFileParsingDiagnostics;
-        return ts.createRedirectedBuilderProgram({ program: newProgram, compilerOptions: newProgram.getCompilerOptions() }, newConfigFileParsingDiagnostics);
+        return ts.createRedirectedBuilderProgram(function () { return ({ program: newProgram, compilerOptions: newProgram.getCompilerOptions() }); }, newConfigFileParsingDiagnostics);
     }
     ts.createAbstractBuilder = createAbstractBuilder;
 })(ts || (ts = {}));
@@ -90933,17 +97497,18 @@ var ts;
         var resolutionsWithFailedLookups = [];
         var resolvedFileToResolution = ts.createMultiMap();
         var hasChangedAutomaticTypeDirectiveNames = false;
-        var failedLookupChecks = [];
-        var startsWithPathChecks = [];
-        var isInDirectoryChecks = [];
+        var failedLookupChecks;
+        var startsWithPathChecks;
+        var isInDirectoryChecks;
         var getCurrentDirectory = ts.memoize(function () { return resolutionHost.getCurrentDirectory(); });
         var cachedDirectoryStructureHost = resolutionHost.getCachedDirectoryStructureHost();
         var resolvedModuleNames = new ts.Map();
         var perDirectoryResolvedModuleNames = ts.createCacheWithRedirects();
         var nonRelativeModuleNameCache = ts.createCacheWithRedirects();
-        var moduleResolutionCache = ts.createModuleResolutionCacheWithMaps(perDirectoryResolvedModuleNames, nonRelativeModuleNameCache, getCurrentDirectory(), resolutionHost.getCanonicalFileName);
+        var moduleResolutionCache = ts.createModuleResolutionCache(getCurrentDirectory(), resolutionHost.getCanonicalFileName, undefined, perDirectoryResolvedModuleNames, nonRelativeModuleNameCache);
         var resolvedTypeReferenceDirectives = new ts.Map();
         var perDirectoryResolvedTypeReferenceDirectives = ts.createCacheWithRedirects();
+        var typeReferenceDirectiveResolutionCache = ts.createTypeReferenceDirectiveResolutionCache(getCurrentDirectory(), resolutionHost.getCanonicalFileName, undefined, moduleResolutionCache.getPackageJsonInfoCache(), perDirectoryResolvedTypeReferenceDirectives);
         var failedLookupDefaultExtensions = [".ts", ".tsx", ".js", ".jsx", ".json"];
         var customFailedLookupPaths = new ts.Map();
         var directoryWatchesOfFailedLookups = new ts.Map();
@@ -90952,6 +97517,7 @@ var ts;
         var rootSplitLength = rootPath !== undefined ? rootPath.split(ts.directorySeparator).length : 0;
         var typeRootsWatches = new ts.Map();
         return {
+            getModuleResolutionCache: function () { return moduleResolutionCache; },
             startRecordingFilesWithChangedResolutions: startRecordingFilesWithChangedResolutions,
             finishRecordingFilesWithChangedResolutions: finishRecordingFilesWithChangedResolutions,
             startCachingPerDirectoryResolution: clearPerDirectoryResolutions,
@@ -90992,9 +97558,9 @@ var ts;
             resolvedTypeReferenceDirectives.clear();
             resolvedFileToResolution.clear();
             resolutionsWithFailedLookups.length = 0;
-            failedLookupChecks.length = 0;
-            startsWithPathChecks.length = 0;
-            isInDirectoryChecks.length = 0;
+            failedLookupChecks = undefined;
+            startsWithPathChecks = undefined;
+            isInDirectoryChecks = undefined;
             clearPerDirectoryResolutions();
             hasChangedAutomaticTypeDirectiveNames = false;
         }
@@ -91025,9 +97591,8 @@ var ts;
                 isFileWithInvalidatedNonRelativeUnresolvedImports(path); };
         }
         function clearPerDirectoryResolutions() {
-            perDirectoryResolvedModuleNames.clear();
-            nonRelativeModuleNameCache.clear();
-            perDirectoryResolvedTypeReferenceDirectives.clear();
+            moduleResolutionCache.clear();
+            typeReferenceDirectiveResolutionCache.clear();
             nonRelativeExternalModuleResolutions.forEach(watchFailedLookupLocationOfNonRelativeModuleResolutions);
             nonRelativeExternalModuleResolutions.clear();
         }
@@ -91050,7 +97615,7 @@ var ts;
             }
             var globalCache = resolutionHost.getGlobalCache();
             if (globalCache !== undefined && !ts.isExternalModuleNameRelative(moduleName) && !(primaryResult.resolvedModule && ts.extensionIsTS(primaryResult.resolvedModule.extension))) {
-                var _b = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache), resolvedModule = _b.resolvedModule, failedLookupLocations = _b.failedLookupLocations;
+                var _b = ts.loadModuleFromGlobalCache(ts.Debug.checkDefined(resolutionHost.globalCacheResolutionModuleName)(moduleName), resolutionHost.projectName, compilerOptions, host, globalCache, moduleResolutionCache), resolvedModule = _b.resolvedModule, failedLookupLocations = _b.failedLookupLocations;
                 if (resolvedModule) {
                     primaryResult.resolvedModule = resolvedModule;
                     (_a = primaryResult.failedLookupLocations).push.apply(_a, failedLookupLocations);
@@ -91059,16 +97624,19 @@ var ts;
             }
             return primaryResult;
         }
+        function resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference) {
+            return ts.resolveTypeReferenceDirective(typeReferenceDirectiveName, containingFile, options, host, redirectedReference, typeReferenceDirectiveResolutionCache);
+        }
         function resolveNamesWithLocalCache(_a) {
-            var _b;
-            var names = _a.names, containingFile = _a.containingFile, redirectedReference = _a.redirectedReference, cache = _a.cache, perDirectoryCacheWithRedirects = _a.perDirectoryCacheWithRedirects, loader = _a.loader, getResolutionWithResolvedFileName = _a.getResolutionWithResolvedFileName, shouldRetryResolution = _a.shouldRetryResolution, reusedNames = _a.reusedNames, logChanges = _a.logChanges;
+            var _b, _c, _d;
+            var names = _a.names, containingFile = _a.containingFile, redirectedReference = _a.redirectedReference, cache = _a.cache, perDirectoryCacheWithRedirects = _a.perDirectoryCacheWithRedirects, loader = _a.loader, getResolutionWithResolvedFileName = _a.getResolutionWithResolvedFileName, shouldRetryResolution = _a.shouldRetryResolution, reusedNames = _a.reusedNames, logChanges = _a.logChanges, containingSourceFile = _a.containingSourceFile;
             var path = resolutionHost.toPath(containingFile);
-            var resolutionsInFile = cache.get(path) || cache.set(path, new ts.Map()).get(path);
+            var resolutionsInFile = cache.get(path) || cache.set(path, ts.createModeAwareCache()).get(path);
             var dirPath = ts.getDirectoryPath(path);
             var perDirectoryCache = perDirectoryCacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
             var perDirectoryResolution = perDirectoryCache.get(dirPath);
             if (!perDirectoryResolution) {
-                perDirectoryResolution = new ts.Map();
+                perDirectoryResolution = ts.createModeAwareCache();
                 perDirectoryCache.set(dirPath, perDirectoryResolution);
             }
             var resolvedModules = [];
@@ -91079,23 +97647,44 @@ var ts;
             var unmatchedRedirects = oldRedirect ?
                 !redirectedReference || redirectedReference.sourceFile.path !== oldRedirect.sourceFile.path :
                 !!redirectedReference;
-            var seenNamesInFile = new ts.Map();
-            for (var _i = 0, names_3 = names; _i < names_3.length; _i++) {
-                var name = names_3[_i];
-                var resolution = resolutionsInFile.get(name);
-                if (!seenNamesInFile.has(name) &&
+            var seenNamesInFile = ts.createModeAwareCache();
+            var i = 0;
+            for (var _i = 0, names_4 = names; _i < names_4.length; _i++) {
+                var name = names_4[_i];
+                var mode = containingSourceFile ? ts.getModeForResolutionAtIndex(containingSourceFile, i) : undefined;
+                i++;
+                var resolution = resolutionsInFile.get(name, mode);
+                if (!seenNamesInFile.has(name, mode) &&
                     unmatchedRedirects || !resolution || resolution.isInvalidated ||
                     (hasInvalidatedNonRelativeUnresolvedImport && !ts.isExternalModuleNameRelative(name) && shouldRetryResolution(resolution))) {
                     var existingResolution = resolution;
-                    var resolutionInDirectory = perDirectoryResolution.get(name);
+                    var resolutionInDirectory = perDirectoryResolution.get(name, mode);
                     if (resolutionInDirectory) {
                         resolution = resolutionInDirectory;
+                        var host = ((_b = resolutionHost.getCompilerHost) === null || _b === void 0 ? void 0 : _b.call(resolutionHost)) || resolutionHost;
+                        if (ts.isTraceEnabled(compilerOptions, host)) {
+                            var resolved = getResolutionWithResolvedFileName(resolution);
+                            ts.trace(host, loader === resolveModuleName ?
+                                (resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName) ?
+                                    resolved.packagetId ?
+                                        ts.Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 :
+                                        ts.Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 :
+                                    ts.Diagnostics.Reusing_resolution_of_module_0_from_1_found_in_cache_from_location_2_it_was_not_resolved :
+                                (resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName) ?
+                                    resolved.packagetId ?
+                                        ts.Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3_with_Package_ID_4 :
+                                        ts.Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_successfully_resolved_to_3 :
+                                    ts.Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_found_in_cache_from_location_2_it_was_not_resolved, name, containingFile, ts.getDirectoryPath(containingFile), resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName, (resolved === null || resolved === void 0 ? void 0 : resolved.packagetId) && ts.packageIdToString(resolved.packagetId));
+                        }
                     }
                     else {
-                        resolution = loader(name, containingFile, compilerOptions, ((_b = resolutionHost.getCompilerHost) === null || _b === void 0 ? void 0 : _b.call(resolutionHost)) || resolutionHost, redirectedReference);
-                        perDirectoryResolution.set(name, resolution);
+                        resolution = loader(name, containingFile, compilerOptions, ((_c = resolutionHost.getCompilerHost) === null || _c === void 0 ? void 0 : _c.call(resolutionHost)) || resolutionHost, redirectedReference, containingSourceFile);
+                        perDirectoryResolution.set(name, mode, resolution);
+                        if (resolutionHost.onDiscoveredSymlink && resolutionIsSymlink(resolution)) {
+                            resolutionHost.onDiscoveredSymlink();
+                        }
                     }
-                    resolutionsInFile.set(name, resolution);
+                    resolutionsInFile.set(name, mode, resolution);
                     watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, path, getResolutionWithResolvedFileName);
                     if (existingResolution) {
                         stopWatchFailedLookupLocationOfResolution(existingResolution, path, getResolutionWithResolvedFileName);
@@ -91105,14 +97694,31 @@ var ts;
                         logChanges = false;
                     }
                 }
+                else {
+                    var host = ((_d = resolutionHost.getCompilerHost) === null || _d === void 0 ? void 0 : _d.call(resolutionHost)) || resolutionHost;
+                    if (ts.isTraceEnabled(compilerOptions, host) && !seenNamesInFile.has(name, mode)) {
+                        var resolved = getResolutionWithResolvedFileName(resolution);
+                        ts.trace(host, loader === resolveModuleName ?
+                            (resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName) ?
+                                resolved.packagetId ?
+                                    ts.Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 :
+                                    ts.Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_successfully_resolved_to_2 :
+                                ts.Diagnostics.Reusing_resolution_of_module_0_from_1_of_old_program_it_was_not_resolved :
+                            (resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName) ?
+                                resolved.packagetId ?
+                                    ts.Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2_with_Package_ID_3 :
+                                    ts.Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_successfully_resolved_to_2 :
+                                ts.Diagnostics.Reusing_resolution_of_type_reference_directive_0_from_1_of_old_program_it_was_not_resolved, name, containingFile, resolved === null || resolved === void 0 ? void 0 : resolved.resolvedFileName, (resolved === null || resolved === void 0 ? void 0 : resolved.packagetId) && ts.packageIdToString(resolved.packagetId));
+                    }
+                }
                 ts.Debug.assert(resolution !== undefined && !resolution.isInvalidated);
-                seenNamesInFile.set(name, true);
+                seenNamesInFile.set(name, mode, true);
                 resolvedModules.push(getResolutionWithResolvedFileName(resolution));
             }
-            resolutionsInFile.forEach(function (resolution, name) {
-                if (!seenNamesInFile.has(name) && !ts.contains(reusedNames, name)) {
+            resolutionsInFile.forEach(function (resolution, name, mode) {
+                if (!seenNamesInFile.has(name, mode) && !ts.contains(reusedNames, name)) {
                     stopWatchFailedLookupLocationOfResolution(resolution, path, getResolutionWithResolvedFileName);
-                    resolutionsInFile.delete(name);
+                    resolutionsInFile.delete(name, mode);
                 }
             });
             return resolvedModules;
@@ -91141,12 +97747,12 @@ var ts;
                 redirectedReference: redirectedReference,
                 cache: resolvedTypeReferenceDirectives,
                 perDirectoryCacheWithRedirects: perDirectoryResolvedTypeReferenceDirectives,
-                loader: ts.resolveTypeReferenceDirective,
+                loader: resolveTypeReferenceDirective,
                 getResolutionWithResolvedFileName: getResolvedTypeReferenceDirective,
                 shouldRetryResolution: function (resolution) { return resolution.resolvedTypeReferenceDirective === undefined; },
             });
         }
-        function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference) {
+        function resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, containingSourceFile) {
             return resolveNamesWithLocalCache({
                 names: moduleNames,
                 containingFile: containingFile,
@@ -91158,11 +97764,14 @@ var ts;
                 shouldRetryResolution: function (resolution) { return !resolution.resolvedModule || !ts.resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension); },
                 reusedNames: reusedNames,
                 logChanges: logChangesWhenResolvingModule,
+                containingSourceFile: containingSourceFile,
             });
         }
-        function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile) {
+        function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile, resolutionMode) {
             var cache = resolvedModuleNames.get(resolutionHost.toPath(containingFile));
-            return cache && cache.get(moduleName);
+            if (!cache)
+                return undefined;
+            return cache.get(moduleName, resolutionMode);
         }
         function isNodeModulesAtTypesDirectory(dirPath) {
             return ts.endsWith(dirPath, "/node_modules/@types");
@@ -91172,7 +97781,7 @@ var ts;
                 failedLookupLocation = ts.isRootedDiskPath(failedLookupLocation) ? ts.normalizePath(failedLookupLocation) : ts.getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
                 var failedLookupPathSplit = failedLookupLocationPath.split(ts.directorySeparator);
                 var failedLookupSplit = failedLookupLocation.split(ts.directorySeparator);
-                ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: " + failedLookupLocation + " failedLookupLocationPath: " + failedLookupLocationPath);
+                ts.Debug.assert(failedLookupSplit.length === failedLookupPathSplit.length, "FailedLookup: ".concat(failedLookupLocation, " failedLookupLocationPath: ").concat(failedLookupLocationPath));
                 if (failedLookupPathSplit.length > rootSplitLength + 1) {
                     return {
                         dir: failedLookupSplit.slice(0, rootSplitLength + 1).join(ts.directorySeparator),
@@ -91348,17 +97957,14 @@ var ts;
             }
         }
         function removeResolutionsFromProjectReferenceRedirects(filePath) {
-            if (!ts.fileExtensionIs(filePath, ".json")) {
+            if (!ts.fileExtensionIs(filePath, ".json"))
                 return;
-            }
             var program = resolutionHost.getCurrentProgram();
-            if (!program) {
+            if (!program)
                 return;
-            }
             var resolvedProjectReference = program.getResolvedProjectReferenceByPath(filePath);
-            if (!resolvedProjectReference) {
+            if (!resolvedProjectReference)
                 return;
-            }
             resolvedProjectReference.commandLine.fileNames.forEach(function (f) { return removeResolutionsOfFile(resolutionHost.toPath(f)); });
         }
         function removeResolutionsOfFile(filePath) {
@@ -91397,7 +98003,7 @@ var ts;
         }
         function scheduleInvalidateResolutionOfFailedLookupLocation(fileOrDirectoryPath, isCreatingWatchedDirectory) {
             if (isCreatingWatchedDirectory) {
-                isInDirectoryChecks.push(fileOrDirectoryPath);
+                (isInDirectoryChecks || (isInDirectoryChecks = [])).push(fileOrDirectoryPath);
             }
             else {
                 var updatedPath = removeIgnoredPath(fileOrDirectoryPath);
@@ -91410,8 +98016,8 @@ var ts;
                 var dirOfFileOrDirectory = ts.getDirectoryPath(fileOrDirectoryPath);
                 if (isNodeModulesAtTypesDirectory(fileOrDirectoryPath) || ts.isNodeModulesDirectory(fileOrDirectoryPath) ||
                     isNodeModulesAtTypesDirectory(dirOfFileOrDirectory) || ts.isNodeModulesDirectory(dirOfFileOrDirectory)) {
-                    failedLookupChecks.push(fileOrDirectoryPath);
-                    startsWithPathChecks.push(fileOrDirectoryPath);
+                    (failedLookupChecks || (failedLookupChecks = [])).push(fileOrDirectoryPath);
+                    (startsWithPathChecks || (startsWithPathChecks = new ts.Set())).add(fileOrDirectoryPath);
                 }
                 else {
                     if (!isPathWithDefaultFailedLookupExtension(fileOrDirectoryPath) && !customFailedLookupPaths.has(fileOrDirectoryPath)) {
@@ -91420,27 +98026,30 @@ var ts;
                     if (ts.isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
                         return false;
                     }
-                    failedLookupChecks.push(fileOrDirectoryPath);
+                    (failedLookupChecks || (failedLookupChecks = [])).push(fileOrDirectoryPath);
+                    var packagePath = ts.parseNodeModuleFromPath(fileOrDirectoryPath);
+                    if (packagePath)
+                        (startsWithPathChecks || (startsWithPathChecks = new ts.Set())).add(packagePath);
                 }
             }
             resolutionHost.scheduleInvalidateResolutionsOfFailedLookupLocations();
         }
         function invalidateResolutionsOfFailedLookupLocations() {
-            if (!failedLookupChecks.length && !startsWithPathChecks.length && !isInDirectoryChecks.length) {
+            if (!failedLookupChecks && !startsWithPathChecks && !isInDirectoryChecks) {
                 return false;
             }
             var invalidated = invalidateResolutions(resolutionsWithFailedLookups, canInvalidateFailedLookupResolution);
-            failedLookupChecks.length = 0;
-            startsWithPathChecks.length = 0;
-            isInDirectoryChecks.length = 0;
+            failedLookupChecks = undefined;
+            startsWithPathChecks = undefined;
+            isInDirectoryChecks = undefined;
             return invalidated;
         }
         function canInvalidateFailedLookupResolution(resolution) {
             return resolution.failedLookupLocations.some(function (location) {
                 var locationPath = resolutionHost.toPath(location);
                 return ts.contains(failedLookupChecks, locationPath) ||
-                    startsWithPathChecks.some(function (fileOrDirectoryPath) { return ts.startsWith(locationPath, fileOrDirectoryPath); }) ||
-                    isInDirectoryChecks.some(function (fileOrDirectoryPath) { return isInDirectoryPath(fileOrDirectoryPath, locationPath); });
+                    ts.firstDefinedIterator((startsWithPathChecks === null || startsWithPathChecks === void 0 ? void 0 : startsWithPathChecks.keys()) || ts.emptyIterator, function (fileOrDirectoryPath) { return ts.startsWith(locationPath, fileOrDirectoryPath) ? true : undefined; }) ||
+                    (isInDirectoryChecks === null || isInDirectoryChecks === void 0 ? void 0 : isInDirectoryChecks.some(function (fileOrDirectoryPath) { return isInDirectoryPath(fileOrDirectoryPath, locationPath); }));
             });
         }
         function closeTypeRootsWatch() {
@@ -91491,12 +98100,17 @@ var ts;
         }
     }
     ts.createResolutionCache = createResolutionCache;
+    function resolutionIsSymlink(resolution) {
+        var _a, _b;
+        return !!(((_a = resolution.resolvedModule) === null || _a === void 0 ? void 0 : _a.originalPath) ||
+            ((_b = resolution.resolvedTypeReferenceDirective) === null || _b === void 0 ? void 0 : _b.originalPath));
+    }
 })(ts || (ts = {}));
 var ts;
 (function (ts) {
     var moduleSpecifiers;
-    (function (moduleSpecifiers) {
-        function getPreferences(_a, compilerOptions, importingSourceFile) {
+    (function (moduleSpecifiers_1) {
+        function getPreferences(host, _a, compilerOptions, importingSourceFile) {
             var importModuleSpecifierPreference = _a.importModuleSpecifierPreference, importModuleSpecifierEnding = _a.importModuleSpecifierEnding;
             return {
                 relativePreference: importModuleSpecifierPreference === "relative" ? 0 :
@@ -91510,51 +98124,98 @@ var ts;
                     case "minimal": return 0;
                     case "index": return 1;
                     case "js": return 2;
-                    default: return usesJsExtensionOnImports(importingSourceFile) ? 2
+                    default: return usesJsExtensionOnImports(importingSourceFile) || isFormatRequiringExtensions(compilerOptions, importingSourceFile.path, host) ? 2
                         : ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs ? 1 : 0;
                 }
             }
         }
-        function getPreferencesForUpdate(compilerOptions, oldImportSpecifier) {
+        function getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host) {
             return {
                 relativePreference: ts.isExternalModuleNameRelative(oldImportSpecifier) ? 0 : 1,
-                ending: ts.hasJSFileExtension(oldImportSpecifier) ?
+                ending: ts.hasJSFileExtension(oldImportSpecifier) || isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) ?
                     2 :
                     ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeJs || ts.endsWith(oldImportSpecifier, "index") ? 1 : 0,
             };
         }
+        function isFormatRequiringExtensions(compilerOptions, importingSourceFileName, host) {
+            if (ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.Node12
+                && ts.getEmitModuleResolutionKind(compilerOptions) !== ts.ModuleResolutionKind.NodeNext) {
+                return false;
+            }
+            return ts.getImpliedNodeFormatForFile(importingSourceFileName, undefined, getModuleResolutionHost(host), compilerOptions) !== ts.ModuleKind.CommonJS;
+        }
+        function getModuleResolutionHost(host) {
+            var _a;
+            return {
+                fileExists: host.fileExists,
+                readFile: ts.Debug.checkDefined(host.readFile),
+                directoryExists: host.directoryExists,
+                getCurrentDirectory: host.getCurrentDirectory,
+                realpath: host.realpath,
+                useCaseSensitiveFileNames: (_a = host.useCaseSensitiveFileNames) === null || _a === void 0 ? void 0 : _a.call(host),
+            };
+        }
         function updateModuleSpecifier(compilerOptions, importingSourceFileName, toFileName, host, oldImportSpecifier) {
-            var res = getModuleSpecifierWorker(compilerOptions, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier));
+            var res = getModuleSpecifierWorker(compilerOptions, importingSourceFileName, toFileName, host, getPreferencesForUpdate(compilerOptions, oldImportSpecifier, importingSourceFileName, host), {});
             if (res === oldImportSpecifier)
                 return undefined;
             return res;
         }
-        moduleSpecifiers.updateModuleSpecifier = updateModuleSpecifier;
-        function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host, preferences) {
-            if (preferences === void 0) { preferences = {}; }
-            return getModuleSpecifierWorker(compilerOptions, importingSourceFileName, toFileName, host, getPreferences(preferences, compilerOptions, importingSourceFile));
+        moduleSpecifiers_1.updateModuleSpecifier = updateModuleSpecifier;
+        function getModuleSpecifier(compilerOptions, importingSourceFile, importingSourceFileName, toFileName, host) {
+            return getModuleSpecifierWorker(compilerOptions, importingSourceFileName, toFileName, host, getPreferences(host, {}, compilerOptions, importingSourceFile), {});
         }
-        moduleSpecifiers.getModuleSpecifier = getModuleSpecifier;
-        function getNodeModulesPackageName(compilerOptions, importingSourceFileName, nodeModulesFileName, host) {
+        moduleSpecifiers_1.getModuleSpecifier = getModuleSpecifier;
+        function getNodeModulesPackageName(compilerOptions, importingSourceFileName, nodeModulesFileName, host, preferences) {
             var info = getInfo(importingSourceFileName, host);
-            var modulePaths = getAllModulePaths(importingSourceFileName, nodeModulesFileName, host);
+            var modulePaths = getAllModulePaths(importingSourceFileName, nodeModulesFileName, host, preferences);
             return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, host, compilerOptions, true); });
         }
-        moduleSpecifiers.getNodeModulesPackageName = getNodeModulesPackageName;
-        function getModuleSpecifierWorker(compilerOptions, importingSourceFileName, toFileName, host, preferences) {
+        moduleSpecifiers_1.getNodeModulesPackageName = getNodeModulesPackageName;
+        function getModuleSpecifierWorker(compilerOptions, importingSourceFileName, toFileName, host, preferences, userPreferences) {
             var info = getInfo(importingSourceFileName, host);
-            var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host);
+            var modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host, userPreferences);
             return ts.firstDefined(modulePaths, function (modulePath) { return tryGetModuleNameAsNodeModule(modulePath, info, host, compilerOptions); }) ||
                 getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences);
         }
+        function tryGetModuleSpecifiersFromCache(moduleSymbol, importingSourceFile, host, userPreferences) {
+            return tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences)[0];
+        }
+        moduleSpecifiers_1.tryGetModuleSpecifiersFromCache = tryGetModuleSpecifiersFromCache;
+        function tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences) {
+            var _a;
+            var moduleSourceFile = ts.getSourceFileOfModule(moduleSymbol);
+            if (!moduleSourceFile) {
+                return ts.emptyArray;
+            }
+            var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
+            var cached = cache === null || cache === void 0 ? void 0 : cache.get(importingSourceFile.path, moduleSourceFile.path, userPreferences);
+            return [cached === null || cached === void 0 ? void 0 : cached.moduleSpecifiers, moduleSourceFile, cached === null || cached === void 0 ? void 0 : cached.modulePaths, cache];
+        }
         function getModuleSpecifiers(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
+            return getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences).moduleSpecifiers;
+        }
+        moduleSpecifiers_1.getModuleSpecifiers = getModuleSpecifiers;
+        function getModuleSpecifiersWithCacheInfo(moduleSymbol, checker, compilerOptions, importingSourceFile, host, userPreferences) {
+            var computedWithoutCache = false;
             var ambient = tryGetModuleNameFromAmbientModule(moduleSymbol, checker);
             if (ambient)
-                return [ambient];
+                return { moduleSpecifiers: [ambient], computedWithoutCache: computedWithoutCache };
+            var _a = tryGetModuleSpecifiersFromCacheWorker(moduleSymbol, importingSourceFile, host, userPreferences), specifiers = _a[0], moduleSourceFile = _a[1], modulePaths = _a[2], cache = _a[3];
+            if (specifiers)
+                return { moduleSpecifiers: specifiers, computedWithoutCache: computedWithoutCache };
+            if (!moduleSourceFile)
+                return { moduleSpecifiers: ts.emptyArray, computedWithoutCache: computedWithoutCache };
+            computedWithoutCache = true;
+            modulePaths || (modulePaths = getAllModulePathsWorker(importingSourceFile.path, moduleSourceFile.originalFileName, host));
+            var result = computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences);
+            cache === null || cache === void 0 ? void 0 : cache.set(importingSourceFile.path, moduleSourceFile.path, userPreferences, modulePaths, result);
+            return { moduleSpecifiers: result, computedWithoutCache: computedWithoutCache };
+        }
+        moduleSpecifiers_1.getModuleSpecifiersWithCacheInfo = getModuleSpecifiersWithCacheInfo;
+        function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFile, host, userPreferences) {
             var info = getInfo(importingSourceFile.path, host);
-            var moduleSourceFile = ts.getSourceFileOfNode(moduleSymbol.valueDeclaration || ts.getNonAugmentationDeclaration(moduleSymbol));
-            var modulePaths = getAllModulePaths(importingSourceFile.path, moduleSourceFile.originalFileName, host);
-            var preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile);
+            var preferences = getPreferences(host, userPreferences, compilerOptions, importingSourceFile);
             var existingSpecifier = ts.forEach(modulePaths, function (modulePath) { return ts.forEach(host.getFileIncludeReasons().get(ts.toPath(modulePath.path, host.getCurrentDirectory(), info.getCanonicalFileName)), function (reason) {
                 if (reason.kind !== ts.FileIncludeKind.Import || reason.file !== importingSourceFile.path)
                     return undefined;
@@ -91563,8 +98224,10 @@ var ts;
                     specifier :
                     undefined;
             }); });
-            if (existingSpecifier)
-                return [existingSpecifier];
+            if (existingSpecifier) {
+                var moduleSpecifiers_2 = [existingSpecifier];
+                return moduleSpecifiers_2;
+            }
             var importedFileIsInNodeModules = ts.some(modulePaths, function (p) { return p.isInNodeModules; });
             var nodeModulesSpecifiers;
             var pathsSpecifiers;
@@ -91590,7 +98253,6 @@ var ts;
                 (nodeModulesSpecifiers === null || nodeModulesSpecifiers === void 0 ? void 0 : nodeModulesSpecifiers.length) ? nodeModulesSpecifiers :
                     ts.Debug.checkDefined(relativeSpecifiers);
         }
-        moduleSpecifiers.getModuleSpecifiers = getModuleSpecifiers;
         function getInfo(importingSourceFileName, host) {
             var getCanonicalFileName = ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames ? host.useCaseSensitiveFileNames() : true);
             var sourceDirectory = ts.getDirectoryPath(importingSourceFileName);
@@ -91605,7 +98267,7 @@ var ts;
             if (!baseUrl && !paths || relativePreference === 0) {
                 return relativePath;
             }
-            var baseDirectory = ts.getPathsBasePath(compilerOptions, host) || baseUrl;
+            var baseDirectory = ts.getNormalizedAbsolutePath(ts.getPathsBasePath(compilerOptions, host) || baseUrl, host.getCurrentDirectory());
             var relativeToBaseUrl = getRelativePathIfInDirectory(moduleFileName, baseDirectory, getCanonicalFileName);
             if (!relativeToBaseUrl) {
                 return relativePath;
@@ -91620,7 +98282,9 @@ var ts;
                 return nonRelative;
             }
             if (relativePreference === 3) {
-                var projectDirectory = host.getCurrentDirectory();
+                var projectDirectory = compilerOptions.configFilePath ?
+                    ts.toPath(ts.getDirectoryPath(compilerOptions.configFilePath), host.getCurrentDirectory(), info.getCanonicalFileName) :
+                    info.getCanonicalFileName(host.getCurrentDirectory());
                 var modulePath = ts.toPath(moduleFileName, projectDirectory, getCanonicalFileName);
                 var sourceIsInternal = ts.startsWith(sourceDirectory, projectDirectory);
                 var targetIsInternal = ts.startsWith(modulePath, projectDirectory);
@@ -91646,7 +98310,7 @@ var ts;
             }
             return count;
         }
-        moduleSpecifiers.countPathComponents = countPathComponents;
+        moduleSpecifiers_1.countPathComponents = countPathComponents;
         function usesJsExtensionOnImports(_a) {
             var imports = _a.imports;
             return ts.firstDefined(imports, function (_a) {
@@ -91666,23 +98330,21 @@ var ts;
             });
         }
         function forEachFileNameOfModule(importingFileName, importedFileName, host, preferSymlinks, cb) {
+            var _a;
             var getCanonicalFileName = ts.hostGetCanonicalFileName(host);
             var cwd = host.getCurrentDirectory();
             var referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : undefined;
             var importedPath = ts.toPath(importedFileName, cwd, getCanonicalFileName);
             var redirects = host.redirectTargetsMap.get(importedPath) || ts.emptyArray;
-            var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray)), [importedFileName]), redirects);
+            var importedFileNames = __spreadArray(__spreadArray(__spreadArray([], (referenceRedirect ? [referenceRedirect] : ts.emptyArray), true), [importedFileName], false), redirects, true);
             var targets = importedFileNames.map(function (f) { return ts.getNormalizedAbsolutePath(f, cwd); });
             var shouldFilterIgnoredPaths = !ts.every(targets, ts.containsIgnoredPath);
             if (!preferSymlinks) {
-                var result_15 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
-                if (result_15)
-                    return result_15;
-            }
-            var links = host.getSymlinkCache
-                ? host.getSymlinkCache()
-                : ts.discoverProbableSymlinks(host.getSourceFiles(), getCanonicalFileName, cwd);
-            var symlinkedDirectories = links.getSymlinkedDirectoriesByRealpath();
+                var result_14 = ts.forEach(targets, function (p) { return !(shouldFilterIgnoredPaths && ts.containsIgnoredPath(p)) && cb(p, referenceRedirect === p); });
+                if (result_14)
+                    return result_14;
+            }
+            var symlinkedDirectories = (_a = host.getSymlinkCache) === null || _a === void 0 ? void 0 : _a.call(host).getSymlinkedDirectoriesByRealpath();
             var fullImportedFileName = ts.getNormalizedAbsolutePath(importedFileName, cwd);
             var result = symlinkedDirectories && ts.forEachAncestorDirectory(ts.getDirectoryPath(fullImportedFileName), function (realPathDirectory) {
                 var symlinkDirectories = symlinkedDirectories.get(ts.ensureTrailingDirectorySeparator(ts.toPath(realPathDirectory, cwd, getCanonicalFileName)));
@@ -91699,10 +98361,10 @@ var ts;
                     for (var _i = 0, symlinkDirectories_1 = symlinkDirectories; _i < symlinkDirectories_1.length; _i++) {
                         var symlinkDirectory = symlinkDirectories_1[_i];
                         var option = ts.resolvePath(symlinkDirectory, relative);
-                        var result_16 = cb(option, target === referenceRedirect);
+                        var result_15 = cb(option, target === referenceRedirect);
                         shouldFilterIgnoredPaths = true;
-                        if (result_16)
-                            return result_16;
+                        if (result_15)
+                            return result_15;
                     }
                 });
             });
@@ -91710,9 +98372,23 @@ var ts;
                 ? ts.forEach(targets, function (p) { return shouldFilterIgnoredPaths && ts.containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect); })
                 : undefined);
         }
-        moduleSpecifiers.forEachFileNameOfModule = forEachFileNameOfModule;
-        function getAllModulePaths(importingFileName, importedFileName, host) {
-            var cwd = host.getCurrentDirectory();
+        moduleSpecifiers_1.forEachFileNameOfModule = forEachFileNameOfModule;
+        function getAllModulePaths(importingFilePath, importedFileName, host, preferences, importedFilePath) {
+            var _a;
+            if (importedFilePath === void 0) { importedFilePath = ts.toPath(importedFileName, host.getCurrentDirectory(), ts.hostGetCanonicalFileName(host)); }
+            var cache = (_a = host.getModuleSpecifierCache) === null || _a === void 0 ? void 0 : _a.call(host);
+            if (cache) {
+                var cached = cache.get(importingFilePath, importedFilePath, preferences);
+                if (cached === null || cached === void 0 ? void 0 : cached.modulePaths)
+                    return cached.modulePaths;
+            }
+            var modulePaths = getAllModulePathsWorker(importingFilePath, importedFileName, host);
+            if (cache) {
+                cache.setModulePaths(importingFilePath, importedFilePath, preferences, modulePaths);
+            }
+            return modulePaths;
+        }
+        function getAllModulePathsWorker(importingFileName, importedFileName, host) {
             var getCanonicalFileName = ts.hostGetCanonicalFileName(host);
             var allFileNames = new ts.Map();
             var importedFileFromNodeModules = false;
@@ -91722,7 +98398,7 @@ var ts;
                 importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
             });
             var sortedPaths = [];
-            var _loop_24 = function (directory) {
+            var _loop_31 = function (directory) {
                 var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
                 var pathsInDirectory;
                 allFileNames.forEach(function (_a, fileName) {
@@ -91745,10 +98421,10 @@ var ts;
                 out_directory_1 = directory;
             };
             var out_directory_1;
-            for (var directory = ts.getDirectoryPath(ts.toPath(importingFileName, cwd, getCanonicalFileName)); allFileNames.size !== 0;) {
-                var state_8 = _loop_24(directory);
+            for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
+                var state_9 = _loop_31(directory);
                 directory = out_directory_1;
-                if (state_8 === "break")
+                if (state_9 === "break")
                     break;
             }
             if (allFileNames.size) {
@@ -91760,7 +98436,8 @@ var ts;
             return sortedPaths;
         }
         function tryGetModuleNameFromAmbientModule(moduleSymbol, checker) {
-            var decl = ts.find(moduleSymbol.declarations, function (d) { return ts.isNonGlobalAmbientModule(d) && (!ts.isExternalModuleAugmentation(d) || !ts.isExternalModuleNameRelative(ts.getTextOfIdentifierOrLiteral(d.name))); });
+            var _a;
+            var decl = (_a = moduleSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return ts.isNonGlobalAmbientModule(d) && (!ts.isExternalModuleAugmentation(d) || !ts.isExternalModuleNameRelative(ts.getTextOfIdentifierOrLiteral(d.name))); });
             if (decl) {
                 return decl.name.text;
             }
@@ -91806,7 +98483,7 @@ var ts;
                             ts.startsWith(relativeToBaseUrl, prefix) &&
                             ts.endsWith(relativeToBaseUrl, suffix) ||
                             !suffix && relativeToBaseUrl === ts.removeTrailingDirectorySeparator(prefix)) {
-                            var matchedStar = relativeToBaseUrl.substr(prefix.length, relativeToBaseUrl.length - suffix.length);
+                            var matchedStar = relativeToBaseUrl.substr(prefix.length, relativeToBaseUrl.length - suffix.length - prefix.length);
                             return key.replace("*", matchedStar);
                         }
                     }
@@ -91816,6 +98493,66 @@ var ts;
                 }
             }
         }
+        function tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, exports, conditions, mode) {
+            if (mode === void 0) { mode = 0; }
+            if (typeof exports === "string") {
+                var pathOrPattern = ts.getNormalizedAbsolutePath(ts.combinePaths(packageDirectory, exports), undefined);
+                var extensionSwappedTarget = ts.hasTSFileExtension(targetFilePath) ? ts.removeFileExtension(targetFilePath) + tryGetJSExtensionForFile(targetFilePath, options) : undefined;
+                switch (mode) {
+                    case 0:
+                        if (ts.comparePaths(targetFilePath, pathOrPattern) === 0 || (extensionSwappedTarget && ts.comparePaths(extensionSwappedTarget, pathOrPattern) === 0)) {
+                            return { moduleFileToTry: packageName };
+                        }
+                        break;
+                    case 1:
+                        if (ts.containsPath(pathOrPattern, targetFilePath)) {
+                            var fragment = ts.getRelativePathFromDirectory(pathOrPattern, targetFilePath, false);
+                            return { moduleFileToTry: ts.getNormalizedAbsolutePath(ts.combinePaths(ts.combinePaths(packageName, exports), fragment), undefined) };
+                        }
+                        break;
+                    case 2:
+                        var starPos = pathOrPattern.indexOf("*");
+                        var leadingSlice = pathOrPattern.slice(0, starPos);
+                        var trailingSlice = pathOrPattern.slice(starPos + 1);
+                        if (ts.startsWith(targetFilePath, leadingSlice) && ts.endsWith(targetFilePath, trailingSlice)) {
+                            var starReplacement = targetFilePath.slice(leadingSlice.length, targetFilePath.length - trailingSlice.length);
+                            return { moduleFileToTry: packageName.replace("*", starReplacement) };
+                        }
+                        if (extensionSwappedTarget && ts.startsWith(extensionSwappedTarget, leadingSlice) && ts.endsWith(extensionSwappedTarget, trailingSlice)) {
+                            var starReplacement = extensionSwappedTarget.slice(leadingSlice.length, extensionSwappedTarget.length - trailingSlice.length);
+                            return { moduleFileToTry: packageName.replace("*", starReplacement) };
+                        }
+                        break;
+                }
+            }
+            else if (Array.isArray(exports)) {
+                return ts.forEach(exports, function (e) { return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, e, conditions); });
+            }
+            else if (typeof exports === "object" && exports !== null) {
+                if (ts.allKeysStartWithDot(exports)) {
+                    return ts.forEach(ts.getOwnKeys(exports), function (k) {
+                        var subPackageName = ts.getNormalizedAbsolutePath(ts.combinePaths(packageName, k), undefined);
+                        var mode = ts.endsWith(k, "/") ? 1
+                            : ts.stringContains(k, "*") ? 2
+                                : 0;
+                        return tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, subPackageName, exports[k], conditions, mode);
+                    });
+                }
+                else {
+                    for (var _i = 0, _a = ts.getOwnKeys(exports); _i < _a.length; _i++) {
+                        var key = _a[_i];
+                        if (key === "default" || conditions.indexOf(key) >= 0 || ts.isApplicableVersionedTypesKey(conditions, key)) {
+                            var subTarget = exports[key];
+                            var result = tryGetModuleNameFromExports(options, targetFilePath, packageDirectory, packageName, subTarget, conditions);
+                            if (result) {
+                                return result;
+                            }
+                        }
+                    }
+                }
+            }
+            return undefined;
+        }
         function tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) {
             var normalizedTargetPath = getPathRelativeToRootDirs(moduleFileName, rootDirs, getCanonicalFileName);
             if (normalizedTargetPath === undefined) {
@@ -91843,7 +98580,15 @@ var ts;
                 var packageRootIndex = parts.packageRootIndex;
                 var moduleFileNameForExtensionless = void 0;
                 while (true) {
-                    var _c = tryDirectoryWithPackageJson(packageRootIndex), moduleFileToTry = _c.moduleFileToTry, packageRootPath = _c.packageRootPath;
+                    var _c = tryDirectoryWithPackageJson(packageRootIndex), moduleFileToTry = _c.moduleFileToTry, packageRootPath = _c.packageRootPath, blockedByExports = _c.blockedByExports, verbatimFromExports = _c.verbatimFromExports;
+                    if (ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.Classic) {
+                        if (blockedByExports) {
+                            return undefined;
+                        }
+                        if (verbatimFromExports) {
+                            return moduleFileToTry;
+                        }
+                    }
                     if (packageRootPath) {
                         moduleSpecifier = packageRootPath;
                         isPackageRootPath = true;
@@ -91868,13 +98613,23 @@ var ts;
             }
             var nodeModulesDirectoryName = moduleSpecifier.substring(parts.topLevelPackageNameIndex + 1);
             var packageName = ts.getPackageNameFromTypesPackageName(nodeModulesDirectoryName);
-            return ts.getEmitModuleResolutionKind(options) !== ts.ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName;
+            return ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Classic && packageName === nodeModulesDirectoryName ? undefined : packageName;
             function tryDirectoryWithPackageJson(packageRootIndex) {
                 var packageRootPath = path.substring(0, packageRootIndex);
                 var packageJsonPath = ts.combinePaths(packageRootPath, "package.json");
                 var moduleFileToTry = path;
                 if (host.fileExists(packageJsonPath)) {
                     var packageJsonContent = JSON.parse(host.readFile(packageJsonPath));
+                    if (ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.Node12 || ts.getEmitModuleResolutionKind(options) === ts.ModuleResolutionKind.NodeNext) {
+                        var fromExports = packageJsonContent.exports && typeof packageJsonContent.name === "string" ? tryGetModuleNameFromExports(options, path, packageRootPath, packageJsonContent.name, packageJsonContent.exports, ["node", "types"]) : undefined;
+                        if (fromExports) {
+                            var withJsExtension = !ts.hasTSFileExtension(fromExports.moduleFileToTry) ? fromExports : { moduleFileToTry: ts.removeFileExtension(fromExports.moduleFileToTry) + tryGetJSExtensionForFile(fromExports.moduleFileToTry, options) };
+                            return __assign(__assign({}, withJsExtension), { verbatimFromExports: true });
+                        }
+                        if (packageJsonContent.exports) {
+                            return { moduleFileToTry: path, blockedByExports: true };
+                        }
+                    }
                     var versionPaths = packageJsonContent.typesVersions
                         ? ts.getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions)
                         : undefined;
@@ -91906,7 +98661,7 @@ var ts;
         function tryGetAnyFileFromPath(host, path) {
             if (!host.fileExists)
                 return;
-            var extensions = ts.getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 }]);
+            var extensions = ts.flatten(ts.getSupportedExtensions({ allowJs: true }, [{ extension: "node", isMixedContent: false }, { extension: "json", isMixedContent: false, scriptKind: 6 }]));
             for (var _i = 0, extensions_3 = extensions; _i < extensions_3.length; _i++) {
                 var e = extensions_3[_i];
                 var fullPath = path + e;
@@ -91964,9 +98719,11 @@ var ts;
             });
         }
         function removeExtensionAndIndexPostFix(fileName, ending, options) {
-            if (ts.fileExtensionIs(fileName, ".json"))
+            if (ts.fileExtensionIsOneOf(fileName, [".json", ".mjs", ".cjs"]))
                 return fileName;
             var noExtension = ts.removeFileExtension(fileName);
+            if (ts.fileExtensionIsOneOf(fileName, [".d.mts", ".mts", ".d.cts", ".cts"]))
+                return noExtension + getJSExtensionForFile(fileName, options);
             switch (ending) {
                 case 0:
                     return ts.removeSuffix(noExtension, "/index");
@@ -91979,7 +98736,11 @@ var ts;
             }
         }
         function getJSExtensionForFile(fileName, options) {
-            var ext = ts.extensionFromPath(fileName);
+            var _a;
+            return (_a = tryGetJSExtensionForFile(fileName, options)) !== null && _a !== void 0 ? _a : ts.Debug.fail("Extension ".concat(ts.extensionFromPath(fileName), " is unsupported:: FileName:: ").concat(fileName));
+        }
+        function tryGetJSExtensionForFile(fileName, options) {
+            var ext = ts.tryGetExtensionFromPath(fileName);
             switch (ext) {
                 case ".ts":
                 case ".d.ts":
@@ -91990,12 +98751,19 @@ var ts;
                 case ".jsx":
                 case ".json":
                     return ext;
-                case ".tsbuildinfo":
-                    return ts.Debug.fail("Extension " + ".tsbuildinfo" + " is unsupported:: FileName:: " + fileName);
+                case ".d.mts":
+                case ".mts":
+                case ".mjs":
+                    return ".mjs";
+                case ".d.cts":
+                case ".cts":
+                case ".cjs":
+                    return ".cjs";
                 default:
-                    return ts.Debug.assertNever(ext);
+                    return undefined;
             }
         }
+        moduleSpecifiers_1.tryGetJSExtensionForFile = tryGetJSExtensionForFile;
         function getRelativePathIfInDirectory(path, directoryPath, getCanonicalFileName) {
             var relativePath = ts.getRelativePathToDirectoryOrUrl(directoryPath, path, directoryPath, getCanonicalFileName, false);
             return ts.isRootedDiskPath(relativePath) ? undefined : relativePath;
@@ -92013,7 +98781,7 @@ var ts;
         getCanonicalFileName: ts.createGetCanonicalFileName(ts.sys.useCaseSensitiveFileNames)
     } : undefined;
     function createDiagnosticReporter(system, pretty) {
-        var host = system === ts.sys ? sysFormatDiagnosticsHost : {
+        var host = system === ts.sys && sysFormatDiagnosticsHost ? sysFormatDiagnosticsHost : {
             getCurrentDirectory: function () { return system.getCurrentDirectory(); },
             getNewLine: function () { return system.newLine; },
             getCanonicalFileName: ts.createGetCanonicalFileName(system.useCaseSensitiveFileNames),
@@ -92059,8 +98827,8 @@ var ts;
         return pretty ?
             function (diagnostic, newLine, options) {
                 clearScreenIfNotWatchingForFileChanges(system, diagnostic, options);
-                var output = "[" + ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] ";
-                output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (newLine + newLine);
+                var output = "[".concat(ts.formatColorAndReset(getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ");
+                output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(newLine + newLine);
                 system.write(output);
             } :
             function (diagnostic, newLine, options) {
@@ -92068,16 +98836,16 @@ var ts;
                 if (!clearScreenIfNotWatchingForFileChanges(system, diagnostic, options)) {
                     output += newLine;
                 }
-                output += getLocaleTimeString(system) + " - ";
-                output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + getPlainDiagnosticFollowingNewLines(diagnostic, newLine);
+                output += "".concat(getLocaleTimeString(system), " - ");
+                output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(getPlainDiagnosticFollowingNewLines(diagnostic, newLine));
                 system.write(output);
             };
     }
     ts.createWatchStatusReporter = createWatchStatusReporter;
-    function parseConfigFileWithSystem(configFileName, optionsToExtend, watchOptionsToExtend, system, reportDiagnostic) {
+    function parseConfigFileWithSystem(configFileName, optionsToExtend, extendedConfigCache, watchOptionsToExtend, system, reportDiagnostic) {
         var host = system;
         host.onUnRecoverableConfigFileDiagnostic = function (diagnostic) { return reportUnrecoverableDiagnostic(system, reportDiagnostic, diagnostic); };
-        var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, undefined, watchOptionsToExtend);
+        var result = ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend);
         host.onUnRecoverableConfigFileDiagnostic = undefined;
         return result;
     }
@@ -92096,7 +98864,7 @@ var ts;
         if (errorCount === 0)
             return "";
         var d = ts.createCompilerDiagnostic(errorCount === 1 ? ts.Diagnostics.Found_1_error : ts.Diagnostics.Found_0_errors, errorCount);
-        return "" + newLine + ts.flattenDiagnosticMessageText(d.messageText, newLine) + newLine + newLine;
+        return "".concat(newLine).concat(ts.flattenDiagnosticMessageText(d.messageText, newLine)).concat(newLine).concat(newLine);
     }
     ts.getErrorSummaryText = getErrorSummaryText;
     function isBuilderProgram(program) {
@@ -92122,9 +98890,9 @@ var ts;
         var relativeFileName = function (fileName) { return ts.convertToRelativePath(fileName, program.getCurrentDirectory(), getCanonicalFileName); };
         for (var _i = 0, _c = program.getSourceFiles(); _i < _c.length; _i++) {
             var file = _c[_i];
-            write("" + toFileName(file, relativeFileName));
-            (_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write("  " + fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText); });
-            (_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write("  " + d.messageText); });
+            write("".concat(toFileName(file, relativeFileName)));
+            (_a = reasons.get(file.path)) === null || _a === void 0 ? void 0 : _a.forEach(function (reason) { return write("  ".concat(fileIncludeReasonToDiagnostics(program, reason, relativeFileName).messageText)); });
+            (_b = explainIfFileIsRedirect(file, relativeFileName)) === null || _b === void 0 ? void 0 : _b.forEach(function (d) { return write("  ".concat(d.messageText)); });
         }
     }
     ts.explainFiles = explainFiles;
@@ -92162,7 +98930,7 @@ var ts;
             if (isJsonFile && !ts.endsWith(includeSpec, ".json"))
                 return false;
             var pattern = ts.getPatternFromSpec(includeSpec, basePath, "files");
-            return !!pattern && ts.getRegexFromPattern("(" + pattern + ")$", useCaseSensitiveFileNames).test(fileName);
+            return !!pattern && ts.getRegexFromPattern("(".concat(pattern, ")$"), useCaseSensitiveFileNames).test(fileName);
         });
     }
     ts.getMatchedIncludeSpec = getMatchedIncludeSpec;
@@ -92171,7 +98939,7 @@ var ts;
         var options = program.getCompilerOptions();
         if (ts.isReferencedFile(reason)) {
             var referenceLocation = ts.getReferencedFileLocation(function (path) { return program.getSourceFileByPath(path); }, reason);
-            var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"" + referenceLocation.text + "\"";
+            var referenceText = ts.isReferenceFileLocation(referenceLocation) ? referenceLocation.file.text.substring(referenceLocation.pos, referenceLocation.end) : "\"".concat(referenceLocation.text, "\"");
             var message = void 0;
             ts.Debug.assert(ts.isReferenceFileLocation(referenceLocation) || reason.kind === ts.FileIncludeKind.Import, "Only synthetic references are imports");
             switch (reason.kind) {
@@ -92244,7 +99012,7 @@ var ts;
             case ts.FileIncludeKind.LibFile:
                 if (reason.index !== undefined)
                     return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Library_0_specified_in_compilerOptions, options.lib[reason.index]);
-                var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === options.target ? key : undefined; });
+                var target = ts.forEachEntry(ts.targetOptionDeclaration.type, function (value, key) { return value === ts.getEmitScriptTarget(options) ? key : undefined; });
                 return ts.chainDiagnosticMessages(undefined, target ?
                     ts.Diagnostics.Default_library_for_target_0 :
                     ts.Diagnostics.Default_library, target);
@@ -92282,7 +99050,7 @@ var ts;
             var currentDir_1 = program.getCurrentDirectory();
             ts.forEach(emittedFiles, function (file) {
                 var filepath = ts.getNormalizedAbsolutePath(file, currentDir_1);
-                write("TSFILE: " + filepath);
+                write("TSFILE: ".concat(filepath));
             });
             listFiles(program, write);
         }
@@ -92327,7 +99095,11 @@ var ts;
         MissingFile: "Missing file",
         WildcardDirectory: "Wild card directory",
         FailedLookupLocations: "Failed Lookup Locations",
-        TypeRoots: "Type roots"
+        TypeRoots: "Type roots",
+        ConfigFileOfReferencedProject: "Config file of referened project",
+        ExtendedConfigOfReferencedProject: "Extended config file of referenced project",
+        WildcardDirectoryOfReferencedProject: "Wild card directory of referenced project",
+        PackageJson: "package.json file",
     };
     function createWatchFactory(host, options) {
         var watchLogLevel = host.trace ? options.extendedDiagnostics ? ts.WatchLogLevel.Verbose : options.diagnostics ? ts.WatchLogLevel.TriggerOnly : ts.WatchLogLevel.None : ts.WatchLogLevel.None;
@@ -92374,6 +99146,7 @@ var ts;
             getEnvironmentVariable: ts.maybeBind(host, host.getEnvironmentVariable) || (function () { return ""; }),
             createHash: ts.maybeBind(host, host.createHash),
             readDirectory: ts.maybeBind(host, host.readDirectory),
+            disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature,
         };
         function writeFile(fileName, text, writeByteOrderMark, onError) {
             try {
@@ -92398,7 +99171,7 @@ var ts;
             for (var _i = 0; _i < arguments.length; _i++) {
                 args[_i] = arguments[_i];
             }
-            var result = originalGetSourceFile.call.apply(originalGetSourceFile, __spreadArray([compilerHost], args));
+            var result = originalGetSourceFile.call.apply(originalGetSourceFile, __spreadArray([compilerHost], args, false));
             if (result) {
                 result.version = computeHash(result.text);
             }
@@ -92425,7 +99198,8 @@ var ts;
             createDirectory: function (path) { return system.createDirectory(path); },
             writeFile: function (path, data, writeByteOrderMark) { return system.writeFile(path, data, writeByteOrderMark); },
             createHash: ts.maybeBind(system, system.createHash),
-            createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram
+            createProgram: createProgram || ts.createEmitAndSemanticDiagnosticsBuilderProgram,
+            disableUseFileVersionAsSignature: system.disableUseFileVersionAsSignature,
         };
     }
     ts.createProgramHost = createProgramHost;
@@ -92501,6 +99275,7 @@ var ts;
         if (system === void 0) { system = ts.sys; }
         var host = ts.createCompilerHostWorker(options, undefined, system);
         host.createHash = ts.maybeBind(system, system.createHash);
+        host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
         ts.setGetSourceFileAsHashVersioned(host, system);
         ts.changeCompilerHostLikeToUseCache(host, function (fileName) { return ts.toPath(fileName, host.getCurrentDirectory(), host.getCanonicalFileName); });
         return host;
@@ -92544,11 +99319,15 @@ var ts;
     function createWatchProgram(host) {
         var builderProgram;
         var reloadLevel;
-        var extendedConfigFilesMap;
         var missingFilesMap;
+        var packageJsonMap;
         var watchedWildcardDirectories;
         var timerToUpdateProgram;
         var timerToInvalidateFailedLookupResolutions;
+        var parsedConfigs;
+        var sharedExtendedConfigFileWatchers;
+        var extendedConfigCache = host.extendedConfigCache;
+        var changesAffectResolution = false;
         var sourceFilesCache = new ts.Map();
         var missingFilePathsRequestedForRelease;
         var hasChangedCompilerOptions = false;
@@ -92577,7 +99356,7 @@ var ts;
         }
         var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
         var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
-        writeLog("Current directory: " + currentDirectory + " CaseSensitiveFileNames: " + useCaseSensitiveFileNames);
+        writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
         var configFileWatcher;
         if (configFileName) {
             configFileWatcher = watchFile(configFileName, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ConfigFile);
@@ -92590,12 +99369,13 @@ var ts;
             for (var _i = 1; _i < arguments.length; _i++) {
                 args[_i - 1] = arguments[_i];
             }
-            return getVersionedSourceFileByPath.apply(void 0, __spreadArray([fileName, toPath(fileName)], args));
+            return getVersionedSourceFileByPath.apply(void 0, __spreadArray([fileName, toPath(fileName)], args, false));
         };
         compilerHost.getSourceFileByPath = getVersionedSourceFileByPath;
         compilerHost.getNewLine = function () { return newLine; };
         compilerHost.fileExists = fileExists;
         compilerHost.onReleaseOldSourceFile = onReleaseOldSourceFile;
+        compilerHost.onReleaseParsedCommandLine = onReleaseParsedCommandLine;
         compilerHost.toPath = toPath;
         compilerHost.getCompilationSettings = function () { return compilerOptions; };
         compilerHost.useSourceOfProjectReferenceRedirect = ts.maybeBind(host, host.useSourceOfProjectReferenceRedirect);
@@ -92608,6 +99388,7 @@ var ts;
         compilerHost.fileIsOpen = ts.returnFalse;
         compilerHost.getCurrentProgram = getCurrentProgram;
         compilerHost.writeLog = writeLog;
+        compilerHost.getParsedCommandLine = getParsedCommandLine;
         var resolutionCache = ts.createResolutionCache(compilerHost, configFileName ?
             ts.getDirectoryPath(ts.getNormalizedAbsolutePath(configFileName, currentDirectory)) :
             currentDirectory, false);
@@ -92619,7 +99400,7 @@ var ts;
                 }
                 return host.resolveModuleNames.apply(host, args);
             }) :
-            (function (moduleNames, containingFile, reusedNames, redirectedReference) { return resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference); });
+            (function (moduleNames, containingFile, reusedNames, redirectedReference, _options, sourceFile) { return resolutionCache.resolveModuleNames(moduleNames, containingFile, reusedNames, redirectedReference, sourceFile); });
         compilerHost.resolveTypeReferenceDirectives = host.resolveTypeReferenceDirectives ?
             (function () {
                 var args = [];
@@ -92633,7 +99414,8 @@ var ts;
         builderProgram = readBuilderProgram(compilerOptions, compilerHost);
         synchronizeProgram();
         watchConfigFileWildCardDirectories();
-        watchExtendedConfigFiles();
+        if (configFileName)
+            updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, ts.WatchType.ExtendedConfigFile);
         return configFileName ?
             { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, close: close } :
             { getCurrentProgram: getCurrentBuilderProgram, getProgram: updateProgram, updateRootFileNames: updateRootFileNames, close: close };
@@ -92650,9 +99432,11 @@ var ts;
                 configFileWatcher.close();
                 configFileWatcher = undefined;
             }
-            if (extendedConfigFilesMap) {
-                ts.clearMap(extendedConfigFilesMap, ts.closeFileWatcher);
-                extendedConfigFilesMap = undefined;
+            extendedConfigCache === null || extendedConfigCache === void 0 ? void 0 : extendedConfigCache.clear();
+            extendedConfigCache = undefined;
+            if (sharedExtendedConfigFileWatchers) {
+                ts.clearMap(sharedExtendedConfigFileWatchers, ts.closeFileWatcherOf);
+                sharedExtendedConfigFileWatchers = undefined;
             }
             if (watchedWildcardDirectories) {
                 ts.clearMap(watchedWildcardDirectories, ts.closeFileWatcherOf);
@@ -92662,6 +99446,21 @@ var ts;
                 ts.clearMap(missingFilesMap, ts.closeFileWatcher);
                 missingFilesMap = undefined;
             }
+            if (parsedConfigs) {
+                ts.clearMap(parsedConfigs, function (config) {
+                    var _a;
+                    (_a = config.watcher) === null || _a === void 0 ? void 0 : _a.close();
+                    config.watcher = undefined;
+                    if (config.watchedDirectories)
+                        ts.clearMap(config.watchedDirectories, ts.closeFileWatcherOf);
+                    config.watchedDirectories = undefined;
+                });
+                parsedConfigs = undefined;
+            }
+            if (packageJsonMap) {
+                ts.clearMap(packageJsonMap, ts.closeFileWatcher);
+                packageJsonMap = undefined;
+            }
         }
         function getCurrentBuilderProgram() {
             return builderProgram;
@@ -92675,12 +99474,12 @@ var ts;
             var program = getCurrentBuilderProgram();
             if (hasChangedCompilerOptions) {
                 newLine = updateNewLine();
-                if (program && ts.changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions)) {
+                if (program && (changesAffectResolution || ts.changesAffectModuleResolution(program.getCompilerOptions(), compilerOptions))) {
                     resolutionCache.clear();
                 }
             }
-            var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution);
-            if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, projectReferences)) {
+            var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution || changesAffectResolution);
+            if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
                 if (hasChangedConfigFileParsingErrors) {
                     builderProgram = createProgram(undefined, undefined, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences);
                     hasChangedConfigFileParsingErrors = false;
@@ -92689,6 +99488,7 @@ var ts;
             else {
                 createNewProgram(hasInvalidatedResolution);
             }
+            changesAffectResolution = false;
             if (host.afterProgramCreate && program !== builderProgram) {
                 host.afterProgramCreate(builderProgram);
             }
@@ -92696,8 +99496,10 @@ var ts;
         }
         function createNewProgram(hasInvalidatedResolution) {
             writeLog("CreatingProgramWith::");
-            writeLog("  roots: " + JSON.stringify(rootFileNames));
-            writeLog("  options: " + JSON.stringify(compilerOptions));
+            writeLog("  roots: ".concat(JSON.stringify(rootFileNames)));
+            writeLog("  options: ".concat(JSON.stringify(compilerOptions)));
+            if (projectReferences)
+                writeLog("  projectReferences: ".concat(JSON.stringify(projectReferences)));
             var needsUpdateInTypeRootWatch = hasChangedCompilerOptions || !getCurrentProgram();
             hasChangedCompilerOptions = false;
             hasChangedConfigFileParsingErrors = false;
@@ -92705,8 +99507,13 @@ var ts;
             compilerHost.hasInvalidatedResolution = hasInvalidatedResolution;
             compilerHost.hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames;
             builderProgram = createProgram(rootFileNames, compilerOptions, compilerHost, builderProgram, configFileParsingDiagnostics, projectReferences);
+            var packageCacheEntries = ts.map(resolutionCache.getModuleResolutionCache().getPackageJsonInfoCache().entries(), function (_a) {
+                var path = _a[0], data = _a[1];
+                return [compilerHost.realpath ? toPath(compilerHost.realpath(path)) : path, data];
+            });
             resolutionCache.finishCachingPerDirectoryResolution();
             ts.updateMissingFilePathsWatch(builderProgram.getProgram(), missingFilesMap || (missingFilesMap = new ts.Map()), watchMissingFilePath);
+            ts.updatePackageJsonWatch(packageCacheEntries, packageJsonMap || (packageJsonMap = new ts.Map()), watchPackageJsonLookupPath);
             if (needsUpdateInTypeRootWatch) {
                 resolutionCache.updateTypeRootsWatch();
             }
@@ -92775,6 +99582,9 @@ var ts;
                         sourceFilesCache.set(path, false);
                     }
                 }
+                if (sourceFile) {
+                    sourceFile.impliedNodeFormat = ts.getImpliedNodeFormatForFile(path, resolutionCache.getModuleResolutionCache().getPackageJsonInfoCache(), compilerHost, compilerHost.getCompilationSettings());
+                }
                 return sourceFile;
             }
             return hostSourceFile.sourceFile;
@@ -92831,7 +99641,7 @@ var ts;
                 return resolutionCache.invalidateResolutionsOfFailedLookupLocations();
             }
             var pending = clearInvalidateResolutionsOfFailedLookupLocations();
-            writeLog("Scheduling invalidateFailedLookup" + (pending ? ", Cancelled earlier one" : ""));
+            writeLog("Scheduling invalidateFailedLookup".concat(pending ? ", Cancelled earlier one" : ""));
             timerToInvalidateFailedLookupResolutions = host.setTimeout(invalidateResolutionsOfFailedLookup, 250);
         }
         function invalidateResolutionsOfFailedLookup() {
@@ -92887,7 +99697,7 @@ var ts;
             synchronizeProgram();
         }
         function reloadConfigFile() {
-            writeLog("Reloading config file: " + configFileName);
+            writeLog("Reloading config file: ".concat(configFileName));
             reloadLevel = ts.ConfigFileProgramReloadLevel.None;
             if (cachedDirectoryStructureHost) {
                 cachedDirectoryStructureHost.clearCache();
@@ -92896,10 +99706,10 @@ var ts;
             hasChangedCompilerOptions = true;
             synchronizeProgram();
             watchConfigFileWildCardDirectories();
-            watchExtendedConfigFiles();
+            updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, ts.WatchType.ExtendedConfigFile);
         }
         function parseConfigFile() {
-            setConfigFileParsingResult(ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtendForConfigFile, parseConfigFileHost, undefined, watchOptionsToExtend, extraFileExtensions));
+            setConfigFileParsingResult(ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtendForConfigFile, parseConfigFileHost, extendedConfigCache || (extendedConfigCache = new ts.Map()), watchOptionsToExtend, extraFileExtensions));
         }
         function setConfigFileParsingResult(configFileParseResult) {
             rootFileNames = configFileParseResult.fileNames;
@@ -92911,6 +99721,53 @@ var ts;
             canConfigFileJsonReportNoInputFiles = ts.canJsonReportNoInputFiles(configFileParseResult.raw);
             hasChangedConfigFileParsingErrors = true;
         }
+        function getParsedCommandLine(configFileName) {
+            var configPath = toPath(configFileName);
+            var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(configPath);
+            if (config) {
+                if (!config.reloadLevel)
+                    return config.parsedCommandLine;
+                if (config.parsedCommandLine && config.reloadLevel === ts.ConfigFileProgramReloadLevel.Partial && !host.getParsedCommandLine) {
+                    writeLog("Reloading new file names and options");
+                    var fileNames = ts.getFileNamesFromConfigSpecs(config.parsedCommandLine.options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost);
+                    config.parsedCommandLine = __assign(__assign({}, config.parsedCommandLine), { fileNames: fileNames });
+                    config.reloadLevel = undefined;
+                    return config.parsedCommandLine;
+                }
+            }
+            writeLog("Loading config file: ".concat(configFileName));
+            var parsedCommandLine = host.getParsedCommandLine ?
+                host.getParsedCommandLine(configFileName) :
+                getParsedCommandLineFromConfigFileHost(configFileName);
+            if (config) {
+                config.parsedCommandLine = parsedCommandLine;
+                config.reloadLevel = undefined;
+            }
+            else {
+                (parsedConfigs || (parsedConfigs = new ts.Map())).set(configPath, config = { parsedCommandLine: parsedCommandLine });
+            }
+            watchReferencedProject(configFileName, configPath, config);
+            return parsedCommandLine;
+        }
+        function getParsedCommandLineFromConfigFileHost(configFileName) {
+            var onUnRecoverableConfigFileDiagnostic = parseConfigFileHost.onUnRecoverableConfigFileDiagnostic;
+            parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = ts.noop;
+            var parsedCommandLine = ts.getParsedCommandLineOfConfigFile(configFileName, undefined, parseConfigFileHost, extendedConfigCache || (extendedConfigCache = new ts.Map()), watchOptionsToExtend);
+            parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = onUnRecoverableConfigFileDiagnostic;
+            return parsedCommandLine;
+        }
+        function onReleaseParsedCommandLine(fileName) {
+            var _a;
+            var path = toPath(fileName);
+            var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(path);
+            if (!config)
+                return;
+            parsedConfigs.delete(path);
+            if (config.watchedDirectories)
+                ts.clearMap(config.watchedDirectories, ts.closeFileWatcherOf);
+            (_a = config.watcher) === null || _a === void 0 ? void 0 : _a.close();
+            ts.clearSharedExtendedConfigFileWatcher(path, sharedExtendedConfigFileWatchers);
+        }
         function watchFilePath(path, file, callback, pollingInterval, options, watchType) {
             return watchFile(file, function (fileName, eventKind) { return callback(fileName, eventKind, path); }, pollingInterval, options, watchType);
         }
@@ -92919,7 +99776,6 @@ var ts;
             if (eventKind === ts.FileWatcherEventKind.Deleted && sourceFilesCache.has(path)) {
                 resolutionCache.invalidateResolutionOfFile(path);
             }
-            resolutionCache.removeResolutionsFromProjectReferenceRedirects(path);
             nextSourceFileVersion(path);
             scheduleProgramUpdate();
         }
@@ -92929,7 +99785,20 @@ var ts;
             }
         }
         function watchMissingFilePath(missingFilePath) {
-            return watchFilePath(missingFilePath, missingFilePath, onMissingFileChange, ts.PollingInterval.Medium, watchOptions, ts.WatchType.MissingFile);
+            return (parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.has(missingFilePath)) ?
+                ts.noopFileWatcher :
+                watchFilePath(missingFilePath, missingFilePath, onMissingFileChange, ts.PollingInterval.Medium, watchOptions, ts.WatchType.MissingFile);
+        }
+        function watchPackageJsonLookupPath(packageJsonPath) {
+            return sourceFilesCache.has(packageJsonPath) ?
+                ts.noopFileWatcher :
+                watchFilePath(packageJsonPath, packageJsonPath, onPackageJsonChange, ts.PollingInterval.High, watchOptions, ts.WatchType.PackageJson);
+        }
+        function onPackageJsonChange(fileName, eventKind, path) {
+            updateCachedSystemWithFile(fileName, path, eventKind);
+            reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
+            changesAffectResolution = true;
+            scheduleProgramUpdate();
         }
         function onMissingFileChange(fileName, eventKind, missingFilePath) {
             updateCachedSystemWithFile(fileName, missingFilePath, eventKind);
@@ -92963,10 +99832,11 @@ var ts;
                     configFileName: configFileName,
                     extraFileExtensions: extraFileExtensions,
                     options: compilerOptions,
-                    program: getCurrentBuilderProgram(),
+                    program: getCurrentBuilderProgram() || rootFileNames,
                     currentDirectory: currentDirectory,
                     useCaseSensitiveFileNames: useCaseSensitiveFileNames,
-                    writeLog: writeLog
+                    writeLog: writeLog,
+                    toPath: toPath,
                 }))
                     return;
                 if (reloadLevel !== ts.ConfigFileProgramReloadLevel.Full) {
@@ -92975,15 +99845,76 @@ var ts;
                 }
             }, flags, watchOptions, ts.WatchType.WildcardDirectory);
         }
-        function watchExtendedConfigFiles() {
-            var _a;
-            ts.mutateMap(extendedConfigFilesMap || (extendedConfigFilesMap = new ts.Map()), ts.arrayToMap(((_a = compilerOptions.configFile) === null || _a === void 0 ? void 0 : _a.extendedSourceFiles) || ts.emptyArray, toPath), {
-                createNewValue: watchExtendedConfigFile,
-                onDeleteValue: ts.closeFileWatcher
-            });
-        }
-        function watchExtendedConfigFile(extendedConfigFile) {
-            return watchFile(extendedConfigFile, scheduleProgramReload, ts.PollingInterval.High, watchOptions, ts.WatchType.ExtendedConfigFile);
+        function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions, watchType) {
+            ts.updateSharedExtendedConfigFileWatcher(forProjectPath, options, sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = new ts.Map()), function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(extendedConfigFileName, function (_fileName, eventKind) {
+                var _a;
+                updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind);
+                if (extendedConfigCache)
+                    ts.cleanExtendedConfigCache(extendedConfigCache, extendedConfigFilePath, toPath);
+                var projects = (_a = sharedExtendedConfigFileWatchers.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects;
+                if (!(projects === null || projects === void 0 ? void 0 : projects.size))
+                    return;
+                projects.forEach(function (projectPath) {
+                    if (toPath(configFileName) === projectPath) {
+                        reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
+                    }
+                    else {
+                        var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(projectPath);
+                        if (config)
+                            config.reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
+                        resolutionCache.removeResolutionsFromProjectReferenceRedirects(projectPath);
+                    }
+                    scheduleProgramUpdate();
+                });
+            }, ts.PollingInterval.High, watchOptions, watchType); }, toPath);
+        }
+        function watchReferencedProject(configFileName, configPath, commandLine) {
+            var _a, _b, _c, _d, _e;
+            commandLine.watcher || (commandLine.watcher = watchFile(configFileName, function (_fileName, eventKind) {
+                updateCachedSystemWithFile(configFileName, configPath, eventKind);
+                var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(configPath);
+                if (config)
+                    config.reloadLevel = ts.ConfigFileProgramReloadLevel.Full;
+                resolutionCache.removeResolutionsFromProjectReferenceRedirects(configPath);
+                scheduleProgramUpdate();
+            }, ts.PollingInterval.High, ((_a = commandLine.parsedCommandLine) === null || _a === void 0 ? void 0 : _a.watchOptions) || watchOptions, ts.WatchType.ConfigFileOfReferencedProject));
+            if ((_b = commandLine.parsedCommandLine) === null || _b === void 0 ? void 0 : _b.wildcardDirectories) {
+                ts.updateWatchingWildcardDirectories(commandLine.watchedDirectories || (commandLine.watchedDirectories = new ts.Map()), new ts.Map(ts.getEntries((_c = commandLine.parsedCommandLine) === null || _c === void 0 ? void 0 : _c.wildcardDirectories)), function (directory, flags) {
+                    var _a;
+                    return watchDirectory(directory, function (fileOrDirectory) {
+                        var fileOrDirectoryPath = toPath(fileOrDirectory);
+                        if (cachedDirectoryStructureHost) {
+                            cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
+                        }
+                        nextSourceFileVersion(fileOrDirectoryPath);
+                        var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(configPath);
+                        if (!(config === null || config === void 0 ? void 0 : config.parsedCommandLine))
+                            return;
+                        if (ts.isIgnoredFileFromWildCardWatching({
+                            watchedDirPath: toPath(directory),
+                            fileOrDirectory: fileOrDirectory,
+                            fileOrDirectoryPath: fileOrDirectoryPath,
+                            configFileName: configFileName,
+                            options: config.parsedCommandLine.options,
+                            program: config.parsedCommandLine.fileNames,
+                            currentDirectory: currentDirectory,
+                            useCaseSensitiveFileNames: useCaseSensitiveFileNames,
+                            writeLog: writeLog,
+                            toPath: toPath,
+                        }))
+                            return;
+                        if (config.reloadLevel !== ts.ConfigFileProgramReloadLevel.Full) {
+                            config.reloadLevel = ts.ConfigFileProgramReloadLevel.Partial;
+                            scheduleProgramUpdate();
+                        }
+                    }, flags, ((_a = commandLine.parsedCommandLine) === null || _a === void 0 ? void 0 : _a.watchOptions) || watchOptions, ts.WatchType.WildcardDirectoryOfReferencedProject);
+                });
+            }
+            else if (commandLine.watchedDirectories) {
+                ts.clearMap(commandLine.watchedDirectories, ts.closeFileWatcherOf);
+                commandLine.watchedDirectories = undefined;
+            }
+            updateExtendedConfigFilesWatches(configPath, (_d = commandLine.parsedCommandLine) === null || _d === void 0 ? void 0 : _d.options, ((_e = commandLine.parsedCommandLine) === null || _e === void 0 ? void 0 : _e.watchOptions) || watchOptions, ts.WatchType.ExtendedConfigOfReferencedProject);
         }
     }
     ts.createWatchProgram = createWatchProgram;
@@ -93057,8 +99988,8 @@ var ts;
     ts.getBuildOrderFromAnyBuildOrder = getBuildOrderFromAnyBuildOrder;
     function createBuilderStatusReporter(system, pretty) {
         return function (diagnostic) {
-            var output = pretty ? "[" + ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey) + "] " : ts.getLocaleTimeString(system) + " - ";
-            output += "" + ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine) + (system.newLine + system.newLine);
+            var output = pretty ? "[".concat(ts.formatColorAndReset(ts.getLocaleTimeString(system), ts.ForegroundColorEscapeSequences.Grey), "] ") : "".concat(ts.getLocaleTimeString(system), " - ");
+            output += "".concat(ts.flattenDiagnosticMessageText(diagnostic.messageText, system.newLine)).concat(system.newLine + system.newLine);
             system.write(output);
         };
     }
@@ -93116,10 +100047,18 @@ var ts;
         compilerHost.resolveModuleNames = ts.maybeBind(host, host.resolveModuleNames);
         compilerHost.resolveTypeReferenceDirectives = ts.maybeBind(host, host.resolveTypeReferenceDirectives);
         var moduleResolutionCache = !compilerHost.resolveModuleNames ? ts.createModuleResolutionCache(currentDirectory, getCanonicalFileName) : undefined;
+        var typeReferenceDirectiveResolutionCache = !compilerHost.resolveTypeReferenceDirectives ? ts.createTypeReferenceDirectiveResolutionCache(currentDirectory, getCanonicalFileName, undefined, moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.getPackageJsonInfoCache()) : undefined;
         if (!compilerHost.resolveModuleNames) {
-            var loader_3 = function (moduleName, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference).resolvedModule; };
-            compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference) {
-                return ts.loadWithLocalCache(ts.Debug.checkEachDefined(moduleNames), containingFile, redirectedReference, loader_3);
+            var loader_3 = function (moduleName, resolverMode, containingFile, redirectedReference) { return ts.resolveModuleName(moduleName, containingFile, state.projectCompilerOptions, compilerHost, moduleResolutionCache, redirectedReference, resolverMode).resolvedModule; };
+            compilerHost.resolveModuleNames = function (moduleNames, containingFile, _reusedNames, redirectedReference, _options, containingSourceFile) {
+                return ts.loadWithModeAwareCache(ts.Debug.checkEachDefined(moduleNames), ts.Debug.checkDefined(containingSourceFile), containingFile, redirectedReference, loader_3);
+            };
+            compilerHost.getModuleResolutionCache = function () { return moduleResolutionCache; };
+        }
+        if (!compilerHost.resolveTypeReferenceDirectives) {
+            var loader_4 = function (moduleName, containingFile, redirectedReference) { return ts.resolveTypeReferenceDirective(moduleName, containingFile, state.projectCompilerOptions, compilerHost, redirectedReference, state.typeReferenceDirectiveResolutionCache).resolvedTypeReferenceDirective; };
+            compilerHost.resolveTypeReferenceDirectives = function (typeReferenceDirectiveNames, containingFile, redirectedReference) {
+                return ts.loadWithLocalCache(ts.Debug.checkEachDefined(typeReferenceDirectiveNames), containingFile, redirectedReference, loader_4);
             };
         }
         var _a = ts.createWatchFactory(hostWithWatch, options), watchFile = _a.watchFile, watchDirectory = _a.watchDirectory, writeLog = _a.writeLog;
@@ -93145,6 +100084,7 @@ var ts;
             projectErrorsReported: new ts.Map(),
             compilerHost: compilerHost,
             moduleResolutionCache: moduleResolutionCache,
+            typeReferenceDirectiveResolutionCache: typeReferenceDirectiveResolutionCache,
             buildOrder: undefined,
             readFileWithCache: function (f) { return host.readFile(f); },
             projectCompilerOptions: baseCompilerOptions,
@@ -93158,6 +100098,8 @@ var ts;
             allWatchedInputFiles: new ts.Map(),
             allWatchedConfigFiles: new ts.Map(),
             allWatchedExtendedConfigFiles: new ts.Map(),
+            allWatchedPackageJsonFiles: new ts.Map(),
+            lastCachedPackageJsonLookups: new ts.Map(),
             timerToBuildInvalidatedProject: undefined,
             reportFileChangeDetected: false,
             watchFile: watchFile,
@@ -93181,6 +100123,10 @@ var ts;
     function isParsedCommandLine(entry) {
         return !!entry.options;
     }
+    function getCachedParsedConfigFile(state, configFilePath) {
+        var value = state.configFileCache.get(configFilePath);
+        return value && isParsedCommandLine(value) ? value : undefined;
+    }
     function parseConfigFile(state, configFileName, configFilePath) {
         var configFileCache = state.configFileCache;
         var value = configFileCache.get(configFilePath);
@@ -93271,6 +100217,7 @@ var ts;
             });
             ts.mutateMapSkippingNewValues(state.allWatchedWildcardDirectories, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcherOf); } });
             ts.mutateMapSkippingNewValues(state.allWatchedInputFiles, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcher); } });
+            ts.mutateMapSkippingNewValues(state.allWatchedPackageJsonFiles, currentProjects, { onDeleteValue: function (existingMap) { return existingMap.forEach(ts.closeFileWatcher); } });
         }
         return state.buildOrder = buildOrder;
     }
@@ -93303,7 +100250,7 @@ var ts;
             for (var _i = 0; _i < arguments.length; _i++) {
                 args[_i] = arguments[_i];
             }
-            return originalGetSourceFile.call.apply(originalGetSourceFile, __spreadArray([compilerHost], args));
+            return originalGetSourceFile.call.apply(originalGetSourceFile, __spreadArray([compilerHost], args, false));
         }), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile, getSourceFileWithCache = _a.getSourceFileWithCache, readFileWithCache = _a.readFileWithCache;
         state.readFileWithCache = readFileWithCache;
         compilerHost.getSourceFile = getSourceFileWithCache;
@@ -93320,7 +100267,7 @@ var ts;
     function disableCache(state) {
         if (!state.cache)
             return;
-        var cache = state.cache, host = state.host, compilerHost = state.compilerHost, extendedConfigCache = state.extendedConfigCache, moduleResolutionCache = state.moduleResolutionCache;
+        var cache = state.cache, host = state.host, compilerHost = state.compilerHost, extendedConfigCache = state.extendedConfigCache, moduleResolutionCache = state.moduleResolutionCache, typeReferenceDirectiveResolutionCache = state.typeReferenceDirectiveResolutionCache;
         host.readFile = cache.originalReadFile;
         host.fileExists = cache.originalFileExists;
         host.directoryExists = cache.originalDirectoryExists;
@@ -93329,10 +100276,8 @@ var ts;
         compilerHost.getSourceFile = cache.originalGetSourceFile;
         state.readFileWithCache = cache.originalReadFileWithCache;
         extendedConfigCache.clear();
-        if (moduleResolutionCache) {
-            moduleResolutionCache.directoryToModuleNameMap.clear();
-            moduleResolutionCache.moduleNameToDirectoryMap.clear();
-        }
+        moduleResolutionCache === null || moduleResolutionCache === void 0 ? void 0 : moduleResolutionCache.clear();
+        typeReferenceDirectiveResolutionCache === null || typeReferenceDirectiveResolutionCache === void 0 ? void 0 : typeReferenceDirectiveResolutionCache.clear();
         state.cache = undefined;
     }
     function clearProjectStatus(state, resolved) {
@@ -93353,9 +100298,8 @@ var ts;
         if (!state.allProjectBuildPending)
             return;
         state.allProjectBuildPending = false;
-        if (state.options.watch) {
+        if (state.options.watch)
             reportWatchStatus(state, ts.Diagnostics.Starting_compilation_in_watch_mode);
-        }
         enableCache(state);
         var buildOrder = getBuildOrderFromAnyBuildOrder(getBuildOrder(state));
         buildOrder.forEach(function (configFileName) {
@@ -93460,7 +100404,7 @@ var ts;
                 },
                 emit: function (targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
                     if (targetSourceFile || emitOnlyDtsFiles) {
-                        return withProgramOrUndefined(function (program) { return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers); });
+                        return withProgramOrUndefined(function (program) { var _a, _b; return program.emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project))); });
                     }
                     executeSteps(BuildStep.SemanticDiagnostics, cancellationToken);
                     if (step === BuildStep.EmitBuildInfo) {
@@ -93498,6 +100442,7 @@ var ts;
             return withProgramOrUndefined(action) || ts.emptyArray;
         }
         function createProgram() {
+            var _a, _b;
             ts.Debug.assert(program === undefined);
             if (state.options.dry) {
                 reportStatus(state, ts.Diagnostics.A_non_dry_build_would_build_project_0, project);
@@ -93515,9 +100460,14 @@ var ts;
             }
             var host = state.host, compilerHost = state.compilerHost;
             state.projectCompilerOptions = config.options;
-            updateModuleResolutionCache(state, project, config);
+            (_a = state.moduleResolutionCache) === null || _a === void 0 ? void 0 : _a.update(config.options);
+            (_b = state.typeReferenceDirectiveResolutionCache) === null || _b === void 0 ? void 0 : _b.update(config.options);
             program = host.createProgram(config.fileNames, config.options, compilerHost, getOldProgram(state, projectPath, config), ts.getConfigFileParsingDiagnostics(config), config.projectReferences);
             if (state.watch) {
+                state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && ts.map(state.moduleResolutionCache.getPackageJsonInfoCache().entries(), function (_a) {
+                    var path = _a[0], data = _a[1];
+                    return [state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data];
+                }));
                 state.builderPrograms.set(projectPath, program);
             }
             step++;
@@ -93533,20 +100483,21 @@ var ts;
         }
         function getSyntaxDiagnostics(cancellationToken) {
             ts.Debug.assertIsDefined(program);
-            handleDiagnostics(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], program.getConfigFileParsingDiagnostics()), program.getOptionsDiagnostics(cancellationToken)), program.getGlobalDiagnostics(cancellationToken)), program.getSyntacticDiagnostics(undefined, cancellationToken)), BuildResultFlags.SyntaxErrors, "Syntactic");
+            handleDiagnostics(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], program.getConfigFileParsingDiagnostics(), true), program.getOptionsDiagnostics(cancellationToken), true), program.getGlobalDiagnostics(cancellationToken), true), program.getSyntacticDiagnostics(undefined, cancellationToken), true), BuildResultFlags.SyntaxErrors, "Syntactic");
         }
         function getSemanticDiagnostics(cancellationToken) {
             handleDiagnostics(ts.Debug.checkDefined(program).getSemanticDiagnostics(undefined, cancellationToken), BuildResultFlags.TypeErrors, "Semantic");
         }
         function emit(writeFileCallback, cancellationToken, customTransformers) {
             var _a;
+            var _b, _c;
             ts.Debug.assertIsDefined(program);
             ts.Debug.assert(step === BuildStep.Emit);
             program.backupState();
             var declDiagnostics;
             var reportDeclarationDiagnostics = function (d) { return (declDiagnostics || (declDiagnostics = [])).push(d); };
             var outputFiles = [];
-            var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers).emitResult;
+            var emitResult = ts.emitFilesAndReportErrors(program, reportDeclarationDiagnostics, undefined, undefined, function (name, text, writeByteOrderMark) { return outputFiles.push({ name: name, text: text, writeByteOrderMark: writeByteOrderMark }); }, cancellationToken, false, customTransformers || ((_c = (_b = state.host).getCustomTransformers) === null || _c === void 0 ? void 0 : _c.call(_b, project))).emitResult;
             if (declDiagnostics) {
                 program.restoreState();
                 (_a = buildErrors(state, projectPath, program, config, declDiagnostics, BuildResultFlags.DeclarationEmitErrors, "Declaration file"), buildResult = _a.buildResult, step = _a.step);
@@ -93588,7 +100539,7 @@ var ts;
             var emitResult = program.emitBuildInfo(writeFileCallback, cancellationToken);
             if (emitResult.diagnostics.length) {
                 reportErrors(state, emitResult.diagnostics);
-                state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath)), emitResult.diagnostics));
+                state.diagnostics.set(projectPath, __spreadArray(__spreadArray([], state.diagnostics.get(projectPath), true), emitResult.diagnostics, true));
                 buildResult = BuildResultFlags.EmitErrors & buildResult;
             }
             if (emitResult.emittedFiles && state.write) {
@@ -93623,6 +100574,7 @@ var ts;
             return emitDiagnostics;
         }
         function emitBundle(writeFileCallback, customTransformers) {
+            var _a, _b;
             ts.Debug.assert(kind === InvalidatedProjectKind.UpdateBundle);
             if (state.options.dry) {
                 reportStatus(state, ts.Diagnostics.A_non_dry_build_would_update_output_of_project_0, project);
@@ -93637,7 +100589,7 @@ var ts;
             var outputFiles = ts.emitUsingBuildInfo(config, compilerHost, function (ref) {
                 var refName = resolveProjectName(state, ref.path);
                 return parseConfigFile(state, refName, toResolvedConfigFilePath(state, refName));
-            }, customTransformers);
+            }, customTransformers || ((_b = (_a = state.host).getCustomTransformers) === null || _b === void 0 ? void 0 : _b.call(_a, project)));
             if (ts.isString(outputFiles)) {
                 reportStatus(state, ts.Diagnostics.Cannot_update_output_of_project_0_because_there_was_error_reading_file_1, project, relName(state, outputFiles));
                 step = BuildStep.BuildInvalidatedProjectOfBundle;
@@ -93677,7 +100629,7 @@ var ts;
                         emitBundle(writeFile, customTransformers);
                         break;
                     case BuildStep.BuildInvalidatedProjectOfBundle:
-                        ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken);
+                        ts.Debug.checkDefined(invalidatedProjectOfBundle).done(cancellationToken, writeFile, customTransformers);
                         step = BuildStep.Done;
                         break;
                     case BuildStep.QueueReferencingProjects:
@@ -93732,11 +100684,13 @@ var ts;
                 watchExtendedConfigFiles(state, projectPath, config);
                 watchWildCardDirectories(state, project, projectPath, config);
                 watchInputFiles(state, project, projectPath, config);
+                watchPackageJsonFiles(state, project, projectPath, config);
             }
             else if (reloadLevel === ts.ConfigFileProgramReloadLevel.Partial) {
                 config.fileNames = ts.getFileNamesFromConfigSpecs(config.options.configFile.configFileSpecs, ts.getDirectoryPath(project), config.options, state.parseConfigFileHost);
                 ts.updateErrorForNoInputFiles(config.fileNames, project, config.options.configFile.configFileSpecs, config.errors, ts.canJsonReportNoInputFiles(config.raw));
                 watchInputFiles(state, project, projectPath, config);
+                watchPackageJsonFiles(state, project, projectPath, config);
             }
             var status = getUpToDateStatus(state, config, projectPath);
             verboseReportProjectStatus(state, project, status);
@@ -93778,7 +100732,7 @@ var ts;
     function listEmittedFile(_a, proj, file) {
         var write = _a.write;
         if (write && proj.options.listEmittedFiles) {
-            write("TSFILE: " + file);
+            write("TSFILE: ".concat(file));
         }
     }
     function getOldProgram(_a, proj, parsed) {
@@ -93807,36 +100761,14 @@ var ts;
     function buildErrors(state, resolvedPath, program, config, diagnostics, buildResult, errorType) {
         var canEmitBuildInfo = !(buildResult & BuildResultFlags.SyntaxErrors) && program && !ts.outFile(program.getCompilerOptions());
         reportAndStoreErrors(state, resolvedPath, diagnostics);
-        state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: errorType + " errors" });
+        state.projectStatus.set(resolvedPath, { type: ts.UpToDateStatusType.Unbuildable, reason: "".concat(errorType, " errors") });
         if (canEmitBuildInfo)
             return { buildResult: buildResult, step: BuildStep.EmitBuildInfo };
         afterProgramDone(state, program, config);
         return { buildResult: buildResult, step: BuildStep.QueueReferencingProjects };
     }
-    function updateModuleResolutionCache(state, proj, config) {
-        if (!state.moduleResolutionCache)
-            return;
-        var moduleResolutionCache = state.moduleResolutionCache;
-        var projPath = toPath(state, proj);
-        if (moduleResolutionCache.directoryToModuleNameMap.redirectsMap.size === 0) {
-            ts.Debug.assert(moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.size === 0);
-            moduleResolutionCache.directoryToModuleNameMap.redirectsMap.set(projPath, moduleResolutionCache.directoryToModuleNameMap.ownMap);
-            moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.set(projPath, moduleResolutionCache.moduleNameToDirectoryMap.ownMap);
-        }
-        else {
-            ts.Debug.assert(moduleResolutionCache.moduleNameToDirectoryMap.redirectsMap.size > 0);
-            var ref = {
-                sourceFile: config.options.configFile,
-                commandLine: config
-            };
-            moduleResolutionCache.directoryToModuleNameMap.setOwnMap(moduleResolutionCache.directoryToModuleNameMap.getOrCreateMapOfCacheRedirects(ref));
-            moduleResolutionCache.moduleNameToDirectoryMap.setOwnMap(moduleResolutionCache.moduleNameToDirectoryMap.getOrCreateMapOfCacheRedirects(ref));
-        }
-        moduleResolutionCache.directoryToModuleNameMap.setOwnOptions(config.options);
-        moduleResolutionCache.moduleNameToDirectoryMap.setOwnOptions(config.options);
-    }
     function checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName) {
-        var tsconfigTime = state.host.getModifiedTime(configFile) || ts.missingFileModifiedTime;
+        var tsconfigTime = ts.getModifiedTime(state.host, configFile);
         if (oldestOutputFileTime < tsconfigTime) {
             return {
                 type: ts.UpToDateStatusType.OutOfDateWithSelf,
@@ -93846,6 +100778,7 @@ var ts;
         }
     }
     function getUpToDateStatusWorker(state, project, resolvedPath) {
+        var force = !!state.options.force;
         var newestInputFileName = undefined;
         var newestInputFileTime = minimumDate;
         var host = state.host;
@@ -93854,13 +100787,15 @@ var ts;
             if (!host.fileExists(inputFile)) {
                 return {
                     type: ts.UpToDateStatusType.Unbuildable,
-                    reason: inputFile + " does not exist"
+                    reason: "".concat(inputFile, " does not exist")
                 };
             }
-            var inputTime = host.getModifiedTime(inputFile) || ts.missingFileModifiedTime;
-            if (inputTime > newestInputFileTime) {
-                newestInputFileName = inputFile;
-                newestInputFileTime = inputTime;
+            if (!force) {
+                var inputTime = ts.getModifiedTime(host, inputFile);
+                if (inputTime > newestInputFileTime) {
+                    newestInputFileName = inputFile;
+                    newestInputFileTime = inputTime;
+                }
             }
         }
         if (!project.fileNames.length && !ts.canJsonReportNoInputFiles(project.raw)) {
@@ -93876,28 +100811,30 @@ var ts;
         var missingOutputFileName;
         var newestDeclarationFileContentChangedTime = minimumDate;
         var isOutOfDateWithInputs = false;
-        for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
-            var output = outputs_1[_b];
-            if (!host.fileExists(output)) {
-                missingOutputFileName = output;
-                break;
-            }
-            var outputTime = host.getModifiedTime(output) || ts.missingFileModifiedTime;
-            if (outputTime < oldestOutputFileTime) {
-                oldestOutputFileTime = outputTime;
-                oldestOutputFileName = output;
-            }
-            if (outputTime < newestInputFileTime) {
-                isOutOfDateWithInputs = true;
-                break;
-            }
-            if (outputTime > newestOutputFileTime) {
-                newestOutputFileTime = outputTime;
-                newestOutputFileName = output;
-            }
-            if (isDeclarationFile(output)) {
-                var outputModifiedTime = host.getModifiedTime(output) || ts.missingFileModifiedTime;
-                newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
+        if (!force) {
+            for (var _b = 0, outputs_1 = outputs; _b < outputs_1.length; _b++) {
+                var output = outputs_1[_b];
+                if (!host.fileExists(output)) {
+                    missingOutputFileName = output;
+                    break;
+                }
+                var outputTime = ts.getModifiedTime(host, output);
+                if (outputTime < oldestOutputFileTime) {
+                    oldestOutputFileTime = outputTime;
+                    oldestOutputFileName = output;
+                }
+                if (outputTime < newestInputFileTime) {
+                    isOutOfDateWithInputs = true;
+                    break;
+                }
+                if (outputTime > newestOutputFileTime) {
+                    newestOutputFileTime = outputTime;
+                    newestOutputFileName = output;
+                }
+                if (isDeclarationFile(output)) {
+                    var outputModifiedTime = ts.getModifiedTime(host, output);
+                    newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
+                }
             }
         }
         var pseudoUpToDate = false;
@@ -93929,7 +100866,7 @@ var ts;
                         upstreamProjectName: ref.path
                     };
                 }
-                if (!missingOutputFileName) {
+                if (!force && !missingOutputFileName) {
                     if (refStatus.newestInputFileTime && refStatus.newestInputFileTime <= oldestOutputFileTime) {
                         continue;
                     }
@@ -93967,8 +100904,14 @@ var ts;
             var extendedConfigStatus = ts.forEach(project.options.configFile.extendedSourceFiles || ts.emptyArray, function (configFile) { return checkConfigFileUpToDateStatus(state, configFile, oldestOutputFileTime, oldestOutputFileName); });
             if (extendedConfigStatus)
                 return extendedConfigStatus;
+            var dependentPackageFileStatus = ts.forEach(state.lastCachedPackageJsonLookups.get(resolvedPath) || ts.emptyArray, function (_a) {
+                var path = _a[0];
+                return checkConfigFileUpToDateStatus(state, path, oldestOutputFileTime, oldestOutputFileName);
+            });
+            if (dependentPackageFileStatus)
+                return dependentPackageFileStatus;
         }
-        if (!state.buildInfoChecked.has(resolvedPath)) {
+        if (!force && !state.buildInfoChecked.has(resolvedPath)) {
             state.buildInfoChecked.set(resolvedPath, true);
             var buildInfoPath = ts.getTsBuildInfoEmitOutputFilePath(project.options);
             if (buildInfoPath) {
@@ -94012,6 +100955,8 @@ var ts;
         return actual;
     }
     function updateOutputTimestampsWorker(state, proj, priorNewestUpdateTime, verboseMessage, skipOutputs) {
+        if (proj.options.noEmit)
+            return priorNewestUpdateTime;
         var host = state.host;
         var outputs = ts.getAllProjectOutputs(proj, !host.useCaseSensitiveFileNames());
         if (!skipOutputs || outputs.length !== skipOutputs.size) {
@@ -94027,7 +100972,7 @@ var ts;
                     reportStatus(state, verboseMessage, proj.options.configFilePath);
                 }
                 if (isDeclarationFile(file)) {
-                    priorNewestUpdateTime = newer(priorNewestUpdateTime, host.getModifiedTime(file) || ts.missingFileModifiedTime);
+                    priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
                 }
                 host.setModifiedTime(file, now);
             }
@@ -94102,7 +101047,7 @@ var ts;
             }
         }
     }
-    function build(state, project, cancellationToken, onlyReferences) {
+    function build(state, project, cancellationToken, writeFile, getCustomTransformers, onlyReferences) {
         var buildOrder = getBuildOrderFor(state, project, onlyReferences);
         if (!buildOrder)
             return ts.ExitStatus.InvalidProject_OutputsSkipped;
@@ -94114,7 +101059,7 @@ var ts;
             if (!invalidatedProject)
                 break;
             reportQueue = false;
-            invalidatedProject.done(cancellationToken);
+            invalidatedProject.done(cancellationToken, writeFile, getCustomTransformers === null || getCustomTransformers === void 0 ? void 0 : getCustomTransformers(invalidatedProject.project));
             if (!state.diagnostics.has(invalidatedProject.projectPath))
                 successfulProjects++;
         }
@@ -94148,8 +101093,13 @@ var ts;
                 continue;
             }
             var outputs = ts.getAllProjectOutputs(parsed, !host.useCaseSensitiveFileNames());
+            if (!outputs.length)
+                continue;
+            var inputFileNames = new ts.Set(parsed.fileNames.map(function (f) { return toPath(state, f); }));
             for (var _a = 0, outputs_3 = outputs; _a < outputs_3.length; _a++) {
                 var output = outputs_3[_a];
+                if (inputFileNames.has(toPath(state, output)))
+                    continue;
                 if (host.fileExists(output)) {
                     if (filesToDelete) {
                         filesToDelete.push(output);
@@ -94162,7 +101112,7 @@ var ts;
             }
         }
         if (filesToDelete) {
-            reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * " + f; }).join(""));
+            reportStatus(state, ts.Diagnostics.A_non_dry_build_would_delete_the_following_files_Colon_0, filesToDelete.map(function (f) { return "\r\n * ".concat(f); }).join(""));
         }
         return ts.ExitStatus.Success;
     }
@@ -94223,7 +101173,7 @@ var ts;
         }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.ConfigFile, resolved));
     }
     function watchExtendedConfigFiles(state, resolvedPath, parsed) {
-        ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
+        ts.updateSharedExtendedConfigFileWatcher(resolvedPath, parsed === null || parsed === void 0 ? void 0 : parsed.options, state.allWatchedExtendedConfigFiles, function (extendedConfigFileName, extendedConfigFilePath) { return state.watchFile(extendedConfigFileName, function () {
             var _a;
             return (_a = state.allWatchedExtendedConfigFiles.get(extendedConfigFilePath)) === null || _a === void 0 ? void 0 : _a.projects.forEach(function (projectConfigFilePath) {
                 return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts.ConfigFileProgramReloadLevel.Full);
@@ -94234,6 +101184,7 @@ var ts;
         if (!state.watch)
             return;
         ts.updateWatchingWildcardDirectories(getOrCreateValueMapFromConfigFileMap(state.allWatchedWildcardDirectories, resolvedPath), new ts.Map(ts.getEntries(parsed.wildcardDirectories)), function (dir, flags) { return state.watchDirectory(dir, function (fileOrDirectory) {
+            var _a;
             if (ts.isIgnoredFileFromWildCardWatching({
                 watchedDirPath: toPath(state, dir),
                 fileOrDirectory: fileOrDirectory,
@@ -94241,9 +101192,10 @@ var ts;
                 configFileName: resolved,
                 currentDirectory: state.currentDirectory,
                 options: parsed.options,
-                program: state.builderPrograms.get(resolvedPath),
+                program: state.builderPrograms.get(resolvedPath) || ((_a = getCachedParsedConfigFile(state, resolvedPath)) === null || _a === void 0 ? void 0 : _a.fileNames),
                 useCaseSensitiveFileNames: state.parseConfigFileHost.useCaseSensitiveFileNames,
-                writeLog: function (s) { return state.writeLog(s); }
+                writeLog: function (s) { return state.writeLog(s); },
+                toPath: function (fileName) { return toPath(state, fileName); }
             }))
                 return;
             invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Partial);
@@ -94257,6 +101209,14 @@ var ts;
             onDeleteValue: ts.closeFileWatcher,
         });
     }
+    function watchPackageJsonFiles(state, resolved, resolvedPath, parsed) {
+        if (!state.watch || !state.lastCachedPackageJsonLookups)
+            return;
+        ts.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedPackageJsonFiles, resolvedPath), new ts.Map(state.lastCachedPackageJsonLookups.get(resolvedPath)), {
+            createNewValue: function (path, _input) { return state.watchFile(path, function () { return invalidateProjectAndScheduleBuilds(state, resolvedPath, ts.ConfigFileProgramReloadLevel.Full); }, ts.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts.WatchType.PackageJson, resolved); },
+            onDeleteValue: ts.closeFileWatcher,
+        });
+    }
     function startWatching(state, buildOrder) {
         if (!state.watchAllProjectsPending)
             return;
@@ -94270,24 +101230,23 @@ var ts;
             if (cfg) {
                 watchWildCardDirectories(state, resolved, resolvedPath, cfg);
                 watchInputFiles(state, resolved, resolvedPath, cfg);
+                watchPackageJsonFiles(state, resolved, resolvedPath, cfg);
             }
         }
     }
     function stopWatching(state) {
         ts.clearMap(state.allWatchedConfigFiles, ts.closeFileWatcher);
-        ts.clearMap(state.allWatchedExtendedConfigFiles, function (watcher) {
-            watcher.projects.clear();
-            watcher.close();
-        });
+        ts.clearMap(state.allWatchedExtendedConfigFiles, ts.closeFileWatcherOf);
         ts.clearMap(state.allWatchedWildcardDirectories, function (watchedWildcardDirectories) { return ts.clearMap(watchedWildcardDirectories, ts.closeFileWatcherOf); });
         ts.clearMap(state.allWatchedInputFiles, function (watchedWildcardDirectories) { return ts.clearMap(watchedWildcardDirectories, ts.closeFileWatcher); });
+        ts.clearMap(state.allWatchedPackageJsonFiles, function (watchedPacageJsonFiles) { return ts.clearMap(watchedPacageJsonFiles, ts.closeFileWatcher); });
     }
     function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) {
         var state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions);
         return {
-            build: function (project, cancellationToken) { return build(state, project, cancellationToken); },
+            build: function (project, cancellationToken, writeFile, getCustomTransformers) { return build(state, project, cancellationToken, writeFile, getCustomTransformers); },
             clean: function (project) { return clean(state, project); },
-            buildReferences: function (project, cancellationToken) { return build(state, project, cancellationToken, true); },
+            buildReferences: function (project, cancellationToken, writeFile, getCustomTransformers) { return build(state, project, cancellationToken, writeFile, getCustomTransformers, true); },
             cleanReferences: function (project) { return clean(state, project, true); },
             getNextInvalidatedProject: function (cancellationToken) {
                 setupInitialBuild(state, cancellationToken);
@@ -94313,7 +101272,7 @@ var ts;
         for (var _i = 2; _i < arguments.length; _i++) {
             args[_i - 2] = arguments[_i];
         }
-        state.host.reportSolutionBuilderStatus(ts.createCompilerDiagnostic.apply(void 0, __spreadArray([message], args)));
+        state.host.reportSolutionBuilderStatus(ts.createCompilerDiagnostic.apply(void 0, __spreadArray([message], args, false)));
     }
     function reportWatchStatus(state, message) {
         var _a, _b;
@@ -94321,7 +101280,7 @@ var ts;
         for (var _i = 2; _i < arguments.length; _i++) {
             args[_i - 2] = arguments[_i];
         }
-        (_b = (_a = state.hostWithWatch).onWatchStatusChange) === null || _b === void 0 ? void 0 : _b.call(_a, ts.createCompilerDiagnostic.apply(void 0, __spreadArray([message], args)), state.host.getNewLine(), state.baseCompilerOptions);
+        (_b = (_a = state.hostWithWatch).onWatchStatusChange) === null || _b === void 0 ? void 0 : _b.call(_a, ts.createCompilerDiagnostic.apply(void 0, __spreadArray([message], args, false)), state.host.getNewLine(), state.baseCompilerOptions);
     }
     function reportErrors(_a, errors) {
         var host = _a.host;
@@ -94373,6 +101332,9 @@ var ts;
         }
     }
     function reportUpToDateStatus(state, configFileName, status) {
+        if (state.options.force && (status.type === ts.UpToDateStatusType.UpToDate || status.type === ts.UpToDateStatusType.UpToDateWithUpstreamTypes)) {
+            return reportStatus(state, ts.Diagnostics.Project_0_is_being_forcibly_rebuilt, relName(state, configFileName));
+        }
         switch (status.type) {
             case ts.UpToDateStatusType.OutOfDateWithSelf:
                 return reportStatus(state, ts.Diagnostics.Project_0_is_out_of_date_because_oldest_output_1_is_older_than_newest_input_2, relName(state, configFileName), relName(state, status.outOfDateOutputFileName), relName(state, status.newerInputFileName));
@@ -94432,7 +101394,7 @@ var ts;
         return counts;
     }
     function getCountsMap() {
-        var counts = ts.createMap();
+        var counts = new ts.Map();
         counts.set("Library", 0);
         counts.set("Definitions", 0);
         counts.set("TypeScript", 0);
@@ -94449,10 +101411,10 @@ var ts;
             return "Definitions";
         }
         var path = file.path;
-        if (ts.fileExtensionIsOneOf(path, ts.supportedTSExtensions)) {
+        if (ts.fileExtensionIsOneOf(path, ts.supportedTSExtensionsFlat)) {
             return "TypeScript";
         }
-        else if (ts.fileExtensionIsOneOf(path, ts.supportedJSExtensions)) {
+        else if (ts.fileExtensionIsOneOf(path, ts.supportedJSExtensionsFlat)) {
             return "JavaScript";
         }
         else if (ts.fileExtensionIs(path, ".json")) {
@@ -94468,7 +101430,7 @@ var ts;
             existing;
     }
     function defaultIsPretty(sys) {
-        return !!sys.writeOutputIsTTY && sys.writeOutputIsTTY();
+        return !!sys.writeOutputIsTTY && sys.writeOutputIsTTY() && !sys.getEnvironmentVariable("NO_COLOR");
     }
     function shouldBePretty(sys, options) {
         if (!options || typeof options.pretty === "undefined") {
@@ -94484,85 +101446,297 @@ var ts;
     function printVersion(sys) {
         sys.write(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version) + sys.newLine);
     }
-    function printHelp(sys, optionsList, syntaxPrefix) {
-        if (syntaxPrefix === void 0) { syntaxPrefix = ""; }
-        var output = [];
-        var syntaxLength = ts.getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, "").length;
-        var examplesLength = ts.getDiagnosticText(ts.Diagnostics.Examples_Colon_0, "").length;
-        var marginLength = Math.max(syntaxLength, examplesLength);
-        var syntax = makePadding(marginLength - syntaxLength);
-        syntax += "tsc " + syntaxPrefix + "[" + ts.getDiagnosticText(ts.Diagnostics.options) + "] [" + ts.getDiagnosticText(ts.Diagnostics.file) + "...]";
-        output.push(ts.getDiagnosticText(ts.Diagnostics.Syntax_Colon_0, syntax));
-        output.push(sys.newLine + sys.newLine);
-        var padding = makePadding(marginLength);
-        output.push(ts.getDiagnosticText(ts.Diagnostics.Examples_Colon_0, makePadding(marginLength - examplesLength) + "tsc hello.ts") + sys.newLine);
-        output.push(padding + "tsc --outFile file.js file.ts" + sys.newLine);
-        output.push(padding + "tsc @args.txt" + sys.newLine);
-        output.push(padding + "tsc --build tsconfig.json" + sys.newLine);
-        output.push(sys.newLine);
-        output.push(ts.getDiagnosticText(ts.Diagnostics.Options_Colon) + sys.newLine);
-        marginLength = 0;
-        var usageColumn = [];
-        var descriptionColumn = [];
-        var optionsDescriptionMap = new ts.Map();
-        for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) {
-            var option = optionsList_1[_i];
-            if (!option.description) {
-                continue;
+    function createColors(sys) {
+        var showColors = defaultIsPretty(sys);
+        if (!showColors) {
+            return {
+                bold: function (str) { return str; },
+                blue: function (str) { return str; },
+                blueBackground: function (str) { return str; },
+                brightWhite: function (str) { return str; }
+            };
+        }
+        function bold(str) {
+            return "\u001B[1m".concat(str, "\u001B[22m");
+        }
+        var isWindows = sys.getEnvironmentVariable("OS") && ts.stringContains(sys.getEnvironmentVariable("OS").toLowerCase(), "windows");
+        var isWindowsTerminal = sys.getEnvironmentVariable("WT_SESSION");
+        var isVSCode = sys.getEnvironmentVariable("TERM_PROGRAM") && sys.getEnvironmentVariable("TERM_PROGRAM") === "vscode";
+        function blue(str) {
+            if (isWindows && !isWindowsTerminal && !isVSCode) {
+                return brightWhite(str);
             }
-            var usageText_1 = " ";
-            if (option.shortName) {
-                usageText_1 += "-" + option.shortName;
-                usageText_1 += getParamType(option);
-                usageText_1 += ", ";
-            }
-            usageText_1 += "--" + option.name;
-            usageText_1 += getParamType(option);
-            usageColumn.push(usageText_1);
-            var description = void 0;
-            if (option.name === "lib") {
-                description = ts.getDiagnosticText(option.description);
-                var element = option.element;
-                var typeMap = element.type;
-                optionsDescriptionMap.set(description, ts.arrayFrom(typeMap.keys()).map(function (key) { return "'" + key + "'"; }));
+            return "\u001B[94m".concat(str, "\u001B[39m");
+        }
+        var supportsRicherColors = sys.getEnvironmentVariable("COLORTERM") === "truecolor" || sys.getEnvironmentVariable("TERM") === "xterm-256color";
+        function blueBackground(str) {
+            if (supportsRicherColors) {
+                return "\u001B[48;5;68m".concat(str, "\u001B[39;49m");
             }
             else {
+                return "\u001B[44m".concat(str, "\u001B[39;49m");
+            }
+        }
+        function brightWhite(str) {
+            return "\u001B[97m".concat(str, "\u001B[39m");
+        }
+        return {
+            bold: bold,
+            blue: blue,
+            brightWhite: brightWhite,
+            blueBackground: blueBackground
+        };
+    }
+    function getDisplayNameTextOfOption(option) {
+        return "--".concat(option.name).concat(option.shortName ? ", -".concat(option.shortName) : "");
+    }
+    function generateOptionOutput(sys, option, rightAlignOfLeft, leftAlignOfRight) {
+        var _a, _b;
+        var text = [];
+        var colors = createColors(sys);
+        var name = getDisplayNameTextOfOption(option);
+        var valueCandidates = getValueCandidate(option);
+        var defaultValueDescription = typeof option.defaultValueDescription === "object" ? ts.getDiagnosticText(option.defaultValueDescription) : option.defaultValueDescription;
+        var terminalWidth = (_b = (_a = sys.getWidthOfTerminal) === null || _a === void 0 ? void 0 : _a.call(sys)) !== null && _b !== void 0 ? _b : 0;
+        if (terminalWidth >= 80) {
+            var description = "";
+            if (option.description) {
                 description = ts.getDiagnosticText(option.description);
             }
-            descriptionColumn.push(description);
-            marginLength = Math.max(usageText_1.length, marginLength);
-        }
-        var usageText = " @<" + ts.getDiagnosticText(ts.Diagnostics.file) + ">";
-        usageColumn.push(usageText);
-        descriptionColumn.push(ts.getDiagnosticText(ts.Diagnostics.Insert_command_line_options_and_files_from_a_file));
-        marginLength = Math.max(usageText.length, marginLength);
-        for (var i = 0; i < usageColumn.length; i++) {
-            var usage = usageColumn[i];
-            var description = descriptionColumn[i];
-            var kindsList = optionsDescriptionMap.get(description);
-            output.push(usage + makePadding(marginLength - usage.length + 2) + description + sys.newLine);
-            if (kindsList) {
-                output.push(makePadding(marginLength + 4));
-                for (var _a = 0, kindsList_1 = kindsList; _a < kindsList_1.length; _a++) {
-                    var kind = kindsList_1[_a];
-                    output.push(kind + " ");
-                }
-                output.push(sys.newLine);
-            }
-        }
-        for (var _b = 0, output_1 = output; _b < output_1.length; _b++) {
-            var line = output_1[_b];
+            text.push.apply(text, __spreadArray(__spreadArray([], getPrettyOutput(name, description, rightAlignOfLeft, leftAlignOfRight, terminalWidth, true), false), [sys.newLine], false));
+            if (showAdditionalInfoOutput(valueCandidates, option)) {
+                if (valueCandidates) {
+                    text.push.apply(text, __spreadArray(__spreadArray([], getPrettyOutput(valueCandidates.valueType, valueCandidates.possibleValues, rightAlignOfLeft, leftAlignOfRight, terminalWidth, false), false), [sys.newLine], false));
+                }
+                if (defaultValueDescription) {
+                    text.push.apply(text, __spreadArray(__spreadArray([], getPrettyOutput(ts.getDiagnosticText(ts.Diagnostics.default_Colon), defaultValueDescription, rightAlignOfLeft, leftAlignOfRight, terminalWidth, false), false), [sys.newLine], false));
+                }
+            }
+            text.push(sys.newLine);
+        }
+        else {
+            text.push(colors.blue(name), sys.newLine);
+            if (option.description) {
+                var description = ts.getDiagnosticText(option.description);
+                text.push(description);
+            }
+            text.push(sys.newLine);
+            if (showAdditionalInfoOutput(valueCandidates, option)) {
+                if (valueCandidates) {
+                    text.push("".concat(valueCandidates.valueType, " ").concat(valueCandidates.possibleValues));
+                }
+                if (defaultValueDescription) {
+                    if (valueCandidates)
+                        text.push(sys.newLine);
+                    var diagType = ts.getDiagnosticText(ts.Diagnostics.default_Colon);
+                    text.push("".concat(diagType, " ").concat(defaultValueDescription));
+                }
+                text.push(sys.newLine);
+            }
+            text.push(sys.newLine);
+        }
+        return text;
+        function showAdditionalInfoOutput(valueCandidates, option) {
+            var ignoreValues = ["string"];
+            var ignoredDescriptions = [undefined, "false", "n/a"];
+            var defaultValueDescription = option.defaultValueDescription;
+            if (option.category === ts.Diagnostics.Command_line_Options)
+                return false;
+            if (ts.contains(ignoreValues, valueCandidates === null || valueCandidates === void 0 ? void 0 : valueCandidates.possibleValues) && ts.contains(ignoredDescriptions, defaultValueDescription)) {
+                return false;
+            }
+            return true;
+        }
+        function getPrettyOutput(left, right, rightAlignOfLeft, leftAlignOfRight, terminalWidth, colorLeft) {
+            var res = [];
+            var isFirstLine = true;
+            var remainRight = right;
+            var rightCharacterNumber = terminalWidth - leftAlignOfRight;
+            while (remainRight.length > 0) {
+                var curLeft = "";
+                if (isFirstLine) {
+                    curLeft = ts.padLeft(left, rightAlignOfLeft);
+                    curLeft = ts.padRight(curLeft, leftAlignOfRight);
+                    curLeft = colorLeft ? colors.blue(curLeft) : curLeft;
+                }
+                else {
+                    curLeft = ts.padLeft("", leftAlignOfRight);
+                }
+                var curRight = remainRight.substr(0, rightCharacterNumber);
+                remainRight = remainRight.slice(rightCharacterNumber);
+                res.push("".concat(curLeft).concat(curRight));
+                isFirstLine = false;
+            }
+            return res;
+        }
+        function getValueCandidate(option) {
+            if (option.type === "object") {
+                return undefined;
+            }
+            return {
+                valueType: getValueType(option),
+                possibleValues: getPossibleValues(option)
+            };
+            function getValueType(option) {
+                switch (option.type) {
+                    case "string":
+                    case "number":
+                    case "boolean":
+                        return ts.getDiagnosticText(ts.Diagnostics.type_Colon);
+                    case "list":
+                        return ts.getDiagnosticText(ts.Diagnostics.one_or_more_Colon);
+                    default:
+                        return ts.getDiagnosticText(ts.Diagnostics.one_of_Colon);
+                }
+            }
+            function getPossibleValues(option) {
+                var possibleValues;
+                switch (option.type) {
+                    case "string":
+                    case "number":
+                    case "boolean":
+                        possibleValues = option.type;
+                        break;
+                    case "list":
+                        possibleValues = getPossibleValues(option.element);
+                        break;
+                    case "object":
+                        possibleValues = "";
+                        break;
+                    default:
+                        var keys = ts.arrayFrom(option.type.keys());
+                        possibleValues = keys.join(", ");
+                }
+                return possibleValues;
+            }
+        }
+    }
+    function generateGroupOptionOutput(sys, optionsList) {
+        var maxLength = 0;
+        for (var _i = 0, optionsList_1 = optionsList; _i < optionsList_1.length; _i++) {
+            var option = optionsList_1[_i];
+            var curLength = getDisplayNameTextOfOption(option).length;
+            maxLength = maxLength > curLength ? maxLength : curLength;
+        }
+        var rightAlignOfLeftPart = maxLength + 2;
+        var leftAlignOfRightPart = rightAlignOfLeftPart + 2;
+        var lines = [];
+        for (var _a = 0, optionsList_2 = optionsList; _a < optionsList_2.length; _a++) {
+            var option = optionsList_2[_a];
+            var tmp = generateOptionOutput(sys, option, rightAlignOfLeftPart, leftAlignOfRightPart);
+            lines = __spreadArray(__spreadArray([], lines, true), tmp, true);
+        }
+        if (lines[lines.length - 2] !== sys.newLine) {
+            lines.push(sys.newLine);
+        }
+        return lines;
+    }
+    function generateSectionOptionsOutput(sys, sectionName, options, subCategory, beforeOptionsDescription, afterOptionsDescription) {
+        var _a;
+        var res = [];
+        res.push(createColors(sys).bold(sectionName) + sys.newLine + sys.newLine);
+        if (beforeOptionsDescription) {
+            res.push(beforeOptionsDescription + sys.newLine + sys.newLine);
+        }
+        if (!subCategory) {
+            res = __spreadArray(__spreadArray([], res, true), generateGroupOptionOutput(sys, options), true);
+            if (afterOptionsDescription) {
+                res.push(afterOptionsDescription + sys.newLine + sys.newLine);
+            }
+            return res;
+        }
+        var categoryMap = new ts.Map();
+        for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
+            var option = options_1[_i];
+            if (!option.category) {
+                continue;
+            }
+            var curCategory = ts.getDiagnosticText(option.category);
+            var optionsOfCurCategory = (_a = categoryMap.get(curCategory)) !== null && _a !== void 0 ? _a : [];
+            optionsOfCurCategory.push(option);
+            categoryMap.set(curCategory, optionsOfCurCategory);
+        }
+        categoryMap.forEach(function (value, key) {
+            res.push("### ".concat(key).concat(sys.newLine).concat(sys.newLine));
+            res = __spreadArray(__spreadArray([], res, true), generateGroupOptionOutput(sys, value), true);
+        });
+        if (afterOptionsDescription) {
+            res.push(afterOptionsDescription + sys.newLine + sys.newLine);
+        }
+        return res;
+    }
+    function printEasyHelp(sys, simpleOptions) {
+        var colors = createColors(sys);
+        var output = __spreadArray([], getHeader(sys, "".concat(ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler), " - ").concat(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version))), true);
+        output.push(colors.bold(ts.getDiagnosticText(ts.Diagnostics.COMMON_COMMANDS)) + sys.newLine + sys.newLine);
+        example("tsc", ts.Diagnostics.Compiles_the_current_project_tsconfig_json_in_the_working_directory);
+        example("tsc app.ts util.ts", ts.Diagnostics.Ignoring_tsconfig_json_compiles_the_specified_files_with_default_compiler_options);
+        example("tsc -b", ts.Diagnostics.Build_a_composite_project_in_the_working_directory);
+        example("tsc --init", ts.Diagnostics.Creates_a_tsconfig_json_with_the_recommended_settings_in_the_working_directory);
+        example("tsc -p ./path/to/tsconfig.json", ts.Diagnostics.Compiles_the_TypeScript_project_located_at_the_specified_path);
+        example("tsc --help --all", ts.Diagnostics.An_expanded_version_of_this_information_showing_all_possible_compiler_options);
+        example(["tsc --noEmit", "tsc --target esnext"], ts.Diagnostics.Compiles_the_current_project_with_additional_settings);
+        var cliCommands = simpleOptions.filter(function (opt) { return opt.isCommandLineOnly || opt.category === ts.Diagnostics.Command_line_Options; });
+        var configOpts = simpleOptions.filter(function (opt) { return !ts.contains(cliCommands, opt); });
+        output = __spreadArray(__spreadArray(__spreadArray([], output, true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.COMMAND_LINE_FLAGS), cliCommands, false, undefined, undefined), true), generateSectionOptionsOutput(sys, ts.getDiagnosticText(ts.Diagnostics.COMMON_COMPILER_OPTIONS), configOpts, false, undefined, ts.formatMessage(undefined, ts.Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0, "https://aka.ms/tsconfig-reference")), true);
+        for (var _i = 0, output_1 = output; _i < output_1.length; _i++) {
+            var line = output_1[_i];
             sys.write(line);
         }
-        return;
-        function getParamType(option) {
-            if (option.paramType !== undefined) {
-                return " " + ts.getDiagnosticText(option.paramType);
+        function example(ex, desc) {
+            var examples = typeof ex === "string" ? [ex] : ex;
+            for (var _i = 0, examples_1 = examples; _i < examples_1.length; _i++) {
+                var example_1 = examples_1[_i];
+                output.push("  " + colors.blue(example_1) + sys.newLine);
             }
-            return "";
+            output.push("  " + ts.getDiagnosticText(desc) + sys.newLine + sys.newLine);
         }
-        function makePadding(paddingLength) {
-            return Array(paddingLength + 1).join(" ");
+    }
+    function printAllHelp(sys, compilerOptions, buildOptions, watchOptions) {
+        var output = __spreadArray([], getHeader(sys, "".concat(ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler), " - ").concat(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version))), true);
+        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);
+        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);
+        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);
+        for (var _i = 0, output_2 = output; _i < output_2.length; _i++) {
+            var line = output_2[_i];
+            sys.write(line);
+        }
+    }
+    function printBuildHelp(sys, buildOptions) {
+        var output = __spreadArray([], getHeader(sys, "".concat(ts.getDiagnosticText(ts.Diagnostics.tsc_Colon_The_TypeScript_Compiler), " - ").concat(ts.getDiagnosticText(ts.Diagnostics.Version_0, ts.version))), true);
+        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);
+        for (var _i = 0, output_3 = output; _i < output_3.length; _i++) {
+            var line = output_3[_i];
+            sys.write(line);
+        }
+    }
+    function getHeader(sys, message) {
+        var _a, _b;
+        var colors = createColors(sys);
+        var header = [];
+        var terminalWidth = (_b = (_a = sys.getWidthOfTerminal) === null || _a === void 0 ? void 0 : _a.call(sys)) !== null && _b !== void 0 ? _b : 0;
+        ;
+        var tsIconLength = 5;
+        var tsIconFirstLine = colors.blueBackground(ts.padLeft("", tsIconLength));
+        var tsIconSecondLine = colors.blueBackground(colors.brightWhite(ts.padLeft("TS ", tsIconLength)));
+        if (terminalWidth >= message.length + tsIconLength) {
+            var rightAlign = terminalWidth > 120 ? 120 : terminalWidth;
+            var leftAlign = rightAlign - tsIconLength;
+            header.push(ts.padRight(message, leftAlign) + tsIconFirstLine + sys.newLine);
+            header.push(ts.padLeft("", leftAlign) + tsIconSecondLine + sys.newLine);
+        }
+        else {
+            header.push(message + sys.newLine);
+            header.push(sys.newLine);
+        }
+        return header;
+    }
+    function printHelp(sys, commandLine) {
+        if (!commandLine.options.all) {
+            printEasyHelp(sys, getOptionsForHelp(commandLine));
+        }
+        else {
+            printAllHelp(sys, getOptionsForHelp(commandLine), ts.optionsForBuild, ts.optionsForWatch);
         }
     }
     function executeCommandLineWorker(sys, cb, commandLine) {
@@ -94588,8 +101762,7 @@ var ts;
             return sys.exit(ts.ExitStatus.Success);
         }
         if (commandLine.options.help || commandLine.options.all) {
-            printVersion(sys);
-            printHelp(sys, getOptionsForHelp(commandLine));
+            printHelp(sys, commandLine);
             return sys.exit(ts.ExitStatus.Success);
         }
         if (commandLine.options.watch && commandLine.options.listFilesOnly) {
@@ -94627,14 +101800,15 @@ var ts;
             }
             else {
                 printVersion(sys);
-                printHelp(sys, getOptionsForHelp(commandLine));
+                printHelp(sys, commandLine);
             }
             return sys.exit(ts.ExitStatus.DiagnosticsPresent_OutputsSkipped);
         }
         var currentDirectory = sys.getCurrentDirectory();
         var commandLineOptions = ts.convertToOptionsWithAbsolutePaths(commandLine.options, function (fileName) { return ts.getNormalizedAbsolutePath(fileName, currentDirectory); });
         if (configFileName) {
-            var configParseResult = ts.parseConfigFileWithSystem(configFileName, commandLineOptions, commandLine.watchOptions, sys, reportDiagnostic);
+            var extendedConfigCache = new ts.Map();
+            var configParseResult = ts.parseConfigFileWithSystem(configFileName, commandLineOptions, extendedConfigCache, commandLine.watchOptions, sys, reportDiagnostic);
             if (commandLineOptions.showConfig) {
                 if (configParseResult.errors.length !== 0) {
                     reportDiagnostic = updateReportDiagnostic(sys, reportDiagnostic, configParseResult.options);
@@ -94648,7 +101822,7 @@ var ts;
             if (ts.isWatchSet(configParseResult.options)) {
                 if (reportWatchModeWithoutSysSupport(sys, reportDiagnostic))
                     return;
-                return createWatchOfConfigFile(sys, cb, reportDiagnostic, configParseResult, commandLineOptions, commandLine.watchOptions);
+                return createWatchOfConfigFile(sys, cb, reportDiagnostic, configParseResult, commandLineOptions, commandLine.watchOptions, extendedConfigCache);
             }
             else if (ts.isIncrementalCompilation(configParseResult.options)) {
                 performIncrementalCompilation(sys, cb, reportDiagnostic, configParseResult);
@@ -94722,12 +101896,12 @@ var ts;
         }
         if (buildOptions.help) {
             printVersion(sys);
-            printHelp(sys, ts.buildOpts, "--build ");
+            printBuildHelp(sys, ts.buildOpts);
             return sys.exit(ts.ExitStatus.Success);
         }
         if (projects.length === 0) {
             printVersion(sys);
-            printHelp(sys, ts.buildOpts, "--build ");
+            printBuildHelp(sys, ts.buildOpts);
             return sys.exit(ts.ExitStatus.Success);
         }
         if (!sys.getModifiedTime || !sys.setModifiedTime || (buildOptions.clean && !sys.deleteFile)) {
@@ -94747,7 +101921,7 @@ var ts;
         updateSolutionBuilderHost(sys, cb, buildHost);
         var builder = ts.createSolutionBuilder(buildHost, projects, buildOptions);
         var exitStatus = buildOptions.clean ? builder.clean() : builder.build();
-        ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.dumpLegend();
+        ts.dumpTracingLegend();
         return sys.exit(exitStatus);
     }
     function createReportErrorSummary(sys, options) {
@@ -94825,7 +101999,7 @@ var ts;
     function createWatchStatusReporter(sys, options) {
         return ts.createWatchStatusReporter(sys, shouldBePretty(sys, options));
     }
-    function createWatchOfConfigFile(system, cb, reportDiagnostic, configParseResult, optionsToExtend, watchOptionsToExtend) {
+    function createWatchOfConfigFile(system, cb, reportDiagnostic, configParseResult, optionsToExtend, watchOptionsToExtend, extendedConfigCache) {
         var watchCompilerHost = ts.createWatchCompilerHostOfConfigFile({
             configFileName: configParseResult.options.configFilePath,
             optionsToExtend: optionsToExtend,
@@ -94836,6 +102010,7 @@ var ts;
         });
         updateWatchCompilationHost(system, cb, watchCompilerHost);
         watchCompilerHost.configFileParsingResult = configParseResult;
+        watchCompilerHost.extendedConfigCache = extendedConfigCache;
         return ts.createWatchProgram(watchCompilerHost);
     }
     function createWatchOfFilesAndCompilerOptions(system, cb, reportDiagnostic, rootFiles, options, watchOptions) {
@@ -94861,13 +102036,13 @@ var ts;
             ts.performance.enable(system);
         }
         if (canTrace(system, compilerOptions)) {
-            ts.startTracing(isBuildMode ? 1 : 0, compilerOptions.generateTrace, compilerOptions.configFilePath);
+            ts.startTracing(isBuildMode ? "build" : "project", compilerOptions.generateTrace, compilerOptions.configFilePath);
         }
     }
     function reportStatistics(sys, program) {
         var compilerOptions = program.getCompilerOptions();
         if (canTrace(sys, compilerOptions)) {
-            ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.stopTracing(program.getTypeCatalog());
+            ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.stopTracing();
         }
         var statistics;
         if (canReportDiagnostics(sys, compilerOptions)) {
@@ -94909,7 +102084,7 @@ var ts;
                 reportCountStatistic("Subtype cache size", caches.subtype);
                 reportCountStatistic("Strict subtype cache size", caches.strictSubtype);
                 if (isPerformanceEnabled) {
-                    ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic(name + " time", duration); });
+                    ts.performance.forEachMeasure(function (name, duration) { return reportTimeStatistic("".concat(name, " time"), duration); });
                 }
             }
             else if (isPerformanceEnabled) {
@@ -94966,7 +102141,13 @@ var ts;
         }
         else {
             sys.writeFile(file, ts.generateTSConfig(options, fileNames, sys.newLine));
-            reportDiagnostic(ts.createCompilerDiagnostic(ts.Diagnostics.Successfully_created_a_tsconfig_json_file));
+            var output = __spreadArray([sys.newLine], getHeader(sys, "Created a new tsconfig.json with:"), true);
+            output.push(ts.getCompilerOptionsDiffValue(options, sys.newLine) + sys.newLine + sys.newLine);
+            output.push("You can learn more at https://aka.ms/tsconfig.json" + sys.newLine);
+            for (var _i = 0, output_4 = output; _i < output_4.length; _i++) {
+                var line = output_4[_i];
+                sys.write(line);
+            }
         }
         return;
     }
@@ -94974,7 +102155,7 @@ var ts;
 // This file actually uses arguments passed on commandline and executes it
 ts.Debug.loggingHost = {
     log: function (_level, s) {
-        ts.sys.write("" + (s || "") + ts.sys.newLine);
+        ts.sys.write("".concat(s || "").concat(ts.sys.newLine));
     }
 };
 if (ts.Debug.isDebugging) {