From a9fc176c3c85920fd56f261a30db59c19108b644 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 1 May 2019 19:31:34 +0900 Subject: Fix types --- src/misc/aiscript/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/misc/aiscript/index.ts') diff --git a/src/misc/aiscript/index.ts b/src/misc/aiscript/index.ts index d36c27f942..16f80830ff 100644 --- a/src/misc/aiscript/index.ts +++ b/src/misc/aiscript/index.ts @@ -44,9 +44,9 @@ export type Variable = Block & { name: string; }; -export type Type = 'string' | 'number' | 'boolean' | 'stringArray'; +export type Type = 'string' | 'number' | 'boolean' | 'stringArray' | null; -export const funcDefs = { +export const funcDefs: Record = { if: { in: ['boolean', 0, 0], out: 0, category: 'flow', icon: faShareAlt, }, for: { in: ['number', 'function'], out: null, category: 'flow', icon: faRecycle, }, not: { in: ['boolean'], out: 'boolean', category: 'logical', icon: faFlag, }, @@ -81,7 +81,7 @@ export const funcDefs = { seedRandomPick: { in: [null, 0], out: 0, category: 'random', icon: faDice, }, }; -export const literalDefs = { +export const literalDefs: Record = { text: { out: 'string', category: 'value', icon: faQuoteRight, }, multiLineText: { out: 'string', category: 'value', icon: faAlignLeft, }, textList: { out: 'stringArray', category: 'value', icon: faList, }, @@ -105,7 +105,7 @@ export function isFnBlock(block: Block): block is FnBlock { export type PageVar = { name: string; value: any; type: Type; }; -export const envVarsDef = { +export const envVarsDef: Record = { AI: 'string', URL: 'string', VERSION: 'string', -- cgit v1.2.3-freya