import type { HostComponent, ViewProps, ColorValue } from 'react-native'; import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; import type { DirectEventHandler, Int32, Double } from 'react-native/Libraries/Types/CodegenTypes'; type HeaderEntry = Readonly<{ key: string; value: string }>; type Source = Readonly<{ uri: string; headers?: ReadonlyArray; priority?: string; cache?: string; }>; export interface NativeProps extends ViewProps { source?: Source; resizeMode?: string; tintColor?: ColorValue; borderRadius?: Double; onFastCacheLoadStart?: DirectEventHandler<{}>; onFastCacheProgress?: DirectEventHandler>; onFastCacheLoad?: DirectEventHandler>; onFastCacheError?: DirectEventHandler>; onFastCacheLoadEnd?: DirectEventHandler<{}>; } // @ts-expect-error useLegacyViewManagerAdapter is supported by RN codegen runtime export default codegenNativeComponent('FastCacheImage', { interfaceOnly: false, paperComponentName: 'FastCacheImage', useLegacyViewManagerAdapter: true, }) as HostComponent;