What does this JavaScript error actually mean? I'm not asking about my specific case, just generally how is this error message meant to be understood?
TypeError: 'get' on proxy: property 'items' is a read-only and non-configurable data property on the proxy target but the proxy did not return its actual value (expected '[object Array]' but got '[object Array]')
I don't understand why JavaScript would care what the proxy returns? Why does it matter if its "its actual value" or something else? Isn't what what proxies are (sometimes) used for - returning data in place of the original result?
Additionally - in my specific version of this error message, it appears that the expected type is the same as the returned type so that confuses me even more.
get(). You're overwriting the value of a property that isnt meant to be overwritten according to how it was originally defined. You could change the configurable or writable property usingObject.defineProperty(). As for the end of the error, JS is telling you the type of value not that value itself, not sure why that is though.