This is currently not supported. In my terrain plugin I had to work around it by putting the raw grid array in export, and wrapping it later with C-style static functions:
var _data = 
# We just want to hide the following properties
var cp = Util.grid_clone(_data)
I think the last comment was a suggestion to have this feature in the future... then nobody looked into it yet. If you want to discuss this issue you can eventually do it on Github.