Closed MatteoTurri closed 5 years ago
The following case class in Scala
case class Info( paymentModes: Map[PaymentMode, String] )
where PaymentMode is an enum defined as
PaymentMode
@enum trait PaymentMode { object Cash object Voucher object CreditCard }
is translated as
export interface Info { paymentModes: { [key in PaymentMode]: string } }
The key of the generated type is wrong, as it should be optional (e.g. {} should be a valid value for paymentModes)
{}
paymentModes
The following case class in Scala
where
PaymentMode
is an enum defined asis translated as
The key of the generated type is wrong, as it should be optional (e.g.
{}
should be a valid value forpaymentModes
)