react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
14 lines (13 loc) • 574 B
TypeScript
import type { Component } from 'react';
import type { AnimatedRef } from './hook/commonTypes';
import type { SharedValue } from './commonTypes';
export interface ComponentCoords {
x: number;
y: number;
}
/**
* Given an absolute position and a component ref, returns the relative
* position in the component's local coordinate space.
*/
export declare function getRelativeCoords(parentAnimatedRef: AnimatedRef<Component>, absoluteX: number, absoluteY: number): ComponentCoords | null;
export declare function isSharedValue<T>(value: any): value is SharedValue<T>;