@@ -42806,7 +42806,11 @@ function computeModuleSpecifiers(modulePaths, compilerOptions, importingSourceFi
4280642806 if (modulePath.isRedirect) {
4280742807 redirectPathsSpecifiers = append(redirectPathsSpecifiers, local);
4280842808 } else if (pathIsBareSpecifier(local)) {
42809- pathsSpecifiers = append(pathsSpecifiers, local);
42809+ if (pathContainsNodeModules(local)) {
42810+ relativeSpecifiers = append(relativeSpecifiers, local);
42811+ } else {
42812+ pathsSpecifiers = append(pathsSpecifiers, local);
42813+ }
4281042814 } else if (forAutoImport || !importedFileIsInNodeModules || modulePath.isInNodeModules) {
4281142815 relativeSpecifiers = append(relativeSpecifiers, local);
4281242816 }
@@ -76090,19 +76094,16 @@ function createTypeChecker(host) {
7609076094 }
7609176095 }
7609276096 }
76093- function getNonGenericReturnTypeOfSingleCallSignature (funcType) {
76097+ function getReturnTypeOfSingleNonGenericCallSignature (funcType) {
7609476098 const signature = getSingleCallSignature(funcType);
76095- if (signature) {
76096- const returnType = getReturnTypeOfSignature(signature);
76097- if (!signature.typeParameters || !couldContainTypeVariables(returnType)) {
76098- return returnType;
76099- }
76099+ if (signature && !signature.typeParameters) {
76100+ return getReturnTypeOfSignature(signature);
7610076101 }
7610176102 }
7610276103 function getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) {
7610376104 const funcType = checkExpression(expr.expression);
7610476105 const nonOptionalType = getOptionalExpressionType(funcType, expr.expression);
76105- const returnType = getNonGenericReturnTypeOfSingleCallSignature (funcType);
76106+ const returnType = getReturnTypeOfSingleNonGenericCallSignature (funcType);
7610676107 return returnType && propagateOptionalTypeMarker(returnType, expr, nonOptionalType !== funcType);
7610776108 }
7610876109 function getTypeOfExpression(node) {
@@ -76147,7 +76148,7 @@ function createTypeChecker(host) {
7614776148 /*requireStringLiteralLikeArgument*/
7614876149 true
7614976150 ) && !isSymbolOrSymbolForCall(expr)) {
76150- return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getNonGenericReturnTypeOfSingleCallSignature (checkNonNullExpression(expr.expression));
76151+ return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature (checkNonNullExpression(expr.expression));
7615176152 } else if (isAssertionExpression(expr) && !isConstTypeReference(expr.type)) {
7615276153 return getTypeFromTypeNode(expr.type);
7615376154 } else if (isLiteralExpression(node) || isBooleanLiteral(node)) {
@@ -81502,14 +81503,15 @@ function createTypeChecker(host) {
8150281503 idText(id)
8150381504 );
8150481505 }
81505- if (!isIllegalExportDefaultInCJS && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
81506- if (sym.flags & 2097152 /* Alias */ && resolveAlias(sym) !== unknownSymbol && getSymbolFlags(
81506+ if (!isIllegalExportDefaultInCJS && !(node.flags & 33554432 /* Ambient */) && getIsolatedModules(compilerOptions) && !(sym.flags & 111551 /* Value */)) {
81507+ const nonLocalMeanings = getSymbolFlags(
8150781508 sym,
8150881509 /*excludeTypeOnlyMeanings*/
8150981510 false,
8151081511 /*excludeLocalMeanings*/
8151181512 true
81512- ) & 788968 /* Type */ && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
81513+ );
81514+ if (sym.flags & 2097152 /* Alias */ && nonLocalMeanings & 788968 /* Type */ && !(nonLocalMeanings & 111551 /* Value */) && (!typeOnlyDeclaration || getSourceFileOfNode(typeOnlyDeclaration) !== getSourceFileOfNode(node))) {
8151381515 error(
8151481516 id,
8151581517 node.isExportEquals ? Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_import_type_where_0_is_imported : Diagnostics._0_resolves_to_a_type_and_must_be_marked_type_only_in_this_file_before_re_exporting_when_1_is_enabled_Consider_using_export_type_0_as_default,
0 commit comments