UpdateResult typedef

UpdateResult = (Model, Cmd?)

Type alias for the update function return type.

Makes type signatures more readable:

UpdateResult handleKeyPress(KeyMsg msg) {
  // ...
  return (newModel, cmd);
}

Implementation

typedef UpdateResult = (Model, Cmd?);