Skip to content

Remove serializable in JavaScript property descriptors  #43

Description

@marchant

This will allow us to use ES Class if we want as we move serializable in PropertyDescriptors

Today there’s one method that’s used to get the info:

            propertyNames = Montage.getSerializablePropertyNames(object),

So the simplest would be to tweak this and add first a check if the object has a "serializablePropertyNames", then check if it has an objectDescriptor, and from there ask the propertyDescriptors that are serializable.

Apart from Data Objects (DO) for which ObjectDescriptors are pretty much guaranteed to be loaded before an instance of the matching type/class can exists, it's not a guaranty right now for other objects. Some have used core.js' export._objectDescriptorDescriptor as a way to generate them dynamically from propertyDescriptors' extension we did (we need to undo that and make them real object descriptors), we could follow the model and make an objectDescriptor property/getter on every object, and assume that it should be sync, that you shouldn't be able to use a type/object/prototype without having loaded it's matching ObjectDescriptor that gives us important metadata we need.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions