<commit_before>import * as React from "react";

import { Animated, View, NativeSyntheticEvent, NativeScrollEvent } from "react-native";

function TestAnimatedAPI() {
    // Value
    const v1 = new Animated.Value(0);
    const v2 = new Animated.Value(0);

    v1.setValue(0.1);

    v1.addListener(e => {
        const n: number = e.value;
    });

    const v200 = v1.interpolate({
        inputRange: [0, 1],
        outputRange: [0, 200],
    });

    // ValueXY
    const position = new Animated.ValueXY({ x: 0, y: 0 });

    // Animation functions
    const spring1 = Animated.spring(v1, {
        toValue: 0.5,
        tension: 10,
    });

    const springXY = Animated.spring(position, {
        toValue: {
            x: 1,
            y: 2,
        },
    });

    spring1.start();
    spring1.stop();

    Animated.parallel([Animated.spring(v1, { toValue: 1 }), Animated.spring(v2, { toValue: 1 })], {
        stopTogether: true,
    });

    Animated.decay(v1, {
        velocity: 2,
    });

    Animated.timing(v1, {
        toValue: 1,
        duration: 100,
        delay: 100,
        easing: v => v,
    });

    Animated.add(v1, v2);
    Animated.divide(v1, v2);
    Animated.multiply(v1, v2);
    Animated.modulo(v1, 2);

    Animated.delay(100);

    Animated.sequence([spring1, springXY]);

    Animated.stagger(100, [spring1, springXY]);
    
    const listener = (e?: NativeSyntheticEvent<NativeScrollEvent>) => {
        if (e) {
            console.warn(e.nativeEvent.contentOffset.y);
        }
    };

    Animated.event(
        [{ nativeEvent: { contentOffset: { y: v1 } } }],
        { useNativeDriver: true, listener },
    );

    return (
        <View>
            <Animated.View
                style={[
                    position.getLayout(),
                    {
                        opacity: v1,<commit_msg>Update animated.tsx<commit_after>import * as React from "react";

import { Animated, View, NativeSyntheticEvent, NativeScrollEvent } from "react-native";

function TestAnimatedAPI() {
    // Value
    const v1 = new Animated.Value(0);
    const v2 = new Animated.Value(0);

    v1.setValue(0.1);

    v1.addListener(e => {
        const n: number = e.value;
    });

    const v200 = v1.interpolate({
        inputRange: [0, 1],
        outputRange: [0, 200],
    });

    // ValueXY
    const position = new Animated.ValueXY({ x: 0, y: 0 });

    // Animation functions
    const spring1 = Animated.spring(v1, {
        toValue: 0.5,
        tension: 10,
    });

    const springXY = Animated.spring(position, {
        toValue: {
            x: 1,
            y: 2,
        },
    });

    spring1.start();
    spring1.stop();

    Animated.parallel([Animated.spring(v1, { toValue: 1 }), Animated.spring(v2, { toValue: 1 })], {
        stopTogether: true,
    });

    Animated.decay(v1, {
        velocity: 2,
    });

    Animated.timing(v1, {
        toValue: 1,
        duration: 100,
        delay: 100,
        easing: v => v,
    });

    Animated.add(v1, v2);
    Animated.divide(v1, v2);
    Animated.multiply(v1, v2);
    Animated.modulo(v1, 2);

    Animated.delay(100);

    Animated.sequence([spring1, springXY]);

    Animated.stagger(100, [spring1, springXY]);

    const listener = (e?: NativeSyntheticEvent<NativeScrollEvent>) => {
        if (e) {
            console.warn(e.nativeEvent.contentOffset.y);
        }
    };

    Animated.event(
        [{ nativeEvent: { contentOffset: { y: v1 } } }],
        { useNativeDriver: true, listener },
    );

    return (
        <View>
            <Animated.View
                style={[
                    position.getLayout(),
                    {
                        opacity: v1,
{'fraction_non_alphanumeric': 0.14382083108472746, 'fraction_numerical': 0.03345925526173772, 'mean_word_length': 1.8581341557440247, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5091568', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1210, 'n_words': 246}