react-native-animatable icon indicating copy to clipboard operation
react-native-animatable copied to clipboard

is there `d.ts` ?

Open geminiyellow opened this issue 9 years ago • 10 comments

could i write it by typescript? is there d.ts?

geminiyellow avatar Jul 14 '17 08:07 geminiyellow

Any update about this? Do you consider adding typescript types?

pie6k avatar Jul 27 '17 15:07 pie6k

Hey, I don't have any types but would accept a PR adding this 👍

oblador avatar Jul 30 '17 14:07 oblador

I would appreciate this very much!

itaydressler avatar Jul 31 '17 12:07 itaydressler

@oblador @geminiyellow Please see #150, This is just the first try. Feel free to comment on the PR.

aminroosta avatar Sep 06 '17 07:09 aminroosta

Released in 1.2.4

oblador avatar Sep 18 '17 22:09 oblador

Looks like there is some bug with transition typing.

<AnimatableFlatList easing="ease" ... works fine however <AnimatableFlatList transition="opacity" ... raises TS error

enagorny avatar May 18 '18 10:05 enagorny

How do we even use these types definitions? 😅 I was hoping for something in DefinitelyTyped but couldn't find it.

For a complete beginner having a lot of ways to do something that I was expecting to be simple is kinda daunting.

tiagoalmeida avatar Jun 14 '18 15:06 tiagoalmeida

As they're included since 1.2.4 you should have them without any action on your side beside installing it with npm i react-native-animatable --save or yarn add react-native-animatable

pie6k avatar Jun 15 '18 08:06 pie6k

I thought so as well! However, the module is not found [ts] Cannot find module 'react-native-animatable'. when I try to import it as : import * as Animatable from 'react-native-animatable'.

I have checked my package.json:

"react-native-animatable": "^1.3.0",

tiagoalmeida avatar Jun 15 '18 08:06 tiagoalmeida

@enagorny did you resolve this issue? It's almost exactly 2 years later and I still have the same error on some views.

When using a BlurView with:

const AnimatableBlurView = createAnimatableComponent(BlurView);

TypeScript infers the type

const AnimatableBlurView: AnimatableComponent<BlurViewProperties, StyleProp<ViewStyle>>

But it still can't detect the transition property..

Screenshot 2020-05-15 at 16 32 40

mrousavy avatar May 15 '20 14:05 mrousavy