mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 20:01:01 +08:00
Enable flow in react-native-implementation
Summary:
I noticed I didn't get type defs anymore for react-native. Looks like it is broken since we removed the .flow file in 3e153b2a5b. To fix it we can now enable flow in react-native-implementation since it now supports properties.
**Test plan**
Tested that I get type hints when using imports from react-native in a project.
Closes https://github.com/facebook/react-native/pull/12917
Differential Revision: D4704753
Pulled By: ericvicenti
fbshipit-source-id: cf882588d7f371931de8d7861a1a6d50f6c425dc
This commit is contained in:
committed by
Facebook Github Bot
parent
9a51fa8e15
commit
c7387fefc8
@@ -194,7 +194,7 @@ var Image = React.createClass({
|
||||
getSize(
|
||||
url: string,
|
||||
success: (width: number, height: number) => void,
|
||||
failure: (error: any) => void,
|
||||
failure?: (error: any) => void,
|
||||
) {
|
||||
return ImageLoader.getSize(url)
|
||||
.then(function(sizes) {
|
||||
|
||||
@@ -304,7 +304,7 @@ const Image = React.createClass({
|
||||
getSize: function(
|
||||
uri: string,
|
||||
success: (width: number, height: number) => void,
|
||||
failure: (error: any) => void,
|
||||
failure?: (error: any) => void,
|
||||
) {
|
||||
ImageViewManager.getSize(uri, success, failure || function() {
|
||||
console.warn('Failed to get size for image: ' + uri);
|
||||
|
||||
Reference in New Issue
Block a user