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

Projects
None yet
5 participants
@RIP21
Copy link

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

This comment has been minimized.

Copy link

commented Sep 24, 2018

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

@undeadcat

This comment has been minimized.

Copy link
Contributor

commented Sep 24, 2018

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

@dagerikhl

This comment has been minimized.

Copy link

commented Dec 13, 2018

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

This comment has been minimized.

Copy link

commented Dec 13, 2018

Which version of WebStorm do you have?

@dagerikhl

This comment has been minimized.

Copy link

commented Dec 13, 2018

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

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Jan 17, 2019

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

@prigara

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

commented Mar 6, 2019

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/)

@undeadcat undeadcat closed this Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.