You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do we generate product types as having discriminator fields? Or do we only do that on sum types?
Do sum types reference product types or inline their definitions?
I'm guessing it'd be useful to define default semantics for these and override them on a definition-by-definition basis, possibly by wrapping TsDecl in a case class providing the metadata:
TsRenderer.render(...) takes an instance of AnnotatedTsDecl that combines a TsDecl with metadata controlling the rendering
There's some kind of automatic conversion from TsDecl to AnnotatedTsDecl that pulls the metadata from implicit scope
Have you considered allowing for customization of the ADT's generated
type
?It seems currently (at least for the Typescript implementation), that ADTs end up with a hard-coded
{ type: <constructor name> }
.I would like to be able to:
"type"
(constructorName, typeName) => string
.If you think this is useful, I can take a stab at pull request. (I assume these options could be easily added to
TsEncoderConfig
?)The text was updated successfully, but these errors were encountered: