@tamb/gamegrid
    Preparing search index...

    Interface IGameGridEventDetail

    CustomEvent.detail for every bubbling grid DOM event constructed by the internal fireGameGridEvent helper used in GameGrid.

    gameGridInstance is always present. IMoveEventDetail fields are set on MOVE_* (and wrap / boundary) events. The index signature reserves space for callers who forward extra fields via that helper's data argument.

    window.addEventListener(gridEventsEnum.MOVE_LAND, (e: Event) => {
    const { gameGridInstance } = (e as GameGridDOMEvent).detail;
    console.log(gameGridInstance.getActiveCell().type);
    });
    interface IGameGridEventDetail {
        blocked?: boolean;
        direction?: string;
        from?: number[];
        gameGridInstance: IGameGrid;
        to?: number[];
        [key: string]: unknown;
    }

    Hierarchy

    Indexable

    • [key: string]: unknown
    Index
    blocked?: boolean
    direction?: string
    from?: number[]
    gameGridInstance: IGameGrid

    The emitting grid (this inside GameGrid).

    to?: number[]