public String jsTypeName(TypeRef typeRef){
switch (typeRef.getKind()) {
case TYPE_MESSAGE:
    return "Object";
case TYPE_ENUM:
  return "number";
default :
{
  String name=PRIMITIVE_TYPE_NAMES.get(typeRef.getKind());
  if (!Strings.isNullOrEmpty(name)) {
    return name;
  }
  throw new IllegalArgumentException("unknown type kind: " + typeRef.getKind());
}
}
}

public String jsTypeName ( TypeRef typeRef ) { switch ( typeRef . getKind ( ) ) { case TYPE_MESSAGE : return "Object" ; case TYPE_ENUM : return "number" ; default : { String name = PRIMITIVE_TYPE_NAMES . get ( typeRef . getKind ( ) ) ; if ( ! Strings . isNullOrEmpty ( name ) ) { return name ; } throw new IllegalArgumentException ( "unknown type kind: " + typeRef . getKind ( ) ) ; } } }
returns the name of js type for the given typeref .
