Options
All
  • Public
  • Public/Protected
  • All
Menu

A model that represents a comment.

Instances of this model are created by the CommentPlugin. You can retrieve comments through the DeclarationReflection.comment property.

Hierarchy

  • Comment

Index

Constructors

constructor

  • new Comment(shortText?: string, text?: string): Comment

Properties

Optional returns

returns?: string

The text of the @returns tag if present.

shortText

shortText: string

The abstract of the comment. TypeDoc interprets the first paragraph of a comment as the abstract.

tags

tags: CommentTag[] = []

All associated tags.

text

text: string

The full body text of the comment. Excludes the shortText.

Methods

copyFrom

  • Copy the data of the given comment into this comment.

    shortText, text, returns and tags from COPIED_TAGS are copied; other instance tags left unchanged.

    Parameters

    • comment: Comment

      Source comment to copy from

    Returns void

getTag

  • getTag(tagName: string, paramName?: string): undefined | CommentTag
  • Return the first tag with the given name.

    You can optionally pass a parameter name that should be searched to.

    Parameters

    • tagName: string

      The name of the tag to look for.

    • Optional paramName: string

      An optional parameter name to look for.

    Returns undefined | CommentTag

    The found tag or undefined.

hasTag

  • hasTag(tagName: string): boolean
  • Test whether this comment contains a tag with the given name.

    Parameters

    • tagName: string

      The name of the tag to look for.

    Returns boolean

    TRUE when this comment contains a tag with the given name, otherwise FALSE.

hasVisibleComponent

  • hasVisibleComponent(): boolean

removeTags

  • removeTags(tagName: string): void

Generated using TypeDoc