I would initially do `let { type, command } = aEvent.data`. That prevents the double .data and makes it clearer to follow.