summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/select-file.ts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-10-31 13:46:42 +0900
committerGitHub <noreply@github.com>2024-10-31 13:46:42 +0900
commit17d9aca5a7ec6149a8dbf0c1607c81ab188e7015 (patch)
tree78752526e76f518be29ebe5bdbd0176cd2087796 /packages/frontend/src/scripts/select-file.ts
parentfix(frontend): 一部のノート表示で設定にかかわらずセンシ... (diff)
downloadmisskey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.tar.gz
misskey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.tar.bz2
misskey-17d9aca5a7ec6149a8dbf0c1607c81ab188e7015.zip
refactor(frontend): asとanyをすぐなおせる範囲で除去 (#14848)
* refactor(frontend): できるだけanyを除去 * refactor * lint * fix * remove unused * Update packages/frontend/src/components/MkReactionsViewer.details.vue * Update packages/frontend/src/components/MkUsersTooltip.vue --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
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);
}