From 57a84c961bed8dcfb7c8dccb23722b36ac68f1bb Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Thu, 5 Dec 2024 18:23:35 +0700 Subject: [PATCH] feat(libraries/modules/common): export `filePicker` --- libraries/modules/src/common/index.ts | 1 + libraries/modules/src/types.d.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/libraries/modules/src/common/index.ts b/libraries/modules/src/common/index.ts index 9fea013..b90af69 100644 --- a/libraries/modules/src/common/index.ts +++ b/libraries/modules/src/common/index.ts @@ -54,6 +54,7 @@ export const toasts = findByFilePath( 'modules/toast/native/ToastActionCreators.tsx', true, )! +export const filePicker = findByProps('handleDocumentSelection')! export const messages = findByProps('sendBotMessage')! export const NavigationStack = findByProps('createStackNavigator')! diff --git a/libraries/modules/src/types.d.ts b/libraries/modules/src/types.d.ts index 57ce319..98388d6 100644 --- a/libraries/modules/src/types.d.ts +++ b/libraries/modules/src/types.d.ts @@ -181,6 +181,18 @@ export type LazyModule = T extends unknown | undefined /// COMMON export namespace DiscordModules { + export interface FilePickerFile { + fileCopyUri: string | null + size: number + name: string + type: string + uri: string + } + + export interface FilePickerUtils { + handleDocumentSelection(options?: { pickMultiple?: boolean }): Promise + } + export interface ToastActionCreators { open(options: { key: string