Skip to content

Commit

Permalink
remove ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Apr 26, 2024
1 parent 9a853d0 commit ede976b
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/pigment-css-react/src/processors/sx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,10 @@ export class SxProcessor extends BaseProcessor {
* <Component sx={_sx({ color: 'red' })} /> to <Component sx={_sx('sd5jss7')} />
* <Component sx={_sx({ bgcolor: 'red', color: props.color })} /> to <Component sx={_sx({ className: 'bc1d15y', vars: { 'bc1d15y-0': [props.color, false], }})} />
*/
this.replacer(
// @ts-ignore
(tagPath: NodePath<CallExpression>) => {
return t.callExpression(tagPath.get('callee').node, [result]);
},
false,
);
this.replacer((_tagPath) => {
const tagPath = _tagPath as NodePath<CallExpression>;
return t.callExpression(tagPath.get('callee').node, [result]);
}, false);

/**
* For JSX calls, replace the sx prop with runtime sx
Expand Down

0 comments on commit ede976b

Please sign in to comment.