We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Today I used patch-package to patch @baronha/react-native-multiple-image-picker@1.1.6 for the project I'm working on.
@baronha/react-native-multiple-image-picker@1.1.6
I notice that openPicker type is not correct in TypeScript. I want to use singleSelectedMode, but TypeScript suggests MultiPicker.
Here is the diff that solved my problem:
diff --git a/node_modules/@baronha/react-native-multiple-image-picker/src/index.d.ts b/node_modules/@baronha/react-native-multiple-image-picker/src/index.d.ts index 690360c..f8ec0d3 100644 --- a/node_modules/@baronha/react-native-multiple-image-picker/src/index.d.ts +++ b/node_modules/@baronha/react-native-multiple-image-picker/src/index.d.ts @@ -93,16 +93,15 @@ interface MediaTypeResults { [MediaType.ALL]: ImageResults | VideoResults; } -export type IOpenPicker = <T extends MediaType = MediaType.ALL>( - options: MultiPickerOptions & MediaTypeOptions[T] & Options<T> -) => Promise<MediaTypeResults[T][]>; - type MultipleImagePickerType = { - openPicker: IOpenPicker; + openPicker<T extends MediaType = MediaType.ALL>( + options: MultiPickerOptions & MediaTypeOptions[T] & Options<T> + ): Promise<MediaTypeResults[T][]>; + openPicker<T extends MediaType = MediaType.ALL>( + options: SinglePickerOptions & MediaTypeOptions[T] & Options<T> + ): Promise<MediaTypeResults[T]>; }; const { MultipleImagePicker } = NativeModules; -export const { openPicker } = MultipleImagePicker as MultipleImagePickerType; - export default MultipleImagePicker as MultipleImagePickerType;
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
It would be great if I could get PR from you
Sorry, something went wrong.
Thanks! I make PR #132
Successfully merging a pull request may close this issue.
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Today I used patch-package to patch
@baronha/react-native-multiple-image-picker@1.1.6
for the project I'm working on.I notice that openPicker type is not correct in TypeScript.
I want to use singleSelectedMode, but TypeScript suggests MultiPicker.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: