Tailwind-Styled-Component icon indicating copy to clipboard operation
Tailwind-Styled-Component copied to clipboard

Component type error

Open YeungKC opened this issue 3 years ago • 9 comments

image

I think it is TailwindComponent? but it is any.

YeungKC avatar Apr 18 '22 08:04 YeungKC

To expound on this report, the specific error I am seeing that was introduced in version 2.1.7 is:

error TS7031: Binding element '$xxx' implicitly has an 'any' type.

or more specifically, tw is typed as any due to templateFunctionFactory being typed as any here.

scott-lc avatar Apr 18 '22 20:04 scott-lc

I also found out later that this should not be changed to any, otherwise it would be anyscript.

YeungKC avatar Apr 19 '22 12:04 YeungKC

@MathiasGilson Could you help with this issue?

hylickipiotr avatar Apr 27 '22 05:04 hylickipiotr

Any option to fix it?

arminhupka avatar May 05 '22 19:05 arminhupka

I solved it by downgrading to 2.1.6

"resolutions": {
    "tailwind-styled-components": "2.1.6"
}

Note: resolutions only work with yarn, you have to use overrides with npm

azzlack avatar Jun 13 '22 14:06 azzlack

Any fix planned on this issue?

susyabashti avatar Aug 04 '22 14:08 susyabashti

Any solution?

Pedromdsn avatar Aug 31 '22 20:08 Pedromdsn

same for me

mateusfg7 avatar Sep 06 '22 17:09 mateusfg7

Just published the version 2.2.0 that should address this issue

I've got a warning for excessively deep type instanciation though, and I'm not sure how to fix that If some of you guys are typescript experts and could have a look at PR #71 it would be greatly appreciated!

MathiasGilson avatar Sep 06 '22 18:09 MathiasGilson