From ecae8a29089130e0d30ef91c69077a17e9d2b67d Mon Sep 17 00:00:00 2001 From: Iwo Plaza Date: Thu, 23 Jan 2025 10:32:59 -0800 Subject: [PATCH] Remove seemingly unused `AnimatedWeb` file. (#48894) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48894 ## Motivation In our efforts to migrate the RN codebase to modern Flow (to enable ingestion by modern Flow tooling) I stumbled upon the `AnimatedWeb.js` file, which does not seems to be imported anywhere throughout the monorepo. Searching on GitHub for imports to this file in OSS projects returned no results. In case this file has actual uses outside of Meta (e.g. in OSS), I'll abandon the diff 🙌 ## This diff - Removes `Libraries/Animated/AnimatedWeb.js` file Changelog: [General][Breaking] Removed `Libraries/Animated/AnimatedWeb.js` file. Reviewed By: cortinico Differential Revision: D68558237 fbshipit-source-id: 319b5e59eb83e518cd123b9f74642e90f0003a4a --- .../Libraries/Animated/AnimatedWeb.js | 44 ------------------- .../__snapshots__/public-api-test.js.snap | 10 ----- 2 files changed, 54 deletions(-) delete mode 100644 packages/react-native/Libraries/Animated/AnimatedWeb.js diff --git a/packages/react-native/Libraries/Animated/AnimatedWeb.js b/packages/react-native/Libraries/Animated/AnimatedWeb.js deleted file mode 100644 index 167dafa6fe9..00000000000 --- a/packages/react-native/Libraries/Animated/AnimatedWeb.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow strict-local - */ - -'use strict'; - -import type {AnimatedComponentType} from './createAnimatedComponent'; - -import AnimatedImplementation from './AnimatedImplementation'; -import React from 'react'; - -export default { - ...AnimatedImplementation, - div: AnimatedImplementation.createAnimatedComponent< - React.PropsOf<'div'>, - mixed, - >( - /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive - * types. Plain intrinsic components can't be typed like this */ - 'div', - ) as AnimatedComponentType>, - span: AnimatedImplementation.createAnimatedComponent< - React.PropsOf<'span'>, - mixed, - >( - /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive - * types. Plain intrinsic components can't be typed like this */ - 'span', - ) as AnimatedComponentType>, - img: AnimatedImplementation.createAnimatedComponent< - React.PropsOf<'img'>, - mixed, - >( - /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive - * types. Plain intrinsic components can't be typed like this */ - 'img', - ) as AnimatedComponentType>, -}; diff --git a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap index d9ddc1a33b9..ba15b1b6a89 100644 --- a/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap +++ b/packages/react-native/Libraries/__tests__/__snapshots__/public-api-test.js.snap @@ -279,16 +279,6 @@ exports[`public API should not change unintentionally Libraries/Animated/Animate " `; -exports[`public API should not change unintentionally Libraries/Animated/AnimatedWeb.js 1`] = ` -"declare export default { - ...AnimatedImplementation, - div: AnimatedComponentType>, - span: AnimatedComponentType>, - img: AnimatedComponentType>, -}; -" -`; - exports[`public API should not change unintentionally Libraries/Animated/Easing.js 1`] = ` "declare const Easing: { step0(n: number): number,