|
8 | 8 | * @flow
|
9 | 9 | */
|
10 | 10 |
|
11 |
| -'use strict'; |
12 | 11 | import DeprecatedImageStylePropTypes from '../../DeprecatedPropTypes/DeprecatedImageStylePropTypes';
|
13 | 12 | import DeprecatedTextStylePropTypes from '../../DeprecatedPropTypes/DeprecatedTextStylePropTypes';
|
14 | 13 | import DeprecatedViewStylePropTypes from '../../DeprecatedPropTypes/DeprecatedViewStylePropTypes';
|
| 14 | +import type {AnyAttributeType} from '../../Renderer/shims/ReactNativeTypes'; |
15 | 15 | import processColor from '../../StyleSheet/processColor';
|
16 | 16 | import processTransform from '../../StyleSheet/processTransform';
|
17 | 17 | import sizesDiffer from '../../Utilities/differ/sizesDiffer';
|
18 | 18 |
|
19 |
| -type ReturnBoolType = <V>(V) => true; |
20 |
| -type BoolifiedDeprecatedViewStylePropTypes = $ObjMap< |
21 |
| - typeof DeprecatedViewStylePropTypes, |
22 |
| - ReturnBoolType, |
23 |
| ->; |
24 |
| -type BoolifiedDeprecatedTextStylePropTypes = $ObjMapi< |
25 |
| - typeof DeprecatedTextStylePropTypes, |
26 |
| - ReturnBoolType, |
27 |
| ->; |
28 |
| -type BoolifiedDeprecatedImageStylePropTypes = $ObjMapi< |
29 |
| - typeof DeprecatedImageStylePropTypes, |
30 |
| - ReturnBoolType, |
31 |
| ->; |
32 |
| - |
33 |
| -type StyleAttributesType = { |
34 |
| - ...BoolifiedDeprecatedViewStylePropTypes, |
35 |
| - ...BoolifiedDeprecatedTextStylePropTypes, |
36 |
| - ...BoolifiedDeprecatedImageStylePropTypes, |
37 |
| - transform: $ReadOnly<{|process: typeof processTransform|}> | true, |
38 |
| - shadowOffset: $ReadOnly<{|diff: typeof sizesDiffer|}> | true, |
39 |
| - backgroundColor: typeof colorAttributes | true, |
40 |
| - borderBottomColor: typeof colorAttributes | true, |
41 |
| - borderColor: typeof colorAttributes | true, |
42 |
| - borderLeftColor: typeof colorAttributes | true, |
43 |
| - borderRightColor: typeof colorAttributes | true, |
44 |
| - borderTopColor: typeof colorAttributes | true, |
45 |
| - borderStartColor: typeof colorAttributes | true, |
46 |
| - borderEndColor: typeof colorAttributes | true, |
47 |
| - color: typeof colorAttributes | true, |
48 |
| - shadowColor: typeof colorAttributes | true, |
49 |
| - textDecorationColor: typeof colorAttributes | true, |
50 |
| - tintColor: typeof colorAttributes | true, |
51 |
| - textShadowColor: typeof colorAttributes | true, |
52 |
| - overlayColor: typeof colorAttributes | true, |
53 |
| - ... |
54 |
| -}; |
55 |
| - |
56 |
| -const ReactNativeStyleAttributes: StyleAttributesType = {}; |
| 19 | +const ReactNativeStyleAttributes: {[string]: AnyAttributeType} = {}; |
57 | 20 |
|
58 | 21 | for (const attributeName of Object.keys({
|
59 | 22 | ...DeprecatedViewStylePropTypes,
|
|
0 commit comments