In chapter 5, there is a mutation definition like below.
mutations: {
addToHistory(state: { history: HistoryEntry[] }, entry: HistoryEntry) {
state.history.push(entry)
},
What is this "state: { history: HistoryEntry[] } "?
Searched around but couldn't find any reliable explanation.
There is parameter destructuring explained here.
https://www.typescriptlang.org/docs/handbook/2/functions.html#parameter-destructuring
But it is not the same beast.