diff options
| author | marihachi <marihachi0620@gmail.com> | 2020-12-19 21:09:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-19 21:09:23 +0900 |
| commit | 9f9194ab5c747ec2f51892aeefb4deb8f8d58925 (patch) | |
| tree | 679e9bee6e251e6bd72f9135cf745ab72398ffda /src/client/scripts/hpml | |
| parent | pageの選択肢が動作していない問題を修正 (diff) | |
| download | sharkey-9f9194ab5c747ec2f51892aeefb4deb8f8d58925.tar.gz sharkey-9f9194ab5c747ec2f51892aeefb4deb8f8d58925.tar.bz2 sharkey-9f9194ab5c747ec2f51892aeefb4deb8f8d58925.zip | |
Fix type of Hpml.pageVarUpdatedCallback (#6995)
Diffstat (limited to 'src/client/scripts/hpml')
| -rw-r--r-- | src/client/scripts/hpml/evaluator.ts | 2 | ||||
| -rw-r--r-- | 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 bd7ec600cd..dc6a6d5a4b 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<keyof typeof envVarsDef, any>; public aiscript?: AiScript; - private pageVarUpdatedCallback; + public pageVarUpdatedCallback?: values.VFn; public canvases: Record<string, HTMLCanvasElement> = {}; public vars: Ref<Record<string, any>> = ref({}); public page: Record<string, any>; diff --git a/src/client/scripts/hpml/lib.ts b/src/client/scripts/hpml/lib.ts index 9708581a11..5ec5078415 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); |