Open benStre opened 6 months ago
Currently, nested structs can be created with normal objects, e.g.
const example = MyStruct({ name: 1, address: { street: "xy" } })
But when assigning a new object to a property, an error occurs:
example.address = {street: "z"}; // Error: address must be of type <MyAddress>
It should be possible to assign objects without explicitly converting them to the matching type beforehand.
Currently, nested structs can be created with normal objects, e.g.
But when assigning a new object to a property, an error occurs:
It should be possible to assign objects without explicitly converting them to the matching type beforehand.