@@ -31354,6 +31354,19 @@ function lowerExpression(builder, exprPath) {
3135431354 kind: 'TypeCastExpression',
3135531355 value: lowerExpressionToTemporary(builder, expr.get('expression')),
3135631356 typeAnnotation: typeAnnotation.node,
31357+ typeAnnotationKind: 'cast',
31358+ type: lowerType(typeAnnotation.node),
31359+ loc: exprLoc,
31360+ };
31361+ }
31362+ case 'TSSatisfiesExpression': {
31363+ let expr = exprPath;
31364+ const typeAnnotation = expr.get('typeAnnotation');
31365+ return {
31366+ kind: 'TypeCastExpression',
31367+ value: lowerExpressionToTemporary(builder, expr.get('expression')),
31368+ typeAnnotation: typeAnnotation.node,
31369+ typeAnnotationKind: 'satisfies',
3135731370 type: lowerType(typeAnnotation.node),
3135831371 loc: exprLoc,
3135931372 };
@@ -31365,6 +31378,7 @@ function lowerExpression(builder, exprPath) {
3136531378 kind: 'TypeCastExpression',
3136631379 value: lowerExpressionToTemporary(builder, expr.get('expression')),
3136731380 typeAnnotation: typeAnnotation.node,
31381+ typeAnnotationKind: 'as',
3136831382 type: lowerType(typeAnnotation.node),
3136931383 loc: exprLoc,
3137031384 };
@@ -43346,7 +43360,12 @@ function codegenInstructionValue(cx, instrValue) {
4334643360 }
4334743361 case 'TypeCastExpression': {
4334843362 if (libExports.isTSType(instrValue.typeAnnotation)) {
43349- value = libExports.tsAsExpression(codegenPlaceToExpression(cx, instrValue.value), instrValue.typeAnnotation);
43363+ if (instrValue.typeAnnotationKind === 'satisfies') {
43364+ value = libExports.tsSatisfiesExpression(codegenPlaceToExpression(cx, instrValue.value), instrValue.typeAnnotation);
43365+ }
43366+ else {
43367+ value = libExports.tsAsExpression(codegenPlaceToExpression(cx, instrValue.value), instrValue.typeAnnotation);
43368+ }
4335043369 }
4335143370 else {
4335243371 value = libExports.typeCastExpression(codegenPlaceToExpression(cx, instrValue.value), libExports.typeAnnotation(instrValue.typeAnnotation));
0 commit comments