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>
This commit is contained in:
かっこかり 2024-10-31 13:46:42 +09:00 committed by GitHub
parent 7fc8a2a7b0
commit 17d9aca5a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 250 additions and 192 deletions

View file

@ -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);
}