mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-13 22:30:41 +08:00
chore: tweak types for stack
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import {
|
||||
Animated,
|
||||
EasingFunction,
|
||||
StyleProp,
|
||||
TextStyle,
|
||||
ViewStyle,
|
||||
@@ -430,29 +429,21 @@ export type StackHeaderTitleProps = {
|
||||
style?: StyleProp<TextStyle>;
|
||||
};
|
||||
|
||||
export type Screen = React.ComponentType<any> & {
|
||||
navigationOptions?: StackNavigationOptions & {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
|
||||
export type SpringConfig = {
|
||||
damping: number;
|
||||
mass: number;
|
||||
stiffness: number;
|
||||
restSpeedThreshold: number;
|
||||
restDisplacementThreshold: number;
|
||||
overshootClamping: boolean;
|
||||
};
|
||||
|
||||
export type TimingConfig = {
|
||||
duration: number;
|
||||
easing: EasingFunction;
|
||||
};
|
||||
|
||||
export type TransitionSpec =
|
||||
| { animation: 'spring'; config: SpringConfig }
|
||||
| { animation: 'timing'; config: TimingConfig };
|
||||
| {
|
||||
animation: 'spring';
|
||||
config: Omit<
|
||||
Animated.SpringAnimationConfig,
|
||||
'toValue' | keyof Animated.AnimationConfig
|
||||
>;
|
||||
}
|
||||
| {
|
||||
animation: 'timing';
|
||||
config: Omit<
|
||||
Animated.TimingAnimationConfig,
|
||||
'toValue' | keyof Animated.AnimationConfig
|
||||
>;
|
||||
};
|
||||
|
||||
export type StackCardInterpolationProps = {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user