narraleaf-react
Version:
A React visual novel player framework
25 lines (24 loc) • 1.3 kB
TypeScript
import { TypedAction } from "../action/actions";
import { ServiceSkeleton } from "../elements/service";
import { Awaitable, StringKeyOf } from "../../../util/data";
import { GameState } from "../../player/gameState";
import { ActionExecutionInjection } from "./action";
import { LogicAction } from "../action/logicAction";
import { Story } from "../elements/story";
export type ServiceActionContentType = {
"service:action": [type: string, args: unknown[]];
};
export declare class ServiceAction extends TypedAction<ServiceActionContentType, StringKeyOf<ServiceActionContentType>, ServiceSkeleton> {
executeAction(gameState: GameState, injection: ActionExecutionInjection): {
type: any;
node: import("./tree/actionTree").ContentNode<any> | null;
wait?: import("../gameTypes").StackModelWaiting | null;
} | Awaitable<import("../gameTypes").CalledActionResult, any> | (import("../gameTypes").CalledActionResult | Awaitable<import("../gameTypes").CalledActionResult, any>)[] | Awaitable<{
type: any;
node: import("./tree/actionTree").RenderableNode | null;
}, {
type: any;
node: import("./tree/actionTree").RenderableNode | null;
}> | null;
stringify(_story: Story, _seen: Set<LogicAction.Actions>, _strict: boolean): string;
}