mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Replace $FlowFixMe in AnimatedWeb (#48633)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48633 Changelog: [General][Changed] - Improved types in AnimatedWeb Reviewed By: huntie Differential Revision: D68092072 fbshipit-source-id: 396efffc64030b0b2d4085f969b92c422b227c0d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2d320fbd76
commit
647ca90a30
+27
-9
@@ -10,17 +10,35 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
import type {AnimatedComponentType} from './createAnimatedComponent';
|
||||
|
||||
import AnimatedImplementation from './AnimatedImplementation';
|
||||
import React from 'react';
|
||||
|
||||
export default {
|
||||
...AnimatedImplementation,
|
||||
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
|
||||
* types. Plain intrinsic components can't be typed like this */
|
||||
div: (AnimatedImplementation.createAnimatedComponent('div'): $FlowFixMe),
|
||||
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
|
||||
* types. Plain intrinsic components can't be typed like this */
|
||||
span: (AnimatedImplementation.createAnimatedComponent('span'): $FlowFixMe),
|
||||
/* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive
|
||||
* types. Plain intrinsic components can't be typed like this */
|
||||
img: (AnimatedImplementation.createAnimatedComponent('img'): $FlowFixMe),
|
||||
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<React.PropsOf<'div'>>,
|
||||
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<React.PropsOf<'span'>>,
|
||||
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<React.PropsOf<'img'>>,
|
||||
};
|
||||
|
||||
@@ -342,9 +342,9 @@ 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: $FlowFixMe,
|
||||
span: $FlowFixMe,
|
||||
img: $FlowFixMe,
|
||||
div: AnimatedComponentType<React.PropsOf<\\"div\\">>,
|
||||
span: AnimatedComponentType<React.PropsOf<\\"span\\">>,
|
||||
img: AnimatedComponentType<React.PropsOf<\\"img\\">>,
|
||||
};
|
||||
"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user