Reproduction
Using [email protected], transform this TSX:
import * as React from "react";
export function Sidebar({ style }: React.ComponentProps<"div">) {
return (
<div
style={{ "--sidebar-width": "16rem", ...style } as React.CSSProperties}
/>
);
}
Observed
The development transform fails with:
Property left of TSQualifiedName expected node to be of a type ["TSEntityName"] but instead got "CallExpression"
Root cause
Expression-input traversal visits the React identifier in the type-only React.CSSProperties subtree and wraps it as a runtime capture call, producing an invalid TSQualifiedName AST.
Acceptance criteria
- TypeScript-only subtrees are not instrumented.
- Runtime values inside the surrounding assertion, such as
style, remain traceable.
- Generated TSX reparses successfully.
- The real-world Sidebar-shaped source transforms without error.
Reproduction
Using
[email protected], transform this TSX:Observed
The development transform fails with:
Root cause
Expression-input traversal visits the
Reactidentifier in the type-onlyReact.CSSPropertiessubtree and wraps it as a runtime capture call, producing an invalidTSQualifiedNameAST.Acceptance criteria
style, remain traceable.