forked from mirrors/misskey
refactor(frontend): フロントエンドの型エラー解消(途中まで) (#16539)
* fix(frontend): FormLinkをボタンとして使用した際にエラーが出る問題を修正 * refactor(frontend): フロントエンドの型エラー解消 * remove unused ts-expect-error * migrate * remove unrelated changes * fix lint * more type fixes
This commit is contained in:
@@ -72,7 +72,7 @@ import { getStaticImageUrl } from '@/utility/media-proxy.js';
|
||||
|
||||
const props = defineProps<{
|
||||
showing: boolean;
|
||||
q: string;
|
||||
q: string | Misskey.entities.UserDetailed;
|
||||
source: HTMLElement;
|
||||
}>();
|
||||
|
||||
@@ -99,10 +99,11 @@ async function fetchUser() {
|
||||
user.value = props.q;
|
||||
error.value = false;
|
||||
} else {
|
||||
const query: Omit<Misskey.entities.UsersShowRequest, 'userIds'> = props.q.startsWith('@') ?
|
||||
const query: Misskey.entities.UsersShowRequest = props.q.startsWith('@') ?
|
||||
Misskey.acct.parse(props.q.substring(1)) :
|
||||
{ userId: props.q };
|
||||
|
||||
// @ts-expect-error payloadの引数側の型が正常に解決されない
|
||||
misskeyApi('users/show', query).then(res => {
|
||||
if (!props.showing) return;
|
||||
user.value = res;
|
||||
|
||||
Reference in New Issue
Block a user