From a8abb03d1785791ab40e57ab49c87640914532c9 Mon Sep 17 00:00:00 2001 From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 6 Jul 2025 19:36:11 +0900 Subject: refactor(frontend): Formまわりの型強化 (#16260) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor(frontend): Formまわりの型強化 * fix * avoid non-null assertion and add null check for safety * refactor * avoid non-null assertion and add null check for safety * Update clip.vue --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com> --- packages/frontend/src/plugin.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/frontend/src/plugin.ts') diff --git a/packages/frontend/src/plugin.ts b/packages/frontend/src/plugin.ts index 6010180e68..d6007a27ed 100644 --- a/packages/frontend/src/plugin.ts +++ b/packages/frontend/src/plugin.ts @@ -14,12 +14,13 @@ import * as os from '@/os.js'; import { misskeyApi } from '@/utility/misskey-api.js'; import { i18n } from '@/i18n.js'; import { prefer } from '@/preferences.js'; +import type { FormWithDefault } from '@/utility/form.js'; export type Plugin = { installId: string; name: string; active: boolean; - config?: Record; + config?: FormWithDefault; configData: Record; src: string | null; version: string; @@ -240,7 +241,7 @@ async function launchPlugin(id: Plugin['installId']): Promise { pluginLogs.value.set(plugin.installId, []); function systemLog(message: string, isError = false): void { - pluginLogs.value.get(plugin.installId)?.push({ + pluginLogs.value.get(plugin!.installId)?.push({ at: Date.now(), isSystem: true, message, -- cgit v1.2.3-freya