UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

16 lines (15 loc) 713 B
/// <reference types="node" /> 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>; export declare function mockedRequestAnimationFrame(callback: (timestamp: number) => void): NodeJS.Timeout;