12 lines
241 B
TypeScript
12 lines
241 B
TypeScript
import type { AppState } from "@editor/state";
|
|
|
|
export type CommandContext = {
|
|
state: AppState;
|
|
};
|
|
|
|
export type Command<TPayload = void> = {
|
|
id: string;
|
|
name: string;
|
|
execute(context: CommandContext, payload: TPayload): AppState;
|
|
};
|