react-native-documents / document-picker

Document Picker for React Native
https://react-native-documents.github.io/
MIT License
1.35k stars 440 forks source link

[typescript] DocumentPickerOptions is missing in v6 #455

Closed artyorsh closed 3 years ago

artyorsh commented 3 years ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-native-document-picker@6.0.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-document-picker/lib/typescript/index.d.ts b/node_modules/react-native-document-picker/lib/typescript/index.d.ts
index 0e20f39..10c3e27 100644
--- a/node_modules/react-native-document-picker/lib/typescript/index.d.ts
+++ b/node_modules/react-native-document-picker/lib/typescript/index.d.ts
@@ -56,7 +56,7 @@ export declare const types: Readonly<{
 export declare type DirectoryPickerResponse = {
     uri: string;
 };
-declare type DocumentPickerOptions<OS extends SupportedPlatforms> = {
+export declare type DocumentPickerOptions<OS extends SupportedPlatforms> = {
     type?: string | PlatformTypes[OS][keyof PlatformTypes[OS]] | Array<PlatformTypes[OS][keyof PlatformTypes[OS]] | string>;
     mode?: 'import' | 'open';
     copyTo?: 'cachesDirectory' | 'documentDirectory';

This issue body was partially generated by patch-package.

vonovak commented 3 years ago

Hello, since you investigated the issue, would you please submit a PR with a fix? Thank you! πŸ™‚