feat: add core domain model foundations
This commit is contained in:
11
commands/command.ts
Normal file
11
commands/command.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { ImageDocument } from "@core/document";
|
||||
|
||||
export type CommandContext = {
|
||||
document: ImageDocument;
|
||||
};
|
||||
|
||||
export type Command<TPayload = void> = {
|
||||
id: string;
|
||||
name: string;
|
||||
execute(context: CommandContext, payload: TPayload): ImageDocument;
|
||||
};
|
||||
1
commands/index.ts
Normal file
1
commands/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type { Command, CommandContext } from "./command";
|
||||
Reference in New Issue
Block a user