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

Exported styled-component with generic (Typescript) in styled function doesn't add props autocomplete when used in JSX #58

Closed
RIP21 opened this issue Sep 17, 2018 · 11 comments

Comments

@RIP21
Copy link

RIP21 commented Sep 17, 2018

What steps will reproduce the problem?

Having let say this component:

import styled from 'styled-components'

const Component = styled.div<{ someProp: string }>``

export default Component
import Component from 'components/Component'

const SomeOtherComponent = () => <Component />
  1. Then trying to Ctrl + Space to autocomplete possible props.

What is the expected result?
Should suggest someProp in autocomplete

What happens instead?
No autocomplete.

@Havret
Copy link

Havret commented Sep 24, 2018

+1 Same problem here. Not sure if this is a problem with plugin or with Webstorm itself.

@undeadcat
Copy link
Contributor

This is something that should be addressed on the IDE side. The relevant issue is https://youtrack.jetbrains.com/issue/WEB-34865.

@dagerikhl
Copy link

I think this is fixed, at least its status is set to fixed in the issue you linked @undeadcat, and I can't seem to replicate the bug.

@Havret
Copy link

Havret commented Dec 13, 2018

Which version of WebStorm do you have?

@dagerikhl
Copy link

Actually IntelliJ, but I should think the tooling is the same. Using IntelliJ IDEA 2018.3.1 (Ultimate Edition) Build #IU-183.4588.61, built on December 4, 2018.

@prigara
Copy link
Collaborator

prigara commented Dec 13, 2018

Hey all, the fix will land in WebStorm and IntelliJ IDEA 2018.3.3 which is expected at the end of December - beginning of January. Thank you for waiting!

@Havret
Copy link

Havret commented Jan 17, 2019

Hey @prigara on your internal bug tracker this is marked as fixed, but the problem still remains.

image

I am using

image

@prigara
Copy link
Collaborator

prigara commented Jan 17, 2019

@Havret we'll investigate. I'll get back to you as soon as I know more.

@prigara
Copy link
Collaborator

prigara commented Jan 18, 2019

@halvves I've reopened the issue because it wasn't fixed for the latest version of @types/styled-components. Hope it will be fixed again soon. Thanks for bringing the attention to it.

@Havret
Copy link

Havret commented Jan 19, 2019

@prigara It would be great if we have this fixed, because working with Webstorm and styled-components has been really painful for the last few months.

@undeadcat
Copy link
Contributor

WEB-34865 is fixed for the newest styled-components versions on the IDE side in 2019.1.
Please try it out in an EAP build (https://www.jetbrains.com/webstorm/eap/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants