File tree Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Expand file tree Collapse file tree 2 files changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import type {
4
4
Float ,
5
5
WithDefault ,
6
6
BubblingEventHandler ,
7
+ Int32 ,
7
8
} from 'react-native/Libraries/Types/CodegenTypes' ;
8
9
9
10
type Headers = Readonly < { } >
@@ -23,8 +24,8 @@ type OnLoadEvent = Readonly<{
23
24
} >
24
25
25
26
type OnProgressEvent = Readonly < {
26
- loaded : Float ,
27
- total : Float ,
27
+ loaded : Int32 ,
28
+ total : Int32 ,
28
29
} >
29
30
30
31
interface NativeProps extends ViewProps {
@@ -34,7 +35,7 @@ interface NativeProps extends ViewProps {
34
35
onFastImageLoadStart ?: BubblingEventHandler < Readonly < { } > > ,
35
36
onFastImageProgress ?: BubblingEventHandler < OnProgressEvent > ,
36
37
source ?: FastImageSource ,
37
- defaultSource ?: string ,
38
+ defaultSource ?: string | null ,
38
39
resizeMode ?: WithDefault < 'contain' | 'cover' | 'stretch' | 'center' , 'cover' > ,
39
40
tintColor ?: ColorValue ,
40
41
}
Original file line number Diff line number Diff line change 3
3
View ,
4
4
Image ,
5
5
NativeModules ,
6
- requireNativeComponent ,
7
6
StyleSheet ,
8
7
FlexStyle ,
9
8
LayoutChangeEvent ,
@@ -16,6 +15,7 @@ import {
16
15
ViewProps ,
17
16
ColorValue ,
18
17
} from 'react-native'
18
+ import FastImageView from './FastImageViewNativeComponent' ;
19
19
20
20
export type ResizeMode = 'contain' | 'cover' | 'stretch' | 'center'
21
21
@@ -260,19 +260,4 @@ const styles = StyleSheet.create({
260
260
} ,
261
261
} )
262
262
263
- // Types of requireNativeComponent are not correct.
264
- const FastImageView = ( requireNativeComponent as any ) (
265
- 'FastImageView' ,
266
- FastImage ,
267
- {
268
- nativeOnly : {
269
- onFastImageLoadStart : true ,
270
- onFastImageProgress : true ,
271
- onFastImageLoad : true ,
272
- onFastImageError : true ,
273
- onFastImageLoadEnd : true ,
274
- } ,
275
- } ,
276
- )
277
-
278
263
export default FastImage
You can’t perform that action at this time.
0 commit comments