Skip to content

Commit cddcc79

Browse files
committed
fix(compiler): peel TSSatisfiesExpression and TSInstantiationExpression in canCarryDirectSignalHandle
The peel list in canCarryDirectSignalHandle was missing TSSatisfiesExpression and TSInstantiationExpression. When the syntacticOnly path was active, a $-named handle inside a logical/conditional expression wrapped in 'satisfies' (e.g. `(a ?? b$) satisfies T`) would not be recognized as a signal handle, because the function never unwrapped the satisfies node to reach the LogicalExpression branch. The isDirectSignalHandleExpression fallback does unwrap satisfies but only accepts leaf identifiers/members/calls, not compound expressions. Adding both types to the existing peel list aligns it with the unwrapExpression helper in native-attribute-reads.js.
1 parent b7f7f4f commit cddcc79

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/octane/src/compiler/compile.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ function canCarryDirectSignalHandle(
615615
node.type === 'TSAsExpression' ||
616616
node.type === 'TSTypeAssertion' ||
617617
node.type === 'TSNonNullExpression' ||
618+
node.type === 'TSSatisfiesExpression' ||
619+
node.type === 'TSInstantiationExpression' ||
618620
node.type === 'ParenthesizedExpression' ||
619621
node.type === 'ChainExpression'
620622
) {

0 commit comments

Comments
 (0)