Adaptations for ReScript 10 / use records with optional fields & depr… · rescript-react-native/rescript-react-native@e606a03
@@ -23,9 +23,16 @@ type value<'a>
23232424module ValueAnimations = (Val: Value) => {
2525module Decay = {
26-type config
27-28- @obj
26+type config = {
27+velocity: Val.rawValue,
28+useNativeDriver: bool,
29+deceleration?: float,
30+isInteraction?: bool,
31+onComplete?: Animation.endCallback,
32+iterations?: int,
33+ }
34+35+ @obj @deprecated("Directly create record instead")
2936external config: (
3037 ~velocity: Val.rawValue,
3138 ~deceleration: float=?,
@@ -45,9 +52,27 @@ module ValueAnimations = (Val: Value) => {
4552external fromRawValue: Val.rawValue => toValue = "%identity"
4653external fromAnimatedValue: Val.t => toValue = "%identity"
475448-type config
49-50- @obj
55+type config = {
56+toValue: toValue,
57+useNativeDriver: bool,
58+restDisplacementThreshold?: float,
59+overshootClamping?: bool,
60+restSpeedThreshold?: float,
61+velocity?: Val.rawValue,
62+bounciness?: float,
63+speed?: float,
64+tension?: float,
65+friction?: float,
66+stiffness?: float,
67+mass?: float,
68+damping?: float,
69+delay?: float,
70+isInteraction?: bool,
71+onComplete?: Animation.endCallback,
72+iterations?: int,
73+ }
74+75+ @obj @deprecated("Directly create record instead")
5176external config: (
5277 ~toValue: toValue,
5378 ~restDisplacementThreshold: float=?,
@@ -79,9 +104,18 @@ module ValueAnimations = (Val: Value) => {
79104external fromRawValue: Val.rawValue => toValue = "%identity"
80105external fromAnimatedValue: Val.t => toValue = "%identity"
8110682-type config
83-84- @obj
107+type config = {
108+toValue: toValue,
109+useNativeDriver: bool,
110+easing?: Easing.t,
111+duration?: float,
112+delay?: float,
113+isInteraction?: bool,
114+onComplete?: Animation.endCallback,
115+iterations?: int,
116+ }
117+118+ @obj @deprecated("Directly create record instead")
85119external config: (
86120 ~toValue: toValue,
87121 ~easing: Easing.t=?,
@@ -107,8 +141,16 @@ module Interpolation = {
107141108142type extrapolate = [#extend | #clamp | #identity]
109143110-type config
111- @obj
144+type config = {
145+inputRange: array<float>,
146+outputRange: outputRange,
147+easing?: Easing.t,
148+extrapolate?: extrapolate,
149+extrapolateLeft?: extrapolate,
150+extrapolateRight?: extrapolate,
151+ }
152+153+ @obj @deprecated("Directly create record instead")
112154external config: (
113155 ~inputRange: array<float>,
114156 ~outputRange: outputRange,