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 {
44 Float ,
55 WithDefault ,
66 BubblingEventHandler ,
7+ Int32 ,
78} from 'react-native/Libraries/Types/CodegenTypes' ;
89
910type Headers = Readonly < { } >
@@ -23,8 +24,8 @@ type OnLoadEvent = Readonly<{
2324 } >
2425
2526type OnProgressEvent = Readonly < {
26- loaded : Float ,
27- total : Float ,
27+ loaded : Int32 ,
28+ total : Int32 ,
2829 } >
2930
3031interface NativeProps extends ViewProps {
@@ -34,7 +35,7 @@ interface NativeProps extends ViewProps {
3435 onFastImageLoadStart ?: BubblingEventHandler < Readonly < { } > > ,
3536 onFastImageProgress ?: BubblingEventHandler < OnProgressEvent > ,
3637 source ?: FastImageSource ,
37- defaultSource ?: string ,
38+ defaultSource ?: string | null ,
3839 resizeMode ?: WithDefault < 'contain' | 'cover' | 'stretch' | 'center' , 'cover' > ,
3940 tintColor ?: ColorValue ,
4041}
Original file line number Diff line number Diff line change 33 View ,
44 Image ,
55 NativeModules ,
6- requireNativeComponent ,
76 StyleSheet ,
87 FlexStyle ,
98 LayoutChangeEvent ,
@@ -16,6 +15,7 @@ import {
1615 ViewProps ,
1716 ColorValue ,
1817} from 'react-native'
18+ import FastImageView from './FastImageViewNativeComponent' ;
1919
2020export type ResizeMode = 'contain' | 'cover' | 'stretch' | 'center'
2121
@@ -260,19 +260,4 @@ const styles = StyleSheet.create({
260260 } ,
261261} )
262262
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-
278263export default FastImage
You can’t perform that action at this time.
0 commit comments