Replies: 1 comment
-
Can you try re-formatting your code snippet? It's hard to see what you were exactly doing, since github formatted it funky. Maybe put the whole thing in a block with ```. I don't use styled components at all, so I'm no expert, but I'm wondering if maybe this is just a type-checking error. Could you try casting to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Is there any way to use this with styled + typescript?
I tried it like this
import styled from 'styled-components'; or import styled from 'styled-components/native';
const T = styled(Text)
${tw
text-black text-30 mb-30};
and I'm getting this :
No overload matches this call.
Overload 1 of 3, '(first: TemplateStringsArray | CSSObject, ...interpolations: SimpleInterpolation[]): FlattenSimpleInterpolation', gave the following error.
Argument of type 'Style' is not assignable to parameter of type 'SimpleInterpolation'.
Type 'Style' is missing the following properties from type 'readonly SimpleInterpolation[]': length, concat, join, slice, and 19 more.
Overload 2 of 3, '(first: TemplateStringsArray | CSSObject | InterpolationFunction<ThemeProps>, ...interpolations: Interpolation<ThemeProps>[]): FlattenInterpolation<...>', gave the following error.
Argument of type 'Style' is not assignable to parameter of type 'Interpolation<ThemeProps>'.
Type 'Style' is missing the following properties from type 'readonly Interpolation<ThemeProps>[]': length, concat, join, slice, and 19 more.
Overload 3 of 3, '(first: TemplateStringsArray | CSSObject | InterpolationFunction<ThemedStyledProps<object, any>>, ...interpolations: Interpolation<...>[]): FlattenInterpolation<...>', gave the following error.
[]): FlattenInterpolation<...>', gave the following error.
Argument of type 'Style' is not assignable to parameter of type 'Interpolation<ThemedStyledProps<object, any>>'.
Type 'Style' is missing the following properties from type 'readonly Interpolation<ThemedStyledProps<object, any>>[]': length, concat, join, slice, and 19 more.ts(2769)
Beta Was this translation helpful? Give feedback.
All reactions