diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a2eb459933..2d3337c96d 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -3698,8 +3698,9 @@ export class Image extends ImageBase { } export interface ImageBackgroundProps extends ImagePropsBase { - style?: StyleProp; imageStyle?: StyleProp; + style?: StyleProp; + imageRef?(image: Image): void; } declare class ImageBackgroundComponent extends React.Component {} diff --git a/types/react-native/test/index.tsx b/types/react-native/test/index.tsx index a339bb0e84..818be960c7 100644 --- a/types/react-native/test/index.tsx +++ b/types/react-native/test/index.tsx @@ -28,6 +28,7 @@ import { ImageLoadEventData, ImageErrorEventData, ImageResolvedAssetSource, + ImageBackground, InteractionManager, ListView, ListViewDataSource, @@ -661,6 +662,25 @@ export class ImageTest extends React.Component { } } +export class ImageBackgroundProps extends React.Component { + private _imageRef: Image | null = null; + + setImageRef = (image: Image) => { + this._imageRef = image; + } + + render() { + return ( + + + + ); + } +} + class StylePropsTest extends React.PureComponent { render() { const uri = 'https://seeklogo.com/images/T/typescript-logo-B29A3F462D-seeklogo.com.png'