summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/select-file.ts
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2024-11-22 12:29:04 +0000
committerdakkar <dakkar@thenautilus.net>2024-11-22 12:29:04 +0000
commitbc816cb166d907d38eb096a02c5f4f57d9a2f1a0 (patch)
treea0e6b1dfeed8aa2b0543846eb65b8aae0ce631ad /packages/frontend/src/scripts/select-file.ts
parentbetter wording for moderator inactivity messages (diff)
parentRelease: 2024.11.0 (diff)
downloadsharkey-bc816cb166d907d38eb096a02c5f4f57d9a2f1a0.tar.gz
sharkey-bc816cb166d907d38eb096a02c5f4f57d9a2f1a0.tar.bz2
sharkey-bc816cb166d907d38eb096a02c5f4f57d9a2f1a0.zip
Merge tag '2024.11.0' into feature/2024.10
Diffstat (limited to 'packages/frontend/src/scripts/select-file.ts')
-rw-r--r--packages/frontend/src/scripts/select-file.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/frontend/src/scripts/select-file.ts b/packages/frontend/src/scripts/select-file.ts
index 9aa38178b2..b037aa8acc 100644
--- a/packages/frontend/src/scripts/select-file.ts
+++ b/packages/frontend/src/scripts/select-file.ts
@@ -80,7 +80,7 @@ export function chooseFileFromUrl(): Promise<Misskey.entities.DriveFile> {
});
}
-function select(src: any, label: string | null, multiple: boolean): Promise<Misskey.entities.DriveFile[]> {
+function select(src: HTMLElement | EventTarget | null, label: string | null, multiple: boolean): Promise<Misskey.entities.DriveFile[]> {
return new Promise((res, rej) => {
const keepOriginal = ref(defaultStore.state.keepOriginalUploading);
@@ -107,10 +107,10 @@ function select(src: any, label: string | null, multiple: boolean): Promise<Miss
});
}
-export function selectFile(src: any, label: string | null = null): Promise<Misskey.entities.DriveFile> {
+export function selectFile(src: HTMLElement | EventTarget | null, label: string | null = null): Promise<Misskey.entities.DriveFile> {
return select(src, label, false).then(files => files[0]);
}
-export function selectFiles(src: any, label: string | null = null): Promise<Misskey.entities.DriveFile[]> {
+export function selectFiles(src: HTMLElement | EventTarget | null, label: string | null = null): Promise<Misskey.entities.DriveFile[]> {
return select(src, label, true);
}