code: private static String docComment(String doc, Object deprecation /* nullable */) {
      StringBuilder docStr = new StringBuilder();
  
      if (doc != null) {
        docStr.append(doc.trim());
      }
  
      if (deprecation != null) {
        docStr.append("\n\n").append("@deprecated");
        if (deprecation instanceof String) {
          docStr.append("  ").append(((String)deprecation).trim());
        }
      }
      return DocEscaping.stringToDocComment(docStr.toString(), DocCommentStyle.ASTRISK_MARGIN);
    }
docs: Return a full tsdoc for a type.
  
  @param doc the doc string in the type's DataSchema.
  @param deprecation the object listed under the schema's "deprecation" property
  
  @return a fully formed tsdoc for the type.