It would be nice if there were a way to make the compiler emit code that puts the constructor name into the object (under e.g. a $type property), because that way we could use enums in APIs we expose to other frontend teams (which use JS/TS). Maybe via a compiler flag, that would also control the property name.
It would be nice if there were a way to make the compiler emit code that puts the constructor name into the object (under e.g. a
$typeproperty), because that way we could use enums in APIs we expose to other frontend teams (which use JS/TS). Maybe via a compiler flag, that would also control the property name.