|
10 | 10 |
|
11 | 11 | 'use strict';
|
12 | 12 |
|
| 13 | +import type {AnimatedComponentType} from './createAnimatedComponent'; |
| 14 | + |
13 | 15 | import AnimatedImplementation from './AnimatedImplementation';
|
| 16 | +import React from 'react'; |
14 | 17 |
|
15 | 18 | export default {
|
16 | 19 | ...AnimatedImplementation,
|
17 |
| - /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive |
18 |
| - * types. Plain intrinsic components can't be typed like this */ |
19 |
| - div: (AnimatedImplementation.createAnimatedComponent('div'): $FlowFixMe), |
20 |
| - /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive |
21 |
| - * types. Plain intrinsic components can't be typed like this */ |
22 |
| - span: (AnimatedImplementation.createAnimatedComponent('span'): $FlowFixMe), |
23 |
| - /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive |
24 |
| - * types. Plain intrinsic components can't be typed like this */ |
25 |
| - img: (AnimatedImplementation.createAnimatedComponent('img'): $FlowFixMe), |
| 20 | + div: AnimatedImplementation.createAnimatedComponent< |
| 21 | + React.PropsOf<'div'>, |
| 22 | + mixed, |
| 23 | + >( |
| 24 | + /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive |
| 25 | + * types. Plain intrinsic components can't be typed like this */ |
| 26 | + 'div', |
| 27 | + ) as AnimatedComponentType<React.PropsOf<'div'>>, |
| 28 | + span: AnimatedImplementation.createAnimatedComponent< |
| 29 | + React.PropsOf<'span'>, |
| 30 | + mixed, |
| 31 | + >( |
| 32 | + /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive |
| 33 | + * types. Plain intrinsic components can't be typed like this */ |
| 34 | + 'span', |
| 35 | + ) as AnimatedComponentType<React.PropsOf<'span'>>, |
| 36 | + img: AnimatedImplementation.createAnimatedComponent< |
| 37 | + React.PropsOf<'img'>, |
| 38 | + mixed, |
| 39 | + >( |
| 40 | + /* $FlowFixMe[incompatible-call] createAnimatedComponent expects to receive |
| 41 | + * types. Plain intrinsic components can't be typed like this */ |
| 42 | + 'img', |
| 43 | + ) as AnimatedComponentType<React.PropsOf<'img'>>, |
26 | 44 | };
|
0 commit comments