Skip to content

defineHook ​

Function of @v12-engine/engine

ts
export declare function defineHook<T>(def: {
    hook: HookKey<T>;
    id: string;
    priority?: number;
    run: (world: World, event: T) => void;
}): HookDef;

Typed help for a handler of a game's own hook (HookKey), taking the world and the hook's event