diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index a91df371f2914..b69968220e52e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -37609,9 +37609,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (node.name.escapedText === "defer") { Debug.assert(!isCallExpression(node.parent) || node.parent.expression !== node, "Trying to get the type of `import.defer` in `import.defer(...)`"); return errorType; - } else { - return checkImportMetaProperty(node); } + return checkImportMetaProperty(node); } return Debug.assertNever(node.keywordToken); @@ -49758,9 +49757,10 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { if (isExpressionNode(node)) { try { - return getRegularTypeOfExpression(node as Expression); - } catch (e) { - console.error("Error while getting the type of", isExpressionNode(node), node.kind, (node as MetaProperty).keywordToken !== SyntaxKind.ImportKeyword, (node as MetaProperty).name?.escapedText) + return getRegularTypeOfExpression(node as Expression); + } + catch (e) { + console.error("Error while getting the type of", isExpressionNode(node), node.kind, (node as MetaProperty).keywordToken !== SyntaxKind.ImportKeyword, (node as MetaProperty).name?.escapedText); throw e; } }