I'm confused about the syntax in this TypeScript code snippet. Why is the data parameter enclosed in curly braces and followed by a colon and the same data object with a type specification? Can someone explain what this means?
addArrivingTruckSuggestions(state: ITruckState, { data }: { data: IOperationalTruck[] }) {
state.arrivingTruckSuggestions = searchService.createTruckSuggestions(data);
}