code: private static String getTypeDeprecationInfo(JSType type) {
      if (type == null) {
        return null;
      }
  
      String depReason = getDeprecationReason(type.getJSDocInfo());
      if (depReason != null) {
        return depReason;
      }
  
      ObjectType objType = castToObject(type);
      if (objType != null) {
        ObjectType implicitProto = objType.getImplicitPrototype();
        if (implicitProto != null) {
          return getTypeDeprecationInfo(implicitProto);
        }
      }
      return null;
    }
docs: Returns the deprecation reason for the type if it is marked
  as being deprecated. Returns empty string if the type is deprecated
  but no reason was given. Returns null if the type is not deprecated.