Sensemaking Tools Documentation
    Preparing search index...

    Function isCommentRecordType

    • Checks if the data is a CategorizedComment object.

      It has the side effect of changing the type of the object to CommentRecord if applicable.

      Parameters

      • data: any

        the object to check

      Returns data is
          | { id: string; topics: { name: string }[] }
          | { id: string; topics: { name: string; subtopics: { name: string }[] }[] }

      • true if the object is a Comment