How to pass the whole object on ChangeEvent in ${event} variable

I have a ListBox, that is populated in "Data" by an Array of Objects.

In my use case, on the ListBox "change" event, I need that the ${event} object contains the WHOLE object for that ListBox element, not only a property.

So the only way I managed to do this, is to structure my ListBox properties like this:

Data: ${myArrayOfObjects}
Value: ${myArrayOfObjects[0]} => (so on each load of the page, the preselected ListBox item is the first one)

TextProperty: name of the property that I want to display of my object

and finally the most important one:
Value: ${data}

Here, I tried everything, but the only thing that worked is putting ${data}. I don't event know why, but know the ${event} object of this ListBox, is filled with the whole object of that ListBox Item, not just a single property.

So this is all good, at least, can you confirm to me that this is the right way to do it?
The only issue there is, is that with VisualStudio Code, on the HTML generated page, I always get an error on :

Because it doesn't know what data is.
Am I doing something wrong? Is this the right approach?
Because even if everything works, I'm not sure

If you don't set the ValueProperty the Change event will provide the whole object.

I am attaching a sample application that shows the (3.5 KB)