V6: What is the proper type for Interpolations / RuleSets? #3915
Unanswered
charltoons
asked this question in
Q&A
Replies: 1 comment
-
styled-components v6 RC ( |
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
-
What is the proper way to add types for the return value of
css
? Does V6 export a canonical type that should be used? We had previously been usingFlattenSimpleInterpolation
, but after upgrading to V6-beta, we are getting the following Typescript error:We're wondering if there is a preferred way to handle this type. Consider the following code using Typescript and
styled-components
V5:For now we have been using
ReturnType<typeof css>
to replaceFlattenSimpleInterpolation
. Is this the best way?Beta Was this translation helpful? Give feedback.
All reactions