feat: add command module and update action resolvers with GeneralActionResolver implementation
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import type { GeneralActionDefinition } from '../definition.js';
|
||||
import type { GeneralActionResolver } from '../engine.js';
|
||||
import type { TurnCommandEnv } from './commandEnv.js';
|
||||
|
||||
export interface TurnCommandSpecBase<TKey extends string = string> {
|
||||
key: TKey;
|
||||
category: string;
|
||||
reqArg: boolean;
|
||||
args: Record<string, unknown>;
|
||||
createDefinition(env: TurnCommandEnv): GeneralActionDefinition;
|
||||
}
|
||||
|
||||
export interface TurnCommandModule<TSpec extends TurnCommandSpecBase = TurnCommandSpecBase> {
|
||||
commandSpec: TSpec;
|
||||
ActionDefinition: new (...args: any[]) => GeneralActionDefinition;
|
||||
ActionResolver?: new (...args: any[]) => GeneralActionResolver;
|
||||
CommandResolver?: new (...args: any[]) => unknown;
|
||||
}
|
||||
Reference in New Issue
Block a user