linting
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
|||||||
type PanGesture,
|
type PanGesture,
|
||||||
} from 'react-native-gesture-handler'
|
} from 'react-native-gesture-handler'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
|
type AnimatableValue,
|
||||||
runOnJS,
|
runOnJS,
|
||||||
type SharedValue,
|
type SharedValue,
|
||||||
useAnimatedReaction,
|
useAnimatedReaction,
|
||||||
@@ -460,7 +461,7 @@ function clampTranslation(
|
|||||||
return clampedValue
|
return clampedValue
|
||||||
}
|
}
|
||||||
|
|
||||||
function withClampedSpring(value: any) {
|
function withClampedSpring<T extends AnimatableValue>(value: T): T {
|
||||||
'worklet'
|
'worklet'
|
||||||
return withSpring(value, {overshootClamping: true})
|
return withSpring(value, {overshootClamping: true})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {SystemBars} from 'react-native-edge-to-edge'
|
|||||||
import {Gesture} from 'react-native-gesture-handler'
|
import {Gesture} from 'react-native-gesture-handler'
|
||||||
import PagerView from 'react-native-pager-view'
|
import PagerView from 'react-native-pager-view'
|
||||||
import Animated, {
|
import Animated, {
|
||||||
|
type AnimatableValue,
|
||||||
type AnimatedRef,
|
type AnimatedRef,
|
||||||
cancelAnimation,
|
cancelAnimation,
|
||||||
interpolate,
|
interpolate,
|
||||||
@@ -735,7 +736,10 @@ function interpolateTransform(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function withClampedSpring(value: any, config: WithSpringConfig) {
|
function withClampedSpring<T extends AnimatableValue>(
|
||||||
|
value: T,
|
||||||
|
config: WithSpringConfig,
|
||||||
|
): T {
|
||||||
'worklet'
|
'worklet'
|
||||||
return withSpring(value, {...config, overshootClamping: true})
|
return withSpring(value, {...config, overshootClamping: true})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import {type Component} from 'react'
|
||||||
import {type TransformsStyle} from 'react-native'
|
import {type TransformsStyle} from 'react-native'
|
||||||
import {
|
import {
|
||||||
type AnimatedRef,
|
type AnimatedRef,
|
||||||
@@ -28,7 +29,7 @@ export type ImageSource = {
|
|||||||
thumbUri: string
|
thumbUri: string
|
||||||
thumbDimensions: Dimensions | null
|
thumbDimensions: Dimensions | null
|
||||||
thumbRect: MeasuredDimensions | null
|
thumbRect: MeasuredDimensions | null
|
||||||
thumbRef?: AnimatedRef<any> | null
|
thumbRef?: AnimatedRef<Component> | null
|
||||||
thumbBorderRadius?: number
|
thumbBorderRadius?: number
|
||||||
alt?: string
|
alt?: string
|
||||||
type: 'image' | 'circle-avi' | 'rect-avi'
|
type: 'image' | 'circle-avi' | 'rect-avi'
|
||||||
|
|||||||
Reference in New Issue
Block a user