📜  scala 中的类型和 CoProducts - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:27.151000             🧑  作者: Mango

代码示例1
sealed trait Request
case class CreateUser(name: String)                   extends Request
case class ReadUserInfo(userId: Int)                  extends Request
case class UpdateUserInfo(userId: Int, name: String)  extends Request
case class DeleteUser(userId: Int)                    extends Request