20 Commits

Author SHA1 Message Date
Michael Demarais
864693f468 Replace “SprintUtils” typo with “SpringUtils” (#256) 2019-04-25 21:17:08 +03:00
Michał Osadnik
fd11ce21f2 Add SpringUtils.js (#40)
Motivation

API known form RN core is much more flexible when it comes to being flexible.

We wanted to make using spring animation easier.

Changes
We didn't want to modify existing spring object so I have added SpringUtils object which is a set of methods for easier spring's config manipulations.
2019-04-25 15:15:31 +02:00
Jeremy Deutsch
7d3ecedfb6 Add numbers and non-node values to concat type (#249) 2019-04-19 08:54:18 +02:00
Jeremy Deutsch
0882c97e82 Add Animated.useCode hook as an alternative to Animated.Code (#237)
* add useCode hook as an alternative to Animated.Code

* Add useCode documentation to README

Added a short description of Animated.useCode to the README, with both a function signature and an example of its use in a component.
2019-04-15 13:12:09 +02:00
iamolegga
d42b64212f [TS] fix adaptable type (#243)
* [TS] fix adaptable type

* Apply suggestions from code review

Co-Authored-By: iamolegga <iamolegga@users.noreply.github.com>
2019-04-15 13:04:53 +02:00
Jose G
2c0eb49703 [TypeScript] Add Transition.* and Transitioning.View types (#246) 2019-04-15 13:04:29 +02:00
iamolegga
e40860fa43 Update react-native-reanimated.d.ts (#220) 2019-03-28 11:26:43 +01:00
Jose G
119953c41b TS: "start" callback should be optional (#209)
This PR allows using `.start()` without passing a callback to it (like `Animated` from `react-native` does 😅).
2019-03-14 16:11:48 +01:00
Rokas Augustinas
8fe471d9fd Add more trigonometry operator (#203)
More trigonometry operators.
2019-03-11 11:58:08 +01:00
Luc Vauvillier
3f9f5cca3b Expose createAnimatedComponent definition (#201)
Missing typescript definition
2019-03-05 13:40:40 +01:00
Cameron Knight
76e5cd465e Update react-native-reanimated.d.ts (#170)
This fixes a type error as an object in the left-hand position is considered a destructure of type `any`
2019-01-16 22:11:39 +01:00
Sunny Luo
2eb45e2b47 Update react-native-reanimated.d.ts (#146)
Fix Mapping declaration since [native event can be a function](https://github.com/kmagiera/react-native-reanimated/pull/83)

Otherwise, you will get an error like this:

"Type '{ nativeEvent: ({ translationY: y, state }: { translationY: number; state: State; }) => AnimatedNode<number>; }' is not assignable to type 'Mapping'.
2018-12-12 09:41:59 +01:00
Michał Osadnik
bd19dee37f Add backward compatible API typings (#141)
Closes #138
2018-12-06 11:11:57 +01:00
Karl Sander
ee27c3a531 Add Animated.Code component to TS types (#119)
Adds the `<Animated.Code>` component and a props type for a render or `exec` prop. Is it right that this should always return an `AnimatedNode<number>`?

Render prop or `exec` should be exclusive, based on how its implemented (`exec` takes precedence), but my TypeScript experience is too limited to figure that out.
2018-10-19 17:57:46 +02:00
Henri Lahtinen
3804b1b152 EasingStatic referenced Animated.EasingFunction but it was not exported (#118)
Trying to use reanimated with typescript results in bunch of `Namespace 'Animated' has no exported member 'EasingFunction'` errors because `Animated.EasingFunction` is not being exported.
2018-10-11 10:53:31 +02:00
Simon Trény
8e73861ffc Update and fix typescript definitions (#70) 2018-08-21 09:15:21 +02:00
Michał Osadnik
06b03a8461 Use strings as value (#53) 2018-08-16 17:09:13 +02:00
Michał Osadnik
02e5dcc1fa Update react-native-reanimated.d.ts (#74) 2018-08-16 16:59:56 +02:00
Jeromy Maligie
0594edc36c Update TypeScript definitions (#63) 2018-08-11 20:08:28 +02:00
Cameron Knight
076e2b2d32 Add typescript definitions (#51)
* Add typescript definitions

* Update typescript definition based on PR comments

* Update react-native-reanimated.d.ts
2018-08-06 10:30:35 +02:00