-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary During removal of `react-native-reanimated.d.ts` in #4519 I didn't consider that some types were exported only in the aforementioned file, e.g. `WithSpringConfig`. Therefore when we released `3.4.0` those types disappear from public API. This PR restores lacking types from `.d.ts` - but only the relevant ones, without Reanimated1 API. ## Types restored ### namespace Animated - Extrapolate - DerivedValue - Adaptable - TransformStyleTypes - AdaptTransforms - AnimatedTransform - AnimateStyle - StylesOrDefault - AnimateProps - EasingFunction - addWhitelistedNativeProps - addWhitelistedUIProps - AnimatedScrollViewProps - FlatListPropsWithLayout ### react-native-reanimated - Adaptable - AdaptTransforms - AnimatedTransform - TransformStyleTypes - AnimateStyle - StylesOrDefault - AnimatedScrollViewProps - FlatListPropsWithLayout - \-\-\- - EasingFunction - EasingFunctionFactory - \-\-\- - WithDecayConfig - \-\-\- - WithSpringConfig - \-\-\- - WithTimingConfig - \-\-\- - FlatListPropsWithLayout - \-\-\- - AnimatedScrollViewProps - \-\-\- - AnimatedStyleProp - \-\-\- - InterpolateRGB - InterpolateHSV - \-\-\- - KeyframeProps ___ Requires #4855 ## Test plan CI + 🚀
- Loading branch information
Showing
18 changed files
with
166 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,87 @@ | ||
export { default as createAnimatedComponent } from './createAnimatedComponent'; | ||
export { | ||
addWhitelistedNativeProps, | ||
addWhitelistedUIProps, | ||
import type { Extrapolate as _Extrapolate } from './reanimated2/interpolateColor'; | ||
import type { SharedValue as _SharedValue } from './reanimated2/commonTypes'; | ||
import type { DerivedValue as _DerivedValue } from './reanimated2/hook/useDerivedValue'; | ||
import type { | ||
TransformStyleTypes as _TransformStyleTypes, | ||
Adaptable as _Adaptable, | ||
AdaptTransforms as _AdaptTransforms, | ||
AnimatedTransform as _AnimatedTransform, | ||
AnimateStyle as _AnimateStyle, | ||
StylesOrDefault as _StylesOrDefault, | ||
AnimateProps as _AnimateProps, | ||
} from './reanimated2/helperTypes'; | ||
import type { EasingFunction as _EasingFunction } from './reanimated2/Easing'; | ||
import { | ||
addWhitelistedNativeProps as _addWhitelistedNativeProps, | ||
addWhitelistedUIProps as _addWhitelistedUIProps, | ||
} from './ConfigHelper'; | ||
import type { AnimatedScrollViewProps as _AnimatedScrollViewProps } from './reanimated2/component/ScrollView'; | ||
import type { FlatListPropsWithLayout as _FlatListPropsWithLayout } from './reanimated2/component/FlatList'; | ||
export { default as createAnimatedComponent } from './createAnimatedComponent'; | ||
|
||
export { AnimatedText as Text } from './reanimated2/component/Text'; | ||
export { AnimatedView as View } from './reanimated2/component/View'; | ||
export { AnimatedScrollView as ScrollView } from './reanimated2/component/ScrollView'; | ||
export { AnimatedImage as Image } from './reanimated2/component/Image'; | ||
export { ReanimatedFlatList as FlatList } from './reanimated2/component/FlatList'; | ||
export type { SharedValue } from './reanimated2/commonTypes'; | ||
export type { AnimatedStyle, AnimateStyle } from './reanimated2/helperTypes'; | ||
/** | ||
* @deprecated Please import `Extrapolate` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
*/ | ||
export type Extrapolate = typeof _Extrapolate; | ||
/** | ||
* @deprecated Please import `SharedValue` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
*/ | ||
|
||
export type SharedValue<T> = _SharedValue<T>; | ||
/** | ||
* @deprecated Please import `DerivedValue` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
*/ | ||
export type DerivedValue<T> = _DerivedValue<T>; | ||
/** | ||
* @deprecated Please import `Adaptable` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
*/ | ||
export type Adaptable<T> = _Adaptable<T>; | ||
/** | ||
* @deprecated Please import `TransformStyleTypes` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type TransformStyleTypes = _TransformStyleTypes; | ||
/** | ||
* @deprecated Please import `AdaptTransforms` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type AdaptTransforms<T> = _AdaptTransforms<T>; | ||
/** | ||
* @deprecated Please import `AnimatedTransform` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
*/ | ||
export type AnimatedTransform = _AnimatedTransform; | ||
/** | ||
* @deprecated Please import `AnimateStyle` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type AnimateStyle<S> = _AnimateStyle<S>; | ||
/** | ||
* @deprecated Please import `StylesOrDefault` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type StylesOrDefault<S> = _StylesOrDefault<S>; | ||
/** | ||
* @deprecated Please import `AnimateProps` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type AnimateProps<P extends object> = _AnimateProps<P>; | ||
/** | ||
* @deprecated Please import `EasingFunction` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type EasingFunction = _EasingFunction; | ||
/** | ||
* @deprecated Please import `addWhitelistedNativeProps` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export const addWhitelistedNativeProps = _addWhitelistedNativeProps; | ||
/** | ||
* @deprecated Please import `addWhitelistedUIProps` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export const addWhitelistedUIProps = _addWhitelistedUIProps; | ||
/** | ||
* @deprecated Please import `AnimatedScrollViewProps` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type AnimatedScrollViewProps = _AnimatedScrollViewProps; | ||
/** | ||
* @deprecated Please import `FlatListPropsWithLayout` directly from `react-native-reanimated` instead of `Animated` namespace. | ||
* */ | ||
export type FlatListPropsWithLayout<T> = _FlatListPropsWithLayout<T>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.