code: func TypeInfo(t *Type) (TypeName, TypeRef, string) {
  	switch t.Variant {
  	case TypeVariantAliasTypeDef:
  		td := t.AliasTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantStringTypeDef:
  		td := t.StringTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantNumberTypeDef:
  		td := t.NumberTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantArrayTypeDef:
  		td := t.ArrayTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantMapTypeDef:
  		td := t.MapTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantStructTypeDef:
  		td := t.StructTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantBytesTypeDef:
  		td := t.BytesTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantEnumTypeDef:
  		td := t.EnumTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantUnionTypeDef:
  		td := t.UnionTypeDef
  		return td.Name, td.Type, td.Comment
  	case TypeVariantBaseType:
  		td := t.BaseType
  		s := namesBaseType[int(*td)]
  		return TypeName(s), TypeRef(s), ""
  	default:
  		panic("whoops")
  	}
  }
docs: // TypeInfo returns common info that every type shares.