Turn an ActionMap into a dispatch object: each entry becomes a
function with the state argument stripped. Calling it applies the action
and returns void.
This is the type magic behind game.actions.move(5, 0) working with full
IntelliSense even though the underlying handler was
(state, dx, dy) => newState.
Turn an ActionMap into a dispatch object: each entry becomes a function with the state argument stripped. Calling it applies the action and returns
void.This is the type magic behind
game.actions.move(5, 0)working with full IntelliSense even though the underlying handler was(state, dx, dy) => newState.