diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-28 13:24:25 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-28 13:24:25 +0900 |
| commit | bca3602da2764a3ee044e0e836666b65dad435ef (patch) | |
| tree | 23d7efa4c6925ade8b4152e72b9203c978150abf /packages/frontend | |
| parent | refactor (diff) | |
| download | misskey-bca3602da2764a3ee044e0e836666b65dad435ef.tar.gz misskey-bca3602da2764a3ee044e0e836666b65dad435ef.tar.bz2 misskey-bca3602da2764a3ee044e0e836666b65dad435ef.zip | |
refactor
Diffstat (limited to 'packages/frontend')
| -rw-r--r-- | packages/frontend/src/components/MkStreamingNotificationsTimeline.vue | 2 | ||||
| -rw-r--r-- | packages/frontend/src/pages/flash/flash.vue | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue b/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue index 93ffee8d98..15e8e2105f 100644 --- a/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue +++ b/packages/frontend/src/components/MkStreamingNotificationsTimeline.vue @@ -59,7 +59,7 @@ import { isSeparatorNeeded, getSeparatorInfo } from '@/utility/timeline-date-sep import { Paginator } from '@/utility/paginator.js'; const props = defineProps<{ - excludeTypes?: typeof notificationTypes[number][]; + excludeTypes?: typeof notificationTypes[number][] | null; }>(); const rootEl = useTemplateRef('rootEl'); diff --git a/packages/frontend/src/pages/flash/flash.vue b/packages/frontend/src/pages/flash/flash.vue index 560d2a46ea..f318a9f817 100644 --- a/packages/frontend/src/pages/flash/flash.vue +++ b/packages/frontend/src/pages/flash/flash.vue @@ -196,13 +196,13 @@ async function run() { const isLegacy = !flash.value.script.replaceAll(' ', '').startsWith('///@1.0.0'); - const { Interpreter, Parser, values } = isLegacy ? await import('@syuilo/aiscript-0-19-0') : await import('@syuilo/aiscript'); + const { Interpreter, Parser, values } = isLegacy ? (await import('@syuilo/aiscript-0-19-0') as any) : await import('@syuilo/aiscript'); const parser = new Parser(); components.value = []; - aiscript.value = new Interpreter({ + const interpreter = new Interpreter({ ...createAiScriptEnv({ storageKey: 'flash:' + flash.value.id, }), @@ -221,6 +221,8 @@ async function run() { }, }); + aiscript.value = interpreter; + let ast; try { ast = parser.parse(flash.value.script); @@ -232,8 +234,8 @@ async function run() { return; } try { - await aiscript.value.exec(ast); - } catch (err) { + await interpreter.exec(ast); + } catch (err: any) { os.alert({ type: 'error', title: 'AiScript Error', |