Closed dselman closed 5 months ago
I can do this. Hm, I'll have time this weekend
Ooh, this is interesting:
@json
class Base {}
@json
class Vec1 extends Base {
x: f32 = 0.0;
}
@json
class Vec2 extends Vec1 {
y: f32 = 0.0;
}
@json
class Vec3 extends Vec2 {
z: f32 = 0.0;
}
const arr: Base[] = [
new Vec1(),
new Vec2(),
new Vec3()
];
console.log(JSON.stringify(arr));
And yes, this is implemented now. Sorry for getting back so late
It would be very useful for some use cases to support serialisation / deserialisation of heterogeneous arrays (via type inheritance). For example:
And: