From 2eeeb0ed364e460d957ac195b6396d691503f07d Mon Sep 17 00:00:00 2001 From: marihachi Date: Sat, 19 Dec 2020 21:09:23 +0900 Subject: [PATCH] Fix type of Hpml.pageVarUpdatedCallback (#6995) --- src/client/scripts/hpml/evaluator.ts | 2 +- src/client/scripts/hpml/lib.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/scripts/hpml/evaluator.ts b/src/client/scripts/hpml/evaluator.ts index bd7ec600c..dc6a6d5a4 100644 --- a/src/client/scripts/hpml/evaluator.ts +++ b/src/client/scripts/hpml/evaluator.ts @@ -22,7 +22,7 @@ export class Hpml { private pageVars: PageVar[]; private envVars: Record; public aiscript?: AiScript; - private pageVarUpdatedCallback; + public pageVarUpdatedCallback?: values.VFn; public canvases: Record = {}; public vars: Ref> = ref({}); public page: Record; diff --git a/src/client/scripts/hpml/lib.ts b/src/client/scripts/hpml/lib.ts index 9708581a1..5ec507841 100644 --- a/src/client/scripts/hpml/lib.ts +++ b/src/client/scripts/hpml/lib.ts @@ -19,7 +19,7 @@ Chart.pluginService.register({ export function initLib(hpml: Hpml) { return { 'MkPages:updated': values.FN_NATIVE(([callback]) => { - hpml.pageVarUpdatedCallback = callback; + hpml.pageVarUpdatedCallback = (callback as values.VFn); }), 'MkPages:get_canvas': values.FN_NATIVE(([id]) => { utils.assertString(id);