Skip to content

Commit

Permalink
update Image declaration (DefinitelyTyped#60032)
Browse files Browse the repository at this point in the history
*getSize* and *prefetch* of `Image` should be static functions.
  • Loading branch information
JerryChu authored Apr 26, 2022
1 parent 7b3903d commit 839e3be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types/hippy__react/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ interface ImageProps extends LayoutableProps, ClickableProps, TouchableProps {
onProgress?(evt: { nativeEvent: { loaded: number; total: number } }): void;
}
declare class Image extends React.Component<ImageProps> {
getSize: (
static getSize: (
uri: string,
success: (width: number, height: number) => void,
failure?: (err: typeof Error) => void,
) => void;
prefetch: (url: string) => void;
static prefetch: (url: string) => void;
static get resizeMode(): {
contain: 'contain';
cover: 'cover';
Expand Down

0 comments on commit 839e3be

Please sign in to comment.