Typescript error: Property 'keyframes' does not exist on type 'typeof css'.
jakeleboeuf opened this issue · 7 comments
jakeleboeuf commented
I'm new to typescript (and react!), so maybe I'm just doing something wrong? But getting the following error:
error TS2339: Property 'keyframes' does not exist on type 'typeof css'.
import { css } from 'glamor';
const bounce = css.keyframes({
'0%': { transform: `scale(1.02)` },
'100%': { transform: `scale(0.98)` }
});
Using glamor@2.20.40
threepointone commented
I have a fix in master, will release over the weekend. sorry!
jakeleboeuf commented
Woooooop! Thanks!!
ktranada commented
Any update on when the fix will be merged in?
getnorthern commented
I'm getting this too - any news on the fix, please?
russpate commented
got this error too -- is there a fix?
jakeleboeuf commented
For anybody who needs a quick fix, this should hold you over until @threepointone's fix is release.
const cssShim: any = css;
const animateScale = cssShim.keyframes({
'0%': { transform: 'scale(1)' },
'50%': { transform: 'scale(1.0125)' },
'100%': { transform: 'scale(1)' }
});
const AnimatedDiv = glamorous.div({
animation: `${animateScale} 2.5s ease-in-out infinite`
});
RoystonS commented
Hi @threepointone. Do you know when this might make it into a release?
It's all there in master since September 2017, but it hasn't made it into a npm release yet. Thanks!