threepointone/glamor

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

jakeleboeuf opened this issue · 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 glamor@2.20.40

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

Woooooop! Thanks!!

Any update on when the fix will be merged in?

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

got this error too -- is there a fix?

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

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!