microsoft / typescript-styled-plugin

TypeScript server plugin that adds intellisense to styled component css strings
MIT License
839 stars 58 forks source link

semi-colon expected when using props in "${...}" - ts-styled-plugin(9999) #162

Closed aderchox closed 1 year ago

aderchox commented 2 years ago

The code below is apparently correct and works fine too, but I can't get rid of this typescript error even with ts-expect-error and ts-ignore:

const StyledNotificationItem = styled.div<Partial<INotificationItemProps>>`
  //...
  & .notification__linktext {
    //...
    &::after {
      content: "${(props) => {
        if (props.direction === "ltr") {
          return " 🡵";
        } else {
          return " 🡴";
        }
      }}"; // <--- HERE: The error is: "semi-colon expected. ts-styled-plugin(9999)"
    }
  }
`;
mjbvz commented 1 year ago

Closing as this package has been deprecated in favor of the official styled-components/typescript-styled-plugin fork

After updating to that fork, follow up in the styled-components repo if this is still an issue