Skip to content

Commit c87701b

Browse files
elicwhitefacebook-github-bot
authored andcommitted
Flowtype ProgressViewIOS
Reviewed By: yungsters Differential Revision: D7985969 fbshipit-source-id: d351ebc26e7be2741c93ce462ae59aa13d0c1f27
1 parent 1c66cdc commit c87701b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,28 @@
1313
const Image = require('Image');
1414
const NativeMethodsMixin = require('NativeMethodsMixin');
1515
const React = require('React');
16+
const ReactNative = require('ReactNative');
1617
const PropTypes = require('prop-types');
1718
const StyleSheet = require('StyleSheet');
1819
const ViewPropTypes = require('ViewPropTypes');
1920

2021
const createReactClass = require('create-react-class');
2122
const requireNativeComponent = require('requireNativeComponent');
2223

24+
import type {ImageSource} from 'ImageSource';
25+
import type {ColorValue} from 'StyleSheetTypes';
26+
import type {ViewProps} from 'ViewPropTypes';
27+
28+
type Props = $ReadOnly<{|
29+
...ViewProps,
30+
progressViewStyle?: ?('default' | 'bar'),
31+
progress?: ?number,
32+
progressTintColor?: ?ColorValue,
33+
trackTintColor?: ?string,
34+
progressImage?: ?ImageSource,
35+
trackImage?: ?ImageSource,
36+
|}>;
37+
2338
/**
2439
* Use `ProgressViewIOS` to render a UIProgressView on iOS.
2540
*/
@@ -81,4 +96,6 @@ const RCTProgressView = requireNativeComponent(
8196
ProgressViewIOS,
8297
);
8398

84-
module.exports = ProgressViewIOS;
99+
module.exports = ((ProgressViewIOS: any): Class<
100+
ReactNative.NativeComponent<Props>,
101+
>);

0 commit comments

Comments
 (0)