From f1fd1d2585bd5230caea4c7b8814c2cf007e57cc Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Thu, 22 Dec 2022 16:01:59 +0900 Subject: style: add missing trailing commas (#9387) --- packages/client/src/scripts/hpml/evaluator.ts | 6 +++--- packages/client/src/scripts/hpml/index.ts | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'packages/client/src/scripts/hpml') diff --git a/packages/client/src/scripts/hpml/evaluator.ts b/packages/client/src/scripts/hpml/evaluator.ts index 10023edffb..196b3142a1 100644 --- a/packages/client/src/scripts/hpml/evaluator.ts +++ b/packages/client/src/scripts/hpml/evaluator.ts @@ -35,7 +35,7 @@ export class Hpml { if (this.opts.enableAiScript) { this.aiscript = markRaw(new AiScript({ ...createAiScriptEnv({ - storageKey: 'pages:' + this.page.id + storageKey: 'pages:' + this.page.id, }), ...initAiLib(this) }, { in: (q) => { return new Promise(ok => { @@ -75,7 +75,7 @@ export class Hpml { SEED: opts.randomSeed ? opts.randomSeed : '', YMD: `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`, AISCRIPT_DISABLED: !this.opts.enableAiScript, - NULL: null + NULL: null, }; this.eval(); @@ -198,7 +198,7 @@ export class Hpml { slots: expr.value.slots.map(x => x.name), exec: (slotArg: Record) => { return this.evaluate(expr.value.expression, scope.createChildScope(slotArg, expr.id)); - } + }, } as Fn; } return; diff --git a/packages/client/src/scripts/hpml/index.ts b/packages/client/src/scripts/hpml/index.ts index 4e5aadfbd3..9a55a5c286 100644 --- a/packages/client/src/scripts/hpml/index.ts +++ b/packages/client/src/scripts/hpml/index.ts @@ -14,22 +14,22 @@ export type Fn = { export type Type = 'string' | 'number' | 'boolean' | 'stringArray' | null; export const literalDefs: Record = { - text: { out: 'string', category: 'value', icon: 'ti ti-quote', }, - multiLineText: { out: 'string', category: 'value', icon: 'fas fa-align-left', }, - textList: { out: 'stringArray', category: 'value', icon: 'fas fa-list', }, - number: { out: 'number', category: 'value', icon: 'fas fa-sort-numeric-up', }, - ref: { out: null, category: 'value', icon: 'fas fa-magic', }, - aiScriptVar: { out: null, category: 'value', icon: 'fas fa-magic', }, - fn: { out: 'function', category: 'value', icon: 'fas fa-square-root-alt', }, + text: { out: 'string', category: 'value', icon: 'ti ti-quote' }, + multiLineText: { out: 'string', category: 'value', icon: 'fas fa-align-left' }, + textList: { out: 'stringArray', category: 'value', icon: 'fas fa-list' }, + number: { out: 'number', category: 'value', icon: 'fas fa-sort-numeric-up' }, + ref: { out: null, category: 'value', icon: 'fas fa-magic' }, + aiScriptVar: { out: null, category: 'value', icon: 'fas fa-magic' }, + fn: { out: 'function', category: 'value', icon: 'fas fa-square-root-alt' }, }; export const blockDefs = [ ...Object.entries(literalDefs).map(([k, v]) => ({ - type: k, out: v.out, category: v.category, icon: v.icon + type: k, out: v.out, category: v.category, icon: v.icon, })), ...Object.entries(funcDefs).map(([k, v]) => ({ - type: k, out: v.out, category: v.category, icon: v.icon - })) + type: k, out: v.out, category: v.category, icon: v.icon, + })), ]; export type PageVar = { name: string; value: any; type: Type; }; @@ -82,7 +82,7 @@ export class HpmlScope { throw new HpmlError( `No such variable '${name}' in scope '${this.name}'`, { - scope: this.layerdStates + scope: this.layerdStates, }); } } -- cgit v1.2.3-freya