mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 22:57:55 +00:00
40bc15f1f9
Major fixes: - Replace `any` types with proper TypeScript types across all files - Convert require() imports to ES module imports - Add __DEV__ guards to console statements - Escape special characters in JSX (' and ") - Fix unused variables (prefix with _ or remove) - Fix React hooks violations (useCallback, useMemo patterns) - Convert wasm-crypto-shim.js to TypeScript - Add eslint-disable comments for valid setState patterns Files affected: 50+ screens, components, contexts, and services Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
73 lines
2.1 KiB
JavaScript
73 lines
2.1 KiB
JavaScript
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
import React from 'react';
|
|
import { View, Text, Image, Animated } from 'react-native';
|
|
|
|
const Reanimated = {
|
|
default: {
|
|
View,
|
|
Text,
|
|
Image,
|
|
ScrollView: Animated.ScrollView,
|
|
createAnimatedComponent: (component) => component,
|
|
spring: jest.fn(),
|
|
timing: jest.fn(),
|
|
decay: jest.fn(),
|
|
sequence: jest.fn(),
|
|
parallel: jest.fn(),
|
|
delay: jest.fn(),
|
|
loop: jest.fn(),
|
|
event: jest.fn(),
|
|
call: jest.fn(),
|
|
block: jest.fn(),
|
|
cond: jest.fn(),
|
|
eq: jest.fn(),
|
|
neq: jest.fn(),
|
|
and: jest.fn(),
|
|
or: jest.fn(),
|
|
defined: jest.fn(),
|
|
not: jest.fn(),
|
|
set: jest.fn(),
|
|
concat: jest.fn(),
|
|
add: jest.fn(),
|
|
sub: jest.fn(),
|
|
multiply: jest.fn(),
|
|
divide: jest.fn(),
|
|
pow: jest.fn(),
|
|
modulo: jest.fn(),
|
|
sqrt: jest.fn(),
|
|
sin: jest.fn(),
|
|
cos: jest.fn(),
|
|
tan: jest.fn(),
|
|
acos: jest.fn(),
|
|
asin: jest.fn(),
|
|
atan: jest.fn(),
|
|
proc: jest.fn(),
|
|
useCode: jest.fn(),
|
|
useValue: jest.fn(() => new Animated.Value(0)),
|
|
interpolateNode: jest.fn(),
|
|
Extrapolate: { CLAMP: jest.fn() },
|
|
Value: Animated.Value,
|
|
Clock: jest.fn(),
|
|
interpolate: jest.fn(),
|
|
Easing: Animated.Easing,
|
|
},
|
|
useSharedValue: jest.fn(() => ({ value: 0 })),
|
|
useAnimatedStyle: jest.fn((cb) => cb()),
|
|
useAnimatedGestureHandler: jest.fn(),
|
|
useAnimatedScrollHandler: jest.fn(),
|
|
withTiming: jest.fn((value) => value),
|
|
withSpring: jest.fn((value) => value),
|
|
withDecay: jest.fn((value) => value),
|
|
withDelay: jest.fn((_delay, value) => value),
|
|
withSequence: jest.fn((...args) => args[0]),
|
|
withRepeat: jest.fn((value) => value),
|
|
cancelAnimation: jest.fn(),
|
|
runOnJS: jest.fn((fn) => fn),
|
|
runOnUI: jest.fn((fn) => fn),
|
|
Easing: Animated.Easing,
|
|
EasingNode: Animated.Easing,
|
|
};
|
|
|
|
export default Reanimated;
|
|
export const { useSharedValue, useAnimatedStyle, useAnimatedGestureHandler, useAnimatedScrollHandler, withTiming, withSpring, withDecay, withDelay, withSequence, withRepeat, cancelAnimation, runOnJS, runOnUI, Easing, EasingNode } = Reanimated;
|