diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c4a19cb8e8c2d..cdd0f51ebc3c1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -32704,13 +32704,13 @@ namespace ts { function checkSatisfiesExpression(node: SatisfiesExpression) { checkSourceElement(node.type); + const exprType = checkExpression(node.expression); const targetType = getTypeFromTypeNode(node.type); if (isErrorType(targetType)) { return targetType; } - const exprType = checkExpression(node.expression); checkTypeAssignableToAndOptionallyElaborate(exprType, targetType, node.type, node.expression, Diagnostics.Type_0_does_not_satisfy_the_expected_type_1); return exprType;