Skip to content

Commit

Permalink
Manual port of microsoft#51704
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanCavanaugh committed Dec 1, 2022
1 parent e7a02f4 commit aa93ab3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aa93ab3

Please sign in to comment.