Options
All
  • Public
  • Public/Protected
  • All
Menu

A class representing a single mention of the current user

Mention instances are retrieved from Document.getMentions

Hierarchy

  • BoundEntity<Mention, MentionEntity, { markedAsRead: any }>
    • Mention

Index

Properties

documentId: string

The ID of the document that this mention belongs to

annotation: Annotation

An Annotation instance that this mention belongs to

id: string

The ID of this mention

createdAt: Date
updatedAt: Date
__type: keyof EntityStateMetadata

Methods

  • select(): void
  • Selects the mention in the viewer

    Returns void

  • subscribe(event: "onChange", listener: (mention: Mention) => void): UnsubscribeFunction
  • subscribe(event: "onDestroy", listener: (id: string) => void): UnsubscribeFunction
  • subscribe(event: "markedAsRead", listener: (mention: Mention) => void): UnsubscribeFunction
  • Fired when anything about this mention changes

    Parameters

    • event: "onChange"
    • listener: (mention: Mention) => void

    Returns UnsubscribeFunction

    Returns a function that can be called to unsubscribe from the event

  • Fired when the mention is deleted

    Parameters

    • event: "onDestroy"
    • listener: (id: string) => void
        • (id: string): void
        • Parameters

          • id: string

          Returns void

    Returns UnsubscribeFunction

    Returns a function that can be called to unsubscribe from the event

  • Fired when the mention is marked as read

    Parameters

    • event: "markedAsRead"
    • listener: (mention: Mention) => void

    Returns UnsubscribeFunction

    Returns a function that can be called to unsubscribe from the event

Accessors

  • get isRead(): boolean
  • A boolean representing if this mention has been seen or not

    Returns boolean

  • get mentionedBy(): User
  • The user that created the mention

    Returns User

  • get contents(): string
  • The text contents of the mention

    Returns string

Generated using TypeDoc