Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-with-props compatibility with styled-components #1

Open
goblindegook opened this issue Jan 4, 2019 · 0 comments
Open

react-with-props compatibility with styled-components #1

goblindegook opened this issue Jan 4, 2019 · 0 comments
Labels
bug Something isn't working react-with-props

Comments

@goblindegook
Copy link
Member

Applying withProps() to a styled component yields the following type error:

error TS2345: Argument of type 'StyledComponent<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "form" | ... 280 more ... | "src">, any>' is not assignable to parameter of type 'InnerComponent<{ type: string; }>'.
      Type 'StyledComponent<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "form" | ... 280 more ... | "src">, any>' is not assignable to type 'FunctionComponent<{ type: string; }>'.
        Types of property 'propTypes' are incompatible.
          Type 'WeakValidationMap<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "form" | ... 280 more ... | "src"> & { ...; }> | undefined' is not assignable to type 'WeakValidationMap<{ type: string; }> | undefined'.
            Type 'WeakValidationMap<ClassAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLInputElement> & Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "form" | ... 280 more ... | "src"> & { ...; }>' is not assignable to type 'WeakValidationMap<{ type: string; }>'.
              Types of property 'type' are incompatible.
                Type 'Validator<string | null | undefined> | undefined' is not assignable to type 'Validator<string> | undefined'.
                  Type 'Validator<string | null | undefined>' is not assignable to type 'Validator<string>'.
                    Type 'string | null | undefined' is not assignable to type 'string'.
                      Type 'undefined' is not assignable to type 'string'.
@goblindegook goblindegook added bug Something isn't working react-with-props labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react-with-props
Projects
None yet
Development

No branches or pull requests

1 participant