Skip to content

Commands beta ​

Interface of @v12-engine/engine

ts
export interface Commands

The commands a world takes, by who defines them: the engine's (core), and each pack's, which adds its own by declaration merging, as the heroes pack does:

ts
declare module '@v12-engine/engine' {
	interface Commands {
		mypack: (typeof myPackCommands)[number]
	}
}

Members ​

core ​

ts
core: (typeof coreCommands)[number];

The engine's commands, as a union of their types; a game or pack adds its own by merging into Commands