Fix CachedImage onError typescript declaration
Closed this issue · 2 comments
skam22 commented
onError prop has incorrect typescript declaration, causes an error to be shown in IDE:
Here is the diff that solved my problem:
diff --git a/node_modules/@georstat/react-native-image-cache/lib/typescript/CachedImage.d.ts b/node_modules/@georstat/react-native-image-cache/lib/typescript/CachedImage.d.ts
index 3a5f97b..dffa141 100644
--- a/node_modules/@georstat/react-native-image-cache/lib/typescript/CachedImage.d.ts
+++ b/node_modules/@georstat/react-native-image-cache/lib/typescript/CachedImage.d.ts
@@ -4,7 +4,7 @@ declare const defaultProps: {
onError: () => void;
};
declare const CachedImage: {
- (props: IProps & typeof defaultProps): JSX.Element;
+ (props: IProps | typeof defaultProps): JSX.Element;
defaultProps: {
onError: () => void;
};
This issue body was partially generated by patch-package.
efstathiosntonas commented
Hi @skam22 , can you please create a PR for this? Thanks
ps. sorry for the late reply