@@ -67,7 +67,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
6767var ts;
6868(function (ts) {
6969 ts.versionMajorMinor = "3.7";
70- ts.version = ts.versionMajorMinor + ".1-rc ";
70+ ts.version = ts.versionMajorMinor + ".2 ";
7171})(ts || (ts = {}));
7272(function (ts) {
7373 function tryGetNativeMap() {
@@ -11889,6 +11889,10 @@ var ts;
1188911889 return ts.isOptionalChainRoot(node.parent) && node.parent.expression === node;
1189011890 }
1189111891 ts.isExpressionOfOptionalChainRoot = isExpressionOfOptionalChainRoot;
11892+ function isNullishCoalesce(node) {
11893+ return node.kind === 208 && node.operatorToken.kind === 60;
11894+ }
11895+ ts.isNullishCoalesce = isNullishCoalesce;
1189211896 function isNewExpression(node) {
1189311897 return node.kind === 196;
1189411898 }
@@ -24153,11 +24157,10 @@ var ts;
2415324157 if (!expression) {
2415424158 return flags & 32 ? antecedent : unreachableFlow;
2415524159 }
24156- if (expression.kind === 105 && flags & 64 ||
24157- expression.kind === 90 && flags & 32) {
24158- if (!ts.isExpressionOfOptionalChainRoot(expression)) {
24159- return unreachableFlow;
24160- }
24160+ if ((expression.kind === 105 && flags & 64 ||
24161+ expression.kind === 90 && flags & 32) &&
24162+ !ts.isExpressionOfOptionalChainRoot(expression) && !ts.isNullishCoalesce(expression.parent)) {
24163+ return unreachableFlow;
2416124164 }
2416224165 if (!isNarrowingExpression(expression)) {
2416324166 return antecedent;
@@ -24996,7 +24999,12 @@ var ts;
2499624999 switch (ts.getAssignmentDeclarationPropertyAccessKind(declName.parent)) {
2499725000 case 1:
2499825001 case 2:
24999- container = file;
25002+ if (!ts.isExternalOrCommonJsModule(file)) {
25003+ container = undefined;
25004+ }
25005+ else {
25006+ container = file;
25007+ }
2500025008 break;
2500125009 case 4:
2500225010 container = declName.parent.expression;
@@ -25010,7 +25018,9 @@ var ts;
2501025018 case 0:
2501125019 return ts.Debug.fail("Shouldn't have detected typedef or enum on non-assignment declaration");
2501225020 }
25013- declareModuleMember(typeAlias, 524288, 788968);
25021+ if (container) {
25022+ declareModuleMember(typeAlias, 524288, 788968);
25023+ }
2501425024 container = oldContainer;
2501525025 }
2501625026 }
@@ -29990,7 +30000,6 @@ var ts;
2999030000 else if (context.flags & 2048 &&
2999130001 type.symbol.valueDeclaration &&
2999230002 ts.isClassLike(type.symbol.valueDeclaration) &&
29993- ts.findAncestor(type.symbol.valueDeclaration, function (d) { return d === ts.getSourceFileOfNode(context.enclosingDeclaration); }) &&
2999430003 !isValueSymbolAccessible(type.symbol, context.enclosingDeclaration)) {
2999530004 return createAnonymousTypeNode(type);
2999630005 }
@@ -35247,7 +35256,9 @@ var ts;
3524735256 && ts.isCallExpression(decl.initializer)
3524835257 && ts.isRequireCall(decl.initializer, true)
3524935258 && valueType.symbol;
35250- if (isRequireAlias) {
35259+ var isImportType = node.kind === 187;
35260+ var isDelayedMergeClass = symbol !== valueType.symbol && getMergedSymbol(symbol) === valueType.symbol;
35261+ if (isRequireAlias || isImportType || isDelayedMergeClass) {
3525135262 typeType = getTypeReferenceType(node, valueType.symbol);
3525235263 }
3525335264 }
@@ -37870,13 +37881,13 @@ var ts;
3787037881 }
3787137882 if (!ignoreReturnTypes) {
3787237883 var targetReturnType = isResolvingReturnTypeOfSignature(target) ? anyType
37873- : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(target.declaration.symbol)
37884+ : target.declaration && isJSConstructor(target.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol( target.declaration.symbol) )
3787437885 : getReturnTypeOfSignature(target);
3787537886 if (targetReturnType === voidType) {
3787637887 return result;
3787737888 }
3787837889 var sourceReturnType = isResolvingReturnTypeOfSignature(source) ? anyType
37879- : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(source.declaration.symbol)
37890+ : source.declaration && isJSConstructor(source.declaration) ? getDeclaredTypeOfClassOrInterface(getMergedSymbol( source.declaration.symbol) )
3788037891 : getReturnTypeOfSignature(source);
3788137892 var targetTypePredicate = getTypePredicateOfSignature(target);
3788237893 if (targetTypePredicate) {
@@ -78958,6 +78969,15 @@ var ts;
7895878969 function findSourceFile(fileName, path, isDefaultLib, ignoreNoDefaultLib, refFile, packageId) {
7895978970 if (useSourceOfProjectReferenceRedirect) {
7896078971 var source = getSourceOfProjectReferenceRedirect(fileName);
78972+ if (!source &&
78973+ host.realpath &&
78974+ options.preserveSymlinks &&
78975+ ts.isDeclarationFileName(fileName) &&
78976+ ts.stringContains(fileName, ts.nodeModulesPathPart)) {
78977+ var realPath = host.realpath(fileName);
78978+ if (realPath !== fileName)
78979+ source = getSourceOfProjectReferenceRedirect(realPath);
78980+ }
7896178981 if (source) {
7896278982 var file_1 = ts.isString(source) ?
7896378983 findSourceFile(source, toPath(source), isDefaultLib, ignoreNoDefaultLib, refFile, packageId) :
0 commit comments