Igorbek/typescript-plugin-styled-components

Doesn't transform styled components with config

vladislaver opened this issue · 1 comments

StyledComponentsTransformer ignores styled components with config like this:

const Box = styled.div.withConfig<Props>({
    shouldForwardProp: (prop, defaultValidatorFn) =>
        !['display'].includes(prop) && defaultValidatorFn(prop),
})`
    display: ${prop => prop.display};
`;

typescript@4.4.4
styled-components@5.3.3
typescript-plugin-styled-components@2.0.0

Hm, it's not supported because withConfig was not part of the public surface.
I guess it was changed some time ago. I would argue if you use useConfig manually it should opt out of display name generation. I will need to investigate how well it would be working with multiple useConfig.