UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

24 lines (23 loc) 1.33 kB
import type { Ref, Component } from 'react'; import type { StyleProps, BaseAnimationBuilder, ILayoutAnimationBuilder, EntryExitAnimationFunction, SharedTransition, SharedValue } from '../reanimated2'; import type { ViewDescriptorsSet, ViewRefSet } from '../reanimated2/ViewDescriptorsSet'; export interface AnimatedProps extends Record<string, unknown> { viewDescriptors?: ViewDescriptorsSet; viewsRef?: ViewRefSet<unknown>; initial?: SharedValue<StyleProps>; } export type AnimatedComponentProps<P extends Record<string, unknown>> = P & { forwardedRef?: Ref<Component>; style?: NestedArray<StyleProps>; animatedProps?: Partial<AnimatedComponentProps<AnimatedProps>>; animatedStyle?: StyleProps; layout?: BaseAnimationBuilder | ILayoutAnimationBuilder | typeof BaseAnimationBuilder; entering?: BaseAnimationBuilder | typeof BaseAnimationBuilder | EntryExitAnimationFunction | Keyframe; exiting?: BaseAnimationBuilder | typeof BaseAnimationBuilder | EntryExitAnimationFunction | Keyframe; sharedTransitionTag?: string; sharedTransitionStyle?: SharedTransition; }; type NestedArray<T> = T | NestedArray<T>[]; export declare function flattenArray<T>(array: NestedArray<T>): T[]; export declare const has: <K extends string>(key: K, x: unknown) => x is { [key in K]: unknown; }; export {};