You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
vore-rpg/src/scripting/TopLevelStatement.ts

23 lines
711 B

import {BattlerDeclaration} from "./BattlerStatement";
export enum TopLevelStatementType {
VERSION = "version",
BATTLER = "battler",
}
export interface VersionStatement {
readonly type: TopLevelStatementType.VERSION,
readonly version: number,
}
export function versionStatement(version: number): VersionStatement {
return {
type: TopLevelStatementType.VERSION,
version,
}
}
export function isVersionStatement(statement: TopLevelStatement): statement is VersionStatement {
return statement.type === TopLevelStatementType.VERSION
}
export type TopLevelStatement = VersionStatement | BattlerDeclaration
export type TopLevelStatementList = readonly TopLevelStatement[]