in scrooge-generator-typescript/src/main/scala/com/gu/scrooge/backend/typescript/TypescriptGenerator.scala [54:78]
def filename(sid: SimpleID): String = sid.toCamelCase.name
def typeName(sid: SimpleID): String = sid.toTitleCase.name
def companionName(sid: SimpleID): String = s"${sid.toTitleCase.name}Serde"
def packageNameFromNamespace(name: String): String =
name.replaceAllLiterally("_at_", "@")
.replace('.', File.separatorChar)
.replace('_', '-')
def thriftType(t: FunctionType): String = t match {
case Void => "Thrift.Type.VOID"
case OnewayVoid => "Thrift.Type.VOID"
case TBool => "Thrift.Type.BOOL"
case TByte => "Thrift.Type.BYTE"
case TI16 => "Thrift.Type.I16"
case TI32 => "Thrift.Type.I32"
case TI64 => "Thrift.Type.I64"
case TDouble => "Thrift.Type.DOUBLE"
case TString => "Thrift.Type.STRING"
case _: StructType => "Thrift.Type.STRUCT"
case _: ListType => "Thrift.Type.LIST"
case _: MapType => "Thrift.Type.MAP"
case _: SetType => "Thrift.Type.SET"
case _: EnumType => "Thrift.Type.I32"
case _ => throw new Exception(s"${t.toString} not implemented yet")
}