glamor icon indicating copy to clipboard operation
glamor copied to clipboard

Typescript error: Property 'keyframes' does not exist on type 'typeof css'.

Open jakeleboeuf opened this issue 6 years ago • 7 comments

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 [email protected]

jakeleboeuf avatar Sep 15 '17 15:09 jakeleboeuf

I have a fix in master, will release over the weekend. sorry!

threepointone avatar Sep 15 '17 15:09 threepointone

Woooooop! Thanks!!

jakeleboeuf avatar Sep 15 '17 15:09 jakeleboeuf

Any update on when the fix will be merged in?

ktranada avatar Oct 10 '17 01:10 ktranada

I'm getting this too - any news on the fix, please?

getnorthern avatar Oct 26 '17 16:10 getnorthern

got this error too -- is there a fix?

russpate avatar Feb 26 '18 21:02 russpate

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`
});

jakeleboeuf avatar Feb 27 '18 17:02 jakeleboeuf

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!

RoystonS avatar Mar 28 '18 15:03 RoystonS